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

Revert "TEST-19-CGROUP: Skip on opensuse" #32562

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

Conversation

Werkov
Copy link
Contributor

@Werkov Werkov commented Apr 29, 2024

This reverts commit 60d064d.

systemd-run --wait --unit=test-0.service --property=DynamicUser=1 --property=Delegate= test -w /sys/fs/cgroup/system.slice/test-0.service/ -a -w /sys/fs/cgroup/system.slice/test-0.service/memory.oom.group

is suspicious as it only relies on test-0.service:MemoryAccounting=yes (or anything that enables memory controller in test-0.service) which isn't set on openSUSE.

Draft PR to troubleshoot the test.

Ref: #32439

@github-actions github-actions bot added the tests label Apr 29, 2024
Copy link

Important

An -rc1 tag has been created and a release is being prepared, so please note that PRs introducing new features and APIs will be held back until the new version has been released.

@DaanDeMeyer
Copy link
Contributor

@Werkov With meson from git you can debug locally with something like follows:

../meson/meson.py compile -C build mkosi && SYSTEMD_INTEGRATION_TESTS=1 ../meson/meson.py test -C build --no-rebuild -i TEST-19-CGROUP

When the test used to be run on distro that doesn't enable memory
accounting by default (such as openSUSE TW), there is no guarantee that
testing unit has memory.* cgroup attributes and delegation test would
fail if they are missing.

Require memory controller explicitly inside the unit so that test can
work in any environment.
This reverts commit 60d064d.

The logged test failure was because of missing memory controller in
testing cgroup. With the test fixed in previous commit, memory
attributes are delegated as expected.

Ref: systemd#32439
@Werkov Werkov closed this May 23, 2024
@Werkov Werkov reopened this May 23, 2024
@Werkov
Copy link
Contributor Author

Werkov commented May 23, 2024

(The force push is only rebase on current main, it closed PR accidentaly.)

Thanks for the tip about local runs. As dictated by Murphy's law, the test didn't fail when I ran it locally. Nevertheless, the fix for the test is still valid and should prevent future failures of TEST-19-CGROUP.delegate.sh.

The reason for not failing in my environment is that something kept memory in system.slice's enabled_mask and thus the test unit had unwittingly memory controller enabled and the test passed.

That's a different issue and I'm only sending delegate test inclusion again here.

(It looks like system.slice retained memory controller because of systemd-oomd.service's MemoryLow= setting although the oomd service was not running, i.e. not realized. I suspect 9cc5454 may have subtly change caching of the masks. If I have isolated reproducer, I will file a separate issue for that.)

@Werkov Werkov marked this pull request as ready for review May 23, 2024 16:18
@github-actions github-actions bot added the please-review PR is ready for (re-)review by a maintainer label May 23, 2024
@Werkov
Copy link
Contributor Author

Werkov commented May 23, 2024

future failures of TEST-19-CGROUP.delegate.sh.

The actual issues that I saw in CI logged artifacts were due to memory controller. The device mapper message was either a red herring or another issue.

@Werkov
Copy link
Contributor Author

Werkov commented May 24, 2024

(TEST-64-UDEV-STORAGE-mdadm_basic failed in CI, passes locally. It have timed out, lets's see how deterministic it is.
E: 2nd re-run passes.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please-review PR is ready for (re-)review by a maintainer tests
Development

Successfully merging this pull request may close these issues.

None yet

2 participants