Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2018

cf-upgrade is failing in a significant portion of cases

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Rejected
    • Priority: High
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Platform:
      RHEL or CentOS

      Description

      See https://groups.google.com/forum/#!topic/help-cfengine/FknMC0tjRPM

      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/sh

      /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:

      1. cf-agent -f update.cf -IC
        2015-06-30T22:39:47+0000 info: /default/cfe_internal_update_bins/files/'/var/cfengine/bin/cf-upgrade'[0]: 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
      2. 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?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10003 Eystein Maloy Stenberg
                Reporter:
                atsaloli Aleksey Tsalolikhin
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel