diff --git a/contrail/environment/modules/contrail/lib/facter/contrail-compute-custom-facts.rb b/contrail/environment/modules/contrail/lib/facter/contrail-compute-custom-facts.rb index b1d24738..2eacbb88 100755 --- a/contrail/environment/modules/contrail/lib/facter/contrail-compute-custom-facts.rb +++ b/contrail/environment/modules/contrail/lib/facter/contrail-compute-custom-facts.rb @@ -35,7 +35,7 @@ end Facter.add(:contrail_version) do setcode do - Facter::Util::Resolution.exec('dpkg -l contrail-install-packages | grep contrail-install-packages | awk \'{ printf $3}\'') + Facter::Util::Resolution.exec('dpkg -l contrail-lib | grep contrail-lib | awk \'{ printf $3}\'') end end Facter.add(:conductor_idx) do diff --git a/contrail/environment/modules/contrail/manifests/lib/contrail_upgrade.pp b/contrail/environment/modules/contrail/manifests/lib/contrail_upgrade.pp index 10c65fcd..9818a1f2 100644 --- a/contrail/environment/modules/contrail/manifests/lib/contrail_upgrade.pp +++ b/contrail/environment/modules/contrail/manifests/lib/contrail_upgrade.pp @@ -9,7 +9,7 @@ $needed_version = $::contrail::params::contrail_version # needed_version is not available om old SMs notify {"*** installed_version => $::contrail_version ***":;} - if $needed_version and (versioncmp($needed_version, $::contrail_version) > 0) { + if $needed_version and $::contrail_version and (versioncmp($needed_version, $::contrail_version) > 0) { notify {"*** need => $::needed_version ***":;} $upgrade_needed = 1 } else { @@ -44,8 +44,8 @@ logoutput => $contrail_logoutput, } -> exec { 'clear_out_files' : - command => 'rm -f /etc/contrail/contrail*.out && rm -f /opt/contrail/contrail_packages/exec-contrail-setup-sh.out && echo reset_provision >> /etc/contrail/contrail_common_exec.out', - unless => 'grep -qx reset_provision /etc/contrail/contrail_common_exec.out', + command => 'rm -f /etc/contrail/contrail*.out && rm -f /opt/contrail/contrail_packages/exec-contrail-setup-sh.out && echo reset_provision_3_0 >> /etc/contrail/contrail_common_exec.out', + unless => 'grep -qx reset_provision_3_0 /etc/contrail/contrail_common_exec.out', provider => shell, logoutput => $contrail_logoutput }