containers: Add migration module to support container upgrades#25058
containers: Add migration module to support container upgrades#25058ricardobranco777 wants to merge 2 commits intoos-autoinst:masterfrom
Conversation
603eaa0 to
1692699
Compare
4666e9b to
620b351
Compare
| } | ||
|
|
||
| assert_script_run "rpm -qa | sort > /tmp/before", timeout => 180; | ||
| upgrade; |
There was a problem hiding this comment.
I'd split this part into two test modules (e.g. container_update_prepare.pm and container_update_validate.pm) such that we can integrate this into various workflows.
On O3 we probably can lean on https://openqa.opensuse.org/tests/5774085 and transactional/tdup and on SLES we can use patch_and_reboot.pm. I think this is needed to avoid that we have to duplicate an upgrade subroutine for every workflow we want this to integrate into the future.
There was a problem hiding this comment.
I'm open to the idea but note that we call validate() after setting up the compose project and then again after upgrade. What about parameterizing this module and call this upgrade only if TEST_REPOS is set?
f55dfa8 to
4eaa3ee
Compare
f871f40 to
89a176e
Compare
|
LGTM |
89a176e to
f52d13d
Compare
f52d13d to
213df83
Compare
danishprakash
left a comment
There was a problem hiding this comment.
LGTM; a few non-blocking comments.
| # Needed to avoid this error on SLES 15-SP7: | ||
| # File /usr/share/containers/mounts.conf from install of | ||
| # libcontainers-common-20260112-bp157.3.1.noarch (Virtualization:containers (15.7)) | ||
| # conflicts with file from package libcontainers-sles-mounts-20240408-150600.1.1.noarch (@System) |
There was a problem hiding this comment.
Shouldn't zypper do the right thing and prefer libcontainers-sles-mounts over the standard mounts.conf? If not, then this might be a bug.
| my ($runtime, $rootless) = @_; | ||
| my $opts = $rootless ? "--user" : ""; | ||
|
|
||
| script_run "$runtime compose down"; |
There was a problem hiding this comment.
Should we add a timeout here?
|
|
||
| if ($runtime eq "docker") { | ||
| assert_script_run "dockerd-rootless-setuptool.sh install" if $rootless; | ||
| systemctl "$opts enable --now docker"; |
There was a problem hiding this comment.
Just so that I understand, you're using enable for Docker because it's the right thing to do, or does this affect this test functionally? I would assume in an ephemeral environment like this, both start and enable --now would more or less be the same thing.
Add migration module to support testing container runtime upgrades.
This tests uses docker-compose to set up a project with 2 containers with 2 networks and one volume, upgrades the container packages, restarts the service, and checks everything is ok.
The tests are run for both podman & docker, as root & rootless.
Related ticket: https://progress.opensuse.org/issues/183512
Verification runs:
Notes
TEST_REPOSset to https://download.opensuse.org/repositories/Virtualization:/containers/