Details
Description
If, for example, a service resource is notified that it should restart, and fails to do so, we do record this information in the resource status, but only partially expose it in the report.
A failed_to_restart count is exposed in the metrics section:
metrics:
|
resources:
|
name: resources
|
label: Resources
|
values:
|
- - total
|
- Total
|
- 10
|
- - skipped
|
- Skipped
|
- 0
|
- - failed
|
- Failed
|
- 0
|
- - failed_to_restart
|
- Failed to restart
|
- 1
|
- - restarted
|
- Restarted
|
- 0
|
- - changed
|
- Changed
|
- 1
|
- - out_of_sync
|
- Out of sync
|
- 1
|
- - scheduled
|
- Scheduled
|
- 0
|
- - corrective_change
|
- Corrective change
|
- 0
|
However, the individual resource that failed to restart does not have any information to indicate that it was the problem:
Service[my_service]:
|
title: my_service
|
file: "/root/service_restart_failure/manifests/init.pp"
|
line: 30
|
resource: Service[my_service]
|
resource_type: Service
|
provider_used: init
|
containment_path:
|
- Stage[main]
|
- Service_restart_failure
|
- Service[my_service]
|
evaluation_time: 0.011004225
|
tags:
|
- service
|
- my_service
|
- class
|
- service_restart_failure
|
time: '2018-06-05T10:53:57.237817957-07:00'
|
failed: false
|
changed: false
|
out_of_sync: false
|
skipped: false
|
change_count: 0
|
out_of_sync_count: 0
|
events: []
|
corrective_change: false
|
Attachments
Issue Links
- is duplicated by
-
PUP-7561 Event with 'failure' status should be created when a service fails to restart
-
- Closed
-
- relates to
-
PUP-9586 Failed refreshonly resources generate duplicate event
-
- Closed
-
-
PUP-2280 If a resource is triggered by a refresh, and it fails, puppet doesn't treat it as a failure
-
- Closed
-
-
PUP-9339 Refreshed resources do not get a status event in the report
-
- Closed
-
- links to