Skip to content

Commit

Permalink
Closes-Bug: #1573841
Browse files Browse the repository at this point in the history
in cassandra-env.sh, when comparing JVM_PATCH_VERSION, currently string cmp is used
which shows "101" < "25", hence changing the comparison to -lt cmp

Change-Id: I21b920fa4115cdbe1483a3bd2e001ba6c62c6649
  • Loading branch information
Raj Reddy committed May 4, 2016
1 parent 04da274 commit b5a8ca3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contrail_provisioning/database/setup.py
Expand Up @@ -192,6 +192,9 @@ def fixup_cassandra_config_files(self):
% (env_file))
local("sudo sed -i 's/# JVM_OPTS=\"\$JVM_OPTS -Xloggc:\/var\/log\/cassandra\/gc-`date +%%s`.log\"/JVM_OPTS=\"\$JVM_OPTS -Xloggc:\/var\/log\/cassandra\/gc-`date +%%s`.log\"/g' %s" \
% (env_file))
# change < to -lt for numeric comparison
local("sudo sed -i 's/if \\[ \\\"\\$JVM_VERSION\\\" \\\\< \\\"1.8\\\" \\] && \\[ \\\"\\$JVM_PATCH_VERSION\\\" \\\\< \\\"25\\\" \\] ; \
then/if [ \"\\$JVM_VERSION\" \\\\< \"1.8\" ] \\&\\& [ \"\\$JVM_PATCH_VERSION\" -lt \"25\" ] ; then/g' %s" % (env_file))
local("sudo sed -i 's/MaxTenuringThreshold=.*\"/MaxTenuringThreshold=30\"/g' %s" % (env_file))

def fixup_config_files(self):
Expand Down

0 comments on commit b5a8ca3

Please sign in to comment.