Affects Version/s: None
Fix Version/s: None
Component/s: Building and Installing
Community consensus is to avoid CFEngine's upgrade process.
I tried using it and found it worked in 90% of the cases however that leaves a significant portion where it did not work.
The failure mode was: the RPM would get upgraded but the CFEngine service would not be running.
On Nick's suggestion, I tried modifying the /tmp/install.sh script created by update_bins.cf to check if the RPM is installed OK (verify it) and then start CFEngine if it isn't running already, always returning "true" so as not to trigger a roll-back:
/bin/rpm -U $1
/bin/rpm -V $1 && /usr/bin/pgrep cf-execd || /etc/init.d/cfengine3 start || /bin/true
but now upgrade is failing again, CFEngine is looking in the wrong location for the RPM file:
- cf-agent -f update.cf -IC
2015-06-30T22:39:47+0000 info: /default/cfe_internal_update_bins/files/'/var/cfengine/bin/cf-upgrade': Can't stat file '/var/cfengine/master_software_updates/cf-upgrade/linux.x86_64/cf-upgrade' on 'xx.xx.xx.xx' in files.copy_from promise
- cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
I was expecting CFEngine to look in /var/cfengine/master_software_updates/redhat_6_x86_64/cfengine-nova-3.6.5-1.x86_64.rpm
Since my modification, our success rate plummeted to 72/500.
I'm going to continue investigating. I suspect $1 is the RPM file name so that's not a good thing to feed "rpm -V". Neil Watson suggested there is a problem with the RPM if the service is not running after rpm -U. Nick Anderson thought there might be an issue with the post-install script?