Skip to content

Conversation

@mrc0mmand
Copy link
Member

@mrc0mmand mrc0mmand commented Sep 30, 2025

When a timer is restarted, don't reset the last_trigger field.
This prevents the timer from triggering immediately.

Fixes: #31231
(cherry picked from commit 3fc44a0f68412b649e16f12ff2f97a36c615457d)

Resolves: RHEL-118216

@github-actions
Copy link

github-actions bot commented Sep 30, 2025

Commit validation

Tracker - RHEL-118216

The following commits meet all requirements

commit upstream
4739718 - test: rename TEST-53-ISSUE-16347 to TEST-53-TIMER systemd/systemd@953c347
146bde8 - test: restarting elapsed timer shouldn't trigger the corresponding ser… systemd/systemd@5730a40
0ba2d12 - test: check the next elapse timer timestamp after deserialization systemd/systemd@f4c3c10
aceada1 - timer: don't run service immediately after restart of a timer systemd/systemd@3fc44a0
ffe8e95 - test: store and compare just the property value systemd/systemd@0cb252d

Tracker validation

Success

🟢 Tracker RHEL-118216 has set desired product: rhel-10.2
🟢 Tracker RHEL-118216 has set desired component: systemd
🟢 Tracker RHEL-118216 has been approved
🟢 Tracker RHEL-118216 has set severity


Pull Request validation

Success

🟡 CI - Waived
🟢 Review - Reviewed by a member
🟢 Approval - Changes were approved


Auto Merge

Success

🟢 Pull Request is not marked as draft and it's not blocked by dont-merge label
🟢 Pull Request meet requirements, title has correct form
🟢 Pull Request meet requirements, mergeable is true
🟠 Pull Request meet requirements, mergeable_state is unstable
🟢 Pull Request has correct target branch main
🟢 Pull Request was merged

mrc0mmand and others added 5 commits September 30, 2025 16:01
And split the existing test into a separate subtest.

(cherry picked from commit 953c347fb6f293acbd6da009646bfc071b68ddd7)

Related: RHEL-118216
…rvice

Provides coverage for:
  - systemd/systemd#31231
  - systemd/systemd#35805

(cherry picked from commit 5730a400fd5ee82566fe03eb832121a0d4bc26b6)

Related: RHEL-118216
When deserializing a serialized timer unit with RandomizedDelaySec= set,
systemd should use the last inactive exit timestamp instead of current
realtime to calculate the new next elapse, so the timer unit actually
runs in the given calendar window.

Provides coverage for:
  - systemd/systemd#18678
  - systemd/systemd#27752

(cherry picked from commit f4c3c107d9be4e922a080fc292ed3889c4e0f4a5)

Related: RHEL-118216
When a timer is restarted, don't reset the last_trigger field.
This prevents the timer from triggering immediately.

Fixes: #31231
(cherry picked from commit 3fc44a0f68412b649e16f12ff2f97a36c615457d)

Resolves: RHEL-118216
Follow-up for 5730a400fd5ee82566fe03eb832121a0d4bc26b6.

(cherry picked from commit 0cb252d50f35256bff569fa6213784f2d45ad6a1)

Related: RHEL-118216
@mrc0mmand mrc0mmand force-pushed the RHEL-118216-restarting-timers branch 2 times, most recently from 6993f37 to ffe8e95 Compare September 30, 2025 14:50
@github-actions github-actions bot changed the title timer: don't run service immediately after restart of a timer (RHEL-118216) timer: don't run service immediately after restart of a timer Sep 30, 2025
@mrc0mmand
Copy link
Member Author

The CI fails are unrelated (libasan errors), but I'll look into them soon.

@mrc0mmand mrc0mmand marked this pull request as ready for review October 1, 2025 08:05
Copy link
Member

@dtardon dtardon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot merged commit c2a0cd9 into redhat-plumbers:main Oct 1, 2025
29 of 30 checks passed
@mrc0mmand mrc0mmand deleted the RHEL-118216-restarting-timers branch October 1, 2025 10:06
@jamacku jamacku added this to the RHEL-10.2 milestone Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants