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

Stock update model can leave hosts in partially updated state

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.6.1, 3.6.0, 3.6.2, 3.6 RC, 3.6.4, 3.6.3, 3.6.5, 3.7.0, 3.6.6, 3.6.7, 3.7.1, 3.9.0, 3.7.3, 3.7.2, 3.7.4, 3.9.0 beta, 3.10.0, 3.9.1, 3.10.0b1
    • Fix Version/s: 3.7.5, 3.10.1
    • Labels:
      None

      Description

      The default update model can leave hosts in a partially updated state where the host does not realize it needs to copy additional files. It can stay in this state until a change in policy is published.

      The update policy promises that $(sys.inputdir)/cf_promises_validated is the same as $(cfe_internal_update_policy.masterlocation)/cf_promises_validated

      https://github.com/cfengine/masterfiles/blob/3.10.0/cfe_internal/update/update_policy.cf#L93-L100

      If the cf_promises_validated file is repaired then the validated_updates_ready class is defined and all of $(cfe_internal_update_policy.masterlocation) is scanned for changes and updates are downloaded if necessary.

      https://github.com/cfengine/masterfiles/blob/3.10.0/cfe_internal/update/update_policy.cf#L138-L146

      It is possible that some issue happens after the cf_promises_validated flag file is updated but before the update is completed successfully. Since cf_promises_validated is the same as the upstream hub the agent will not re-try to update its policy.

      The logic should be improved to take this into account so that hosts do not end up in a partially updated state.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10042 Nick Anderson
                Reporter:
                a10042 Nick Anderson
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel