From 3a919dbe9598a0ed9ef69b4ff6fd2b16fef6f7c7 Mon Sep 17 00:00:00 2001 From: Raj Reddy Date: Fri, 24 Jun 2016 15:14:13 -0700 Subject: [PATCH] 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: If5318b46057cc8aac6ae35f6fa1e32d40d33236d Closes-Bug: #1573841 (cherry picked from commit 311fb06be152581125d7fb9969e16b2183ac1c92) --- .../contrail/manifests/database/config_cassandra.pp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrail/environment/modules/contrail/manifests/database/config_cassandra.pp b/contrail/environment/modules/contrail/manifests/database/config_cassandra.pp index 17313872..150fc0ab 100644 --- a/contrail/environment/modules/contrail/manifests/database/config_cassandra.pp +++ b/contrail/environment/modules/contrail/manifests/database/config_cassandra.pp @@ -19,6 +19,9 @@ # 'commitlog_directory' => "${database_dir}/commitlog", # }, #} + + $jvm_version_chk = 'sed -i -e \'s/if \[ \"\$JVM_VERSION\" \\< \"1.8\" \] && \[ \"\$JVM_PATCH_VERSION\" \\< \"25\" \] ; then/if \[ \"\$JVM_VERSION\" \\< \"1.8\" \] \&\& \[ \"\$JVM_PATCH_VERSION\" -lt \"25\" \] ; then/\' ' + package {'cassandra': ensure => latest, configfiles => "replace", @@ -133,4 +136,9 @@ command => "sed -i -e 's/lib\/jamm-0.2.5.jar/lib\/jamm-0.3.0.jar/' $cassandra_env_file", provider => shell, } + exec { + 'cassandra-env-update': + command => "${jvm_version_chk}${cassandra_env_file}", + provider => shell, + } }