Skip to content
Success

Changes

Summary

  1. testenv: podman: restart_count in container_name (details)
Commit 6fe837de206c2c927ce44a8d53e1fb377b475937 by Oliver Smith
testenv: podman: restart_count in container_name

When running testsuites with multiple configurations in a row, as it is
the case with the ttcn3-ggsn jobs in jenkins, the podman container gets
restarted whenever switching to the next config.

Use a different name for each container by appending a restart count.
This should fix that podman sometimes didn't fully shutdown the
container yet and complains that the container name is already in use.
This happens even though we use "podman kill" and "podman wait" on the
previous container. When checking later, the container is really gone
and the same name can be used, it seems that it just needs some more
time to shutdown in some cases.

Fix for:
> Error: error creating container storage: the container name
> "testenv-ggsn_tests-osmo_ggsn_-osmocom-nightly-20241012-0752-2eb85125" is
> already in use by "8b7ea42371a922ffbf4e966b853124b98cd25c9905ae443fefb4115a103d7779".
> You have to remove that container to be able to reuse that name.: that name is already in use

Related: https://github.com/containers/podman/issues/2553
Related: https://jenkins.osmocom.org/jenkins/job/ttcn3-ggsn-test/2674/console
Change-Id: Ia791be2fee69765293ce7a7a058319c92bb92714
The file was modified_testenv/testenv/podman.py