Podman: Red herring in Paunch when trying to stop Docker containers

Bug #1801939 reported by Emilien Macchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Thomas Herve

Bug Description

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

Example seen in CI:
http://logs.openstack.org/56/605356/55/check/tripleo-ci-centos-7-undercloud-containers/3ca2118/logs/undercloud/home/zuul/undercloud_install.log.txt.gz#_2018-11-06_11_14_18

tags: added: low-hanging-fruit
description: updated
Changed in tripleo:
assignee: nobody → Rabi Mishra (rabi)
Revision history for this message
Cédric Jeanneret (cjeanner) wrote :

Apparently it's not only when we upgrade from docker to podman - we might see those logs for a standard docker based deploy.

Thomas Herve (therve)
Changed in tripleo:
assignee: Rabi Mishra (rabi) → Thomas Herve (therve)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to paunch (master)

Fix proposed to branch: master
Review: https://review.openstack.org/616216

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to paunch (master)

Reviewed: https://review.openstack.org/616216
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=33042f3ce127551d9bdf43c1c255087a2c55d0d6
Submitter: Zuul
Branch: master

commit 33042f3ce127551d9bdf43c1c255087a2c55d0d6
Author: Thomas Herve <email address hidden>
Date: Wed Nov 7 15:43:07 2018 +0100

    Remove log message when container doesn't exist

    When we upgrade from docker, we stop the container regardless of its
    status, but we don't need to see the message if it doesn't exist. In the
    same vein, when we generate a container name, we don't need logs from
    the inspect calls.

    Change-Id: Ifcbcc3b7d3f0524882fa6a158375b26ca87a08d7
    Closes-Bug: #1801939

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/paunch 4.2.0

This issue was fixed in the openstack/paunch 4.2.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.