Skip to content

Conversation

@dtardon
Copy link
Member

@dtardon dtardon commented Nov 14, 2025

Resolves: RHEL-115032

Otherwise, e.g. requesting to start a unit that is under stopping may
enter the failed state.

This makes
- rename .can_start() -> .test_startable(), and make it allow to return
  boolean and refuse to start units when it returns false,
- refuse earlier to start units that are in the deactivating state, so
  several redundant conditions in .start() can be dropped,
- move checks for unit states mapped to UNIT_ACTIVATING from .start() to
  .test_startable().

Fixes #39247.

(cherry picked from commit 8eefd0f4debc0bcfeea89dd39c43e3318f3f7ae7)

Resolves: RHEL-115032
As 'systemctl stop' is called with --no-block, previously systemd-resolved
might not be stopped when 'resolvectl' is called, and the DBus connection
might be closed during the call:
```
TEST-07-PID1.sh[5643]: + systemctl stop --no-block systemd-resolved.service
TEST-07-PID1.sh[5643]: + resolvectl
TEST-07-PID1.sh[5732]: Failed to get global data: Remote peer disconnected
```

Follow-up for 8eefd0f4debc0bcfeea89dd39c43e3318f3f7ae7.
Fixes systemd/systemd#39388 (comment).

(cherry picked from commit 6454fde83eef8da7391ad18a1b1a3248402f9214)

Related: RHEL-115032
@github-actions github-actions bot changed the title Increment start limit counter only when we can start the unit (RHEL-115032) Increment start limit counter only when we can start the unit Nov 14, 2025
@github-actions
Copy link

github-actions bot commented Nov 14, 2025

Commit validation

Tracker - RHEL-115032

The following commits meet all requirements

commit upstream
954fd34 - core: increment start limit counter only when we can start the unit systemd/systemd@8eefd0f
34d20f1 - TEST-07-PID1: wait for systemd-resolved being stopped systemd/systemd@6454fde
d9d9dfd - test: extend start limit interval systemd/systemd@44b4caa

Tracker validation

Success

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


Pull Request validation

Failed

🔴 Failed or pending checks:

  • ci (centos, 10, address,undefined, 1, -Og, yes, 0, sanitizers)[failure]

🔴 Review - Missing review from a member (1 required)

As the modified service requires about ~10 seconds for stopping, the
service never hit the start limit even if we tried to restart the
service more than 5 times.

This also checks that the service is actually triggered by dbus method
call.

Follow-up for 8eefd0f4debc0bcfeea89dd39c43e3318f3f7ae7.

(cherry picked from commit 44b4caad6cc99449bbf705350939fde1ed9b1248)

Related: RHEL-115032
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.

2 participants