Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(RHEL-55301) Don't GC unit if it is in another queue #299

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dtardon
Copy link
Member

@dtardon dtardon commented Sep 10, 2024

Resolves: RHEL-55301

rphibel and others added 5 commits September 10, 2024 13:30
The gc_unit_queue is dispatched before the cgroup_empty_queue.  Because
of this, when we enter in on_cgroup_empty_event, the unit in
cgroup_empty_queue may already have been freed and we don't clean up the
corresponding cgroup. With this change, we prevent the unit from being
garbage collected if it is in the cgroup_empty_queue.

(cherry picked from commit 8db9989)

Resolves: RHEL-55301
This change removes the pruning of cgroups for FAILED/INACTIVE units
from per-unit-type handlers and moves it in on_cgroup_empty_event.

(cherry picked from commit 380dd17)

Related: RHEL-55301
In test-execute, only the unit was started, not the slice. Because of
that the slice cgroup was pruned even if it was still needed. From what
I can tell, this is because, in the test, we don't have all the
mechanics that starts the slice for a service. To fix the issue the
slice is started manually.

(cherry picked from commit fc6172b)

Related: RHEL-55301
This is a follow-up for 8db9989, and
follows a similar logic: a pending OOM event really trumps everything:
we should not GC a unit while it is pending.

(cherry picked from commit 935f804)

Related: RHEL-55301
Let's make sure that D-Bus messages are always sent out when pending,
before we might GC a unit/job.

This is kinda a follow-up for 8db9989,
and a similar logic really applies: GC should only be done if we
processed everything else, generated evertyhing else and really don't
need it anymore.

(cherry picked from commit af05bb9)

Related: RHEL-55301
set -o pipefail

# shellcheck source=test/units/util.sh
. "$(dirname "$0")"/util.sh

Check notice

Code scanning / shellcheck

Not following: test/units/util.sh: openBinaryFile: does not exist (No such file or directory) Note test

Not following: test/units/util.sh: openBinaryFile: does not exist (No such file or directory)
@github-actions github-actions bot changed the title Don't GC unit if it is in another queue (RHEL-55301) Don't GC unit if it is in another queue Sep 10, 2024
@github-actions github-actions bot added tracker/unapproved Formerly needs-acks pr/needs-ci Formerly needs-ci pr/needs-review Formerly needs-review labels Sep 10, 2024
Copy link

github-actions bot commented Sep 10, 2024

Commit validation

Tracker - RHEL-55301

The following commits meet all requirements

commit upstream
b17b8d4 - core: Don't GC unit if it is in cgroup_empty_queue systemd/systemd@8db9989
030dbbd - core: Handle cgroup pruning in on_cgroup_empty_event systemd/systemd@380dd17
e0336a0 - Fix failing test systemd/systemd@fc6172b
c42321e - unit: don't gc unit in oom queue systemd/systemd@935f804
c28ae70 - core: do not GC units/jobs that are in the D-Bus queue systemd/systemd@af05bb9

Tracker validation

Failed

🔴 Tracker RHEL-55301 is missing severity

Success

🟢 Tracker RHEL-55301 has set desired product: CentOS Stream 9
🟢 Tracker RHEL-55301 has set desired component: systemd
🟢 Tracker RHEL-55301 has been approved


Pull Request validation

Failed

🔴 Failed or pending checks - ci (centos, 9)[failure],Differential ShellCheck[failure]
🔴 Review - Missing review from a member (1 required)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/needs-ci Formerly needs-ci pr/needs-review Formerly needs-review tracker/missing-severity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants