action #155857
open
Create podman migration scenario
Added by ph03nix 5 months ago.
Updated about 2 months ago.
Description
We need to establish a new migration scenario to check if existing podman
container can be migrated from one SLEM version to the next one.
Our current test design doesn't allow this, because in each test module we create resources and also delete them. We need a new scenario, in which we have a preparation and a validation test module. The purpose is to generate podman containers, validate them, perform the migration and then validate them again.
Test scenario¶
- Generate two new test modules:
testenv_prepare
and testenv_validate
- In
testenv_prepare
we should generate some containers using the existing system configuration. e.g. A single Tumbleweed container and a pod consisting of two containers, which depend on each other
- In
testenv_validate
we check, if the expected containers and pods are present, and if they are functioning
The idea is that one can create different scenarios using those two test modules, e.g.
- Installation
testenv_prepare
testenv_validate
But also a migration scenario like
- Installation
testenv_prepare
testenv_validate
- System update/System migration
testenv_validate
Acceptance criteria¶
- Generate the test modules according to the plan above
- Integrate the new test modules in O3 - The
container-host2microosnext
scenario would be a good candidate
This is a good ticket for a squad rotation candidate. I'm blocking it until further notice.
- Assignee set to dvenkatachala
We'll reserve this ticket for @dvenkatachala during her squad rotation program, as this is IMHO a good learning project.
- Status changed from Blocked to In Progress
Unblocking ticket, as Dee joined our squad.
I manually created and ran a Tumbleweed container in SLE Micro 5.5 and migrated it to SLE Micro 6.0. Afterwards, I validated the container's status. I configured the container to start automatically as a systemd service. After the migration, I ensured that the container was running and validated its status.
Container creation.
localhost:~ # podman image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
registry.opensuse.org/opensuse/tumbleweed latest 2f7e3aae2e12 36 hours ago 143 MB
localhost:~ # podman create --name tumbleweed_container_test registry.opensuse.org/opensuse/tumbleweed sleep infinity
099d7f272a4bfd6a2f167bd064034ea5074f712d4cd19d5bf287bbb5a4a5e2de
localhost:~ # podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
099d7f272a4b registry.opensuse.org/opensuse/tumbleweed:latest sleep infinity 22 seconds ago Up 3 seconds tumbleweed_container_test
localhost:~ # podman container inspect --format='{{.State.Running}}' tumbleweed_container_test
true
localhost:~ # podman inspect -f '{{.NetworkSettings.IPAddress}}' tumbleweed_container_test
10.88.0.2
Configure the container to start automatically as a systemd service.
localhost:~ # podman generate systemd --new --files --name tumbleweed_container_test
/root/container-tumbleweed_container_test.service
localhost:~ # cp container-tumbleweed_container_test.service /etc/systemd/system
localhost:~ # systemctl start container-tumbleweed_container_test.service
localhost:~ # systemctl enable container-tumbleweed_container_test.service
Created symlink /etc/systemd/system/default.target.wants/container-tumbleweed_container_test.service → /etc/systemd/system/container-tumbleweed_container_test.service.
localhost:~ # podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f5a7a407df10 registry.opensuse.org/opensuse/tumbleweed:latest sleep infinity 3 minutes ago Up 3 minutes tumbleweed_container_test
localhost:~ # systemctl stop container-tumbleweed_container_test.service
localhost:~ # podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Validate the status of the Podman Tumbleweed container after migrating it to SLE Micro 6.0.
ocalhost login: root
Password:
Last login: Fri Apr 5 09:05:44 UTC 2024 on ttyS0
Activate the web console with: systemctl enable --now cockpit.socket
Have a lot of fun...
localhost:~ # podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
81f90c282f2a registry.opensuse.org/opensuse/tumbleweed:latest sleep infinity 14 seconds ago Up 15 seconds tumbleweed_container_test
localhost:~ #
Now the next plan is to continue automation with the above steps and later extend the podman container part to pods.
dvenkatachala wrote in #note-5:
Now the next plan is to continue automation with the above steps and later extend the podman container part to pods.
This is great! I think you could attempt to simplify the setup by modifying the systemd unit in such a way, that you don't need anything else. I mean that on a fresh system you only need to deploy a systemd unit to /etc/systemd/system
, start the unit and the unit creates and destroys the required containers itself?
I have verified the creation of a single Tumbleweed container in SLE-5.5 Micro and ensured the container is running after migrating from SLE-5.5 Micro to SLE-6.0 Micro.
http://deepthi-openqa.qe.suse.de/tests/6857
I will follow up with Felix for further progress .
The current state looks already very good! We agreed to prepare a first PR by extending the current container test by a network check. This means that the container needs to publish a port and provide a testable service, that we can check. e.g. a webserver where we could fetch a predefined website and verify if the expected site (or identifiable parts of it) is being delivered.
- Status changed from In Progress to Feedback
When you see that is stable, let us know so we can add it to our test coverage for review. Where this will be if it is already in GMC, in maintenance?
JERiveraMoya wrote in #note-12:
When you see that is stable, let us know so we can add it to our test coverage for review. Where this will be if it is already in GMC, in maintenance?
Currently this is still a prototype.
I remember the agreement was that for SLEM 5.5 -> 6.0 this is going to be tested manually, no?
- Tags set to slem
- Project changed from 216 to Containers
- Status changed from Feedback to In Progress
- Assignee changed from dvenkatachala to etchubykalo
Hey @etchubykalo, what is the status of this ticket? Are there any updates in the meantime or are you blocked somehow?
Also available in: Atom
PDF