-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19107 from ricardobranco777/poo158697
containers: Apply workaround for podman upstream tests
- Loading branch information
Showing
1 changed file
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ use transactional qw(trup_call check_reboot_changes); | |
use registration qw(add_suseconnect_product get_addon_fullname); | ||
use containers::common; | ||
use Utils::Architectures qw(is_x86_64 is_aarch64); | ||
use Utils::Systemd qw(systemctl); | ||
|
||
my $test_dir = "/var/tmp"; | ||
my $podman_version = ""; | ||
|
@@ -82,6 +83,16 @@ sub run { | |
# 1. Use netavark instead of cni | ||
# 2. Avoid default mounts for containers | ||
# 3. Switch to cgroups v2 | ||
|
||
# Required modifications to make cgroups v2 work on SLES<15-SP6. | ||
# See https://susedoc.github.io/doc-sle/main/html/SLES-tuning/cha-tuning-cgroups.html#sec-cgroups-user-sessions | ||
if (is_sle('<15-SP6') || is_leap('<15.6')) { | ||
assert_script_run "mkdir /etc/systemd/system/[email protected]/"; | ||
assert_script_run 'echo -e "[Service]\nDelegate=pids memory" > /etc/systemd/system/[email protected]/60-delegate.conf'; | ||
systemctl "daemon-reload"; | ||
systemctl "--user daemon-reexec"; | ||
} | ||
|
||
assert_script_run "podman system reset -f"; | ||
if (is_transactional) { | ||
trup_call "run rm -vf /etc/containers/mounts.conf /usr/share/containers/mounts.conf"; | ||
|