Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2473 Ensure tests are not executing failsafe.cf upon failure
  3. CFE-2474

failsafe.cf misbehaves when it runs twice in a row, causing obscure side-effects

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.10.0
    • Component/s: Test suite
    • Labels:
      None

      Description

      From the parent ticket:

      And then comes process locking. First execution of failsafe shows properly that there are no ppkeys available and aborts:

      cf-agent/cf-agent   -f failsafe.cf
      R: No public/private key pair is loaded, please create one by running "cf-key"
         error: Fatal CFEngine error: cf-agent aborted on defined class 'no_ppkeys_ABORT_kept'
      

      Second execution however, has that same promise locked, and proceeds to execute the rest of failsafe.cf:

      cf-agent/cf-agent   -f failsafe.cf
         error: No suitable server found
         error: No suitable server found
         error: No suitable server found
         error: Method 'failsafe_cfe_internal_update' failed in some repairs
      R: Built-in failsafe policy triggered
      

      As a result, two identical executions one after the other, have different results, and the last one can, under specific conditions, start cf-serverd!

      How to ensure consistent failsafe behaviour?

        Attachments

          Activity

            People

            • Assignee:
              a10038 jimis (Dimitrios Apostolou)
              Reporter:
              a10038 jimis (Dimitrios Apostolou)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel