Project

General

Profile

Actions

Bug #25151

open

Iterators do no properly work with the “Service enabled at boot” method

Added by Michel BOUISSOU 11 days ago. Updated 2 days ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

Using an iterator withe the “Service enabled at boot” method does not work :

- It seems that the Rudder agent tries to process all of the iterator values ;
- But it reports only for one or two ;
- And repairs fail.

Examples :

- Iterator has 4 values, everything is compliant
- Info shows that the agent tries all 4 values
- But only 2 reports are produced

   info          dnf_automatic             40 - Define list of serv| auto               Set the iterator service_dnf.auto value to dnf-automatic.service,dnf-automatic-download.timer,dnf-automatic-install.timer,dnf-automatic-notifyonly.timer was correct
2024-07-16T13:24:36+00:00 R: [INFO] Executing is-enabled on dnf-automatic.service using the systemctl method
E| compliant     dnf_automatic             50 - Service dnf-automat| dnf-automatic.ser| Ensure service dnf-automatic.service is enabled at boot  was correct
2024-07-16T13:24:36+00:00 R: [INFO] Executing is-enabled on dnf-automatic-download.timer using the systemctl method
E| compliant     dnf_automatic             50 - Service dnf-automat| dnf-automatic-dow| Ensure service dnf-automatic-download.timer is enabled at boot  was correct
2024-07-16T13:24:36+00:00 R: [INFO] Executing is-enabled on dnf-automatic-install.timer using the systemctl method
2024-07-16T13:24:36+00:00 R: [INFO] Executing is-enabled on dnf-automatic-notifyonly.timer using the systemctl method

- Same test with timers disabled :
- Info shows we're trying all 4 values
- Still only 2 reports
- The non-compliant one fails in ERROR when it should get REPAIRED (and would be, if not using the iterator)

   info          dnf_automatic             40 - Define list of serv| auto               Set the iterator service_dnf.auto value to dnf-automatic.service,dnf-automatic-download.timer,dnf-automatic-install.timer,dnf-automatic-notifyonly.timer was correct
2024-07-16T13:33:49+00:00 R: [INFO] Executing is-enabled on dnf-automatic.service using the systemctl method
E| compliant     dnf_automatic             50 - Service dnf-automat| dnf-automatic.ser| Ensure service dnf-automatic.service is enabled at boot  was correct
2024-07-16T13:33:49+00:00 R: [INFO] Executing is-enabled on dnf-automatic-download.timer using the systemctl method
E| error         dnf_automatic             50 - Service dnf-automat| dnf-automatic-dow| Ensure service dnf-automatic-download.timer is enabled at boot  could not be repaired
2024-07-16T13:33:49+00:00 R: [INFO] Executing is-enabled on dnf-automatic-install.timer using the systemctl method
2024-07-16T13:33:49+00:00 R: [INFO] Executing is-enabled on dnf-automatic-notifyonly.timer using the systemctl method
Actions

Also available in: Atom PDF