merge CASSANDRA-3636 from 1.0 to 1.1 cassandra 1.0.x breakes APT on debian OpenVZ
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ff64c5d1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ff64c5d1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ff64c5d1 Branch: refs/heads/trunk Commit: ff64c5d11e9e66dfa42a1ca72572a65fb7480f37 Parents: bfdfe90 Author: Dave Brosius <[email protected]> Authored: Mon Jul 23 07:03:52 2012 -0400 Committer: Dave Brosius <[email protected]> Committed: Mon Jul 23 07:03:52 2012 -0400 ---------------------------------------------------------------------- debian/cassandra.postinst | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ff64c5d1/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)
