cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [6/8] git commit: warn if deb sysctl vm.max_map_count setting fails for OpenVZ Patch by paul cannon, reviewed by brandonwilliams for CASSANDRA-3636
Date Mon, 21 May 2012 16:27:17 GMT
warn if deb sysctl vm.max_map_count setting fails for OpenVZ
Patch by paul cannon, reviewed by brandonwilliams for CASSANDRA-3636


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/48438ffc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/48438ffc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/48438ffc

Branch: refs/heads/cassandra-1.1
Commit: 48438ffc61bce2396fa2eac2f88fa66a6e6a69cd
Parents: 2db61ab
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Mon May 21 11:19:59 2012 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Mon May 21 11:20:11 2012 -0500

----------------------------------------------------------------------
 debian/cassandra.postinst |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/48438ffc/debian/cassandra.postinst
----------------------------------------------------------------------
diff --git a/debian/cassandra.postinst b/debian/cassandra.postinst
index 86adecb..9591459 100644
--- a/debian/cassandra.postinst
+++ b/debian/cassandra.postinst
@@ -38,7 +38,15 @@ case "$1" in
             chown -R cassandra: /var/lib/cassandra
             chown -R cassandra: /var/log/cassandra
         fi
-        sysctl -p /etc/sysctl.d/cassandra.conf
+        if ! sysctl -p /etc/sysctl.d/cassandra.conf; then
+            echo >&2
+            echo "Warning: unable to set vm.max_map_count; is this an OpenVZ" >&2
+            echo "instance? If so, it is highly recommended that you set" >&2
+            echo "vm.max_map_count to 1048575 in the host." >&2
+            echo >&2
+            echo "Deleting the local sysctl.d/cassandra.conf." >&2
+            rm -v /etc/sysctl.d/cassandra.conf
+        fi
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)


Mime
View raw message