Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
timer units gets skipped when running systemctl daemon-reload as its trigger time gets recalculated when the reload is executed past its OnCalendar= and before the RandomeDelaySec= values.
Version-Release number of selected component (if applicable):
systemd-250-12.el9_1.x86_64
How reproducible:
Always
Steps to Reproduce:
1. create the units, enable and start it
[root@r91 ~]# cat /etc/systemd/system/test.timer
[Unit]
Description=Starts randomized test timer
[Timer]
RandomizedDelaySec=10800
OnCalendar=Thu 22:45
[Install]
WantedBy=timers.target
[root@r91 ~]# cat /etc/systemd/system/test.service
[Unit]
Description=static unit for test timer
[Service]
Type=oneshot
ExecStart=/usr/bin/echo "executed"
[root@r91 ~]# systemctl daemon-reload
[root@r91 ~]# systemctl enable --now test.timer
Created symlink /etc/systemd/system/timers.target.wants/test.timer → /etc/systemd/system/test.timer.
[root@r91 ~]# systemctl status -l test.timer test.service
● test.timer - Starts randomized test timer
Loaded: loaded (/etc/systemd/system/test.timer; enabled; vendor preset: disabled)
Active: active (waiting) since Thu 2023-05-04 22:44:31 UTC; 6s ago
Until: Thu 2023-05-04 22:44:31 UTC; 6s ago
Trigger: Fri 2023-05-05 00:45:17 UTC; 2h 0min left
Triggers: ● test.service
May 04 22:44:31 r91 systemd[1]: Started Starts randomized test timer.
○ test.service - static unit for test timer
Loaded: loaded (/etc/systemd/system/test.service; static)
Active: inactive (dead)
TriggeredBy: ● test.timer
2. wait the OnCalendar= time and reload systemd but not after the actual trigger date
[root@r91 ~]# systemctl daemon-reload
Actual results:
The trigger date is recalculated skipping the job until next OnCalendar=
[root@r91 ~]# date
Thu May 4 10:44:54 PM UTC 2023
[root@r91 ~]# date
Thu May 4 10:45:19 PM UTC 2023
[root@r91 ~]# date
Thu May 4 10:45:42 PM UTC 2023
[root@r91 ~]# date
Thu May 4 10:46:28 PM UTC 2023
[root@r91 ~]# systemctl status -l test.timer test.service
● test.timer - Starts randomized test timer
Loaded: loaded (/etc/systemd/system/test.timer; enabled; vendor preset: disabled)
Active: active (waiting) since Thu 2023-05-04 22:44:31 UTC; 2min 3s ago
Until: Thu 2023-05-04 22:44:31 UTC; 2min 3s ago
Trigger: Fri 2023-05-05 00:45:17 UTC; 1h 58min left
Triggers: ● test.service
May 04 22:44:31 r91 systemd[1]: Started Starts randomized test timer.
○ test.service - static unit for test timer
Loaded: loaded (/etc/systemd/system/test.service; static)
Active: inactive (dead)
TriggeredBy: ● test.timer
[root@r91 ~]# systemctl daemon-reload
[root@r91 ~]# systemctl status -l test.timer test.service
● test.timer - Starts randomized test timer
Loaded: loaded (/etc/systemd/system/test.timer; enabled; vendor preset: disabled)
Active: active (waiting) since Thu 2023-05-04 22:44:31 UTC; 2min 12s ago
Until: Thu 2023-05-04 22:44:31 UTC; 2min 12s ago
Trigger: Thu 2023-05-11 23:16:31 UTC; 1 week 0 days left
Triggers: ● test.service
May 04 22:44:31 r91 systemd[1]: Started Starts randomized test timer.
○ test.service - static unit for test timer
Loaded: loaded (/etc/systemd/system/test.service; static)
Active: inactive (dead)
TriggeredBy: ● test.timer
Expected results:
To keep the same trigger date to avoid skipping the job as the timer unit was not changed.
[root@r91 ~]# systemctl daemon-reload
[root@r91 ~]# systemctl status -l test.timer test.service
● test.timer - Starts randomized test timer
Loaded: loaded (/etc/systemd/system/test.timer; enabled; vendor preset: disabled)
Active: active (waiting) since Thu 2023-05-04 22:44:31 UTC; 2min 12s ago
Until: Thu 2023-05-04 22:44:31 UTC; 2min 12s ago
Trigger: Fri 2023-05-05 00:45:17 UTC; 1h 58min left
Triggers: ● test.service
Additional info:
This bug is also present in RHEL 7 and RHEL 8, it was first detected by Renaud in RHEL 8.2 and it is still present in RHEL 8.7.
And I did not find it reported for rHEL 9.
JGamba
Description of problem: timer units gets skipped when running systemctl daemon-reload as its trigger time gets recalculated when the reload is executed past its OnCalendar= and before the RandomeDelaySec= values. Version-Release number of selected component (if applicable): systemd-250-12.el9_1.x86_64 How reproducible: Always Steps to Reproduce: 1. create the units, enable and start it [root@r91 ~]# cat /etc/systemd/system/test.timer [Unit] Description=Starts randomized test timer [Timer] RandomizedDelaySec=10800 OnCalendar=Thu 22:45 [Install] WantedBy=timers.target [root@r91 ~]# cat /etc/systemd/system/test.service [Unit] Description=static unit for test timer [Service] Type=oneshot ExecStart=/usr/bin/echo "executed" [root@r91 ~]# systemctl daemon-reload [root@r91 ~]# systemctl enable --now test.timer Created symlink /etc/systemd/system/timers.target.wants/test.timer → /etc/systemd/system/test.timer. [root@r91 ~]# systemctl status -l test.timer test.service ● test.timer - Starts randomized test timer Loaded: loaded (/etc/systemd/system/test.timer; enabled; vendor preset: disabled) Active: active (waiting) since Thu 2023-05-04 22:44:31 UTC; 6s ago Until: Thu 2023-05-04 22:44:31 UTC; 6s ago Trigger: Fri 2023-05-05 00:45:17 UTC; 2h 0min left Triggers: ● test.service May 04 22:44:31 r91 systemd[1]: Started Starts randomized test timer. ○ test.service - static unit for test timer Loaded: loaded (/etc/systemd/system/test.service; static) Active: inactive (dead) TriggeredBy: ● test.timer 2. wait the OnCalendar= time and reload systemd but not after the actual trigger date [root@r91 ~]# systemctl daemon-reload Actual results: The trigger date is recalculated skipping the job until next OnCalendar= [root@r91 ~]# date Thu May 4 10:44:54 PM UTC 2023 [root@r91 ~]# date Thu May 4 10:45:19 PM UTC 2023 [root@r91 ~]# date Thu May 4 10:45:42 PM UTC 2023 [root@r91 ~]# date Thu May 4 10:46:28 PM UTC 2023 [root@r91 ~]# systemctl status -l test.timer test.service ● test.timer - Starts randomized test timer Loaded: loaded (/etc/systemd/system/test.timer; enabled; vendor preset: disabled) Active: active (waiting) since Thu 2023-05-04 22:44:31 UTC; 2min 3s ago Until: Thu 2023-05-04 22:44:31 UTC; 2min 3s ago Trigger: Fri 2023-05-05 00:45:17 UTC; 1h 58min left Triggers: ● test.service May 04 22:44:31 r91 systemd[1]: Started Starts randomized test timer. ○ test.service - static unit for test timer Loaded: loaded (/etc/systemd/system/test.service; static) Active: inactive (dead) TriggeredBy: ● test.timer [root@r91 ~]# systemctl daemon-reload [root@r91 ~]# systemctl status -l test.timer test.service ● test.timer - Starts randomized test timer Loaded: loaded (/etc/systemd/system/test.timer; enabled; vendor preset: disabled) Active: active (waiting) since Thu 2023-05-04 22:44:31 UTC; 2min 12s ago Until: Thu 2023-05-04 22:44:31 UTC; 2min 12s ago Trigger: Thu 2023-05-11 23:16:31 UTC; 1 week 0 days left Triggers: ● test.service May 04 22:44:31 r91 systemd[1]: Started Starts randomized test timer. ○ test.service - static unit for test timer Loaded: loaded (/etc/systemd/system/test.service; static) Active: inactive (dead) TriggeredBy: ● test.timer Expected results: To keep the same trigger date to avoid skipping the job as the timer unit was not changed. [root@r91 ~]# systemctl daemon-reload [root@r91 ~]# systemctl status -l test.timer test.service ● test.timer - Starts randomized test timer Loaded: loaded (/etc/systemd/system/test.timer; enabled; vendor preset: disabled) Active: active (waiting) since Thu 2023-05-04 22:44:31 UTC; 2min 12s ago Until: Thu 2023-05-04 22:44:31 UTC; 2min 12s ago Trigger: Fri 2023-05-05 00:45:17 UTC; 1h 58min left Triggers: ● test.service Additional info: This bug is also present in RHEL 7 and RHEL 8, it was first detected by Renaud in RHEL 8.2 and it is still present in RHEL 8.7. And I did not find it reported for rHEL 9. JGamba