Comment 0 for bug 1801939

Revision history for this message
Emilien Macchi (emilienm) wrote :

When upgrading from Docker to Podman, we want to stop the container that runs under Docker first before starting it with Podman. The container will be removed later in THT during upgrade_tasks.

That's the code that we implemented in Paunch:

if self.runner.cont_cmd == 'podman' and self.which('docker'):
    self.runner.stop_container(container, 'docker')

The problem is that it's created a lot of Error logs because runner.stop_container use Error for logging. We should rather test if the container actually is running before trying to stop it or reduce the logging to Warning and put some message so the operators don't report this red herring.

How to reproduce:
1) Deploy a containerized undercloud on Stein, with podman enabled (container_cli = podman in undercloud.conf)

2) See all the Errors like: "Error stopping container: mysql_init_logs".

What we have:
Errors like Error stopping container: mysql_init_logs

What we want:
- No error, maybe a warning but explaining it's because the container was already stopped
- Or only stop the container if it was stopped.

Component: openstack/paunch