Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7561

Event with 'failure' status should be created when a service fails to restart

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Coremunity
    • Story Points:
      2

      Description

      When using:
      'query': '["and", ["=", "certname", "mynode.localdomain"],["=", "latest-report?", "true"]]'

      On endpoint:
      /v3/events

      All 'event' elements returned will have their status at "success" even after a puppet run have a service ressource that failed to restart. A following puppet run (a second try) will give us the proper 'failure' status.

      We can reproduce this problem like this:
      1. Having a working catalog with a defined service ressource
      2. Execute the query on /v3/events endpoint
      3. Check all status of the returned event, they are all "success"
      4. Modify the catalog to make the service to not be able to restart. (We introduce a wrong custom fragments in apache vhost so that httpd will failed to restart)
      ex:
      ------------------------------------------------------------------
      (/Stage[main]/Apache::Service/Service[httpd]) Failed to call refresh: Could not start Service[httpd]: Execution of '/sbin/service httpd start' returned 1:
      (/Stage[main]/Apache::Service/Service[httpd]) Could not start Service[httpd]: Execution of '/sbin/service httpd start' returned 1:
      Finished catalog run in 158.50 seconds
      -------------------------------------------------------------------
      5. Execute the query on /v3/events endpoint
      6. Check all status of the returned event, they are still "success" but "timestamp" and "report" has changed accordingly
      7. Trigger a second puppet run with "puppet agent -t"
      8. Execute the query on /v3/events endpoint
      9. Check all status of the returned event, they are now showing a "Failure" for the service ressource as expected

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              slamontagne Sylvain Lamontagne
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support