tripleo_container_stop has trouble to stop docker containers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
In Progress
|
High
|
Jose Luis Franco |
Bug Description
During the FFU procedure, when upgrading from Queens to Train we have experienced some issues to stop containers in the Queens controllers.
Basically, even though Queens works on docker, the podman alias is already available so you can run any docker command using the podman one. This ends up being a problem when running the tripleo_
# We need to make sure that containers are stopped
# as we might have different CLIs to interact with
# them. I.e the container_cli might be setted to be podman
# but we might have the containers running with docker.
set -eu
if command -v podman && podman exec {{ container }} /bin/true; then
if systemctl status {{ container }}.service; then
else
podman kill {{ container }}
fi
fi
if type docker &> /dev/null && docker exec {{ container }} /bin/true; then
docker stop {{ container }}
fi
According to this code, even though the container engine runnig is docker, as podman exists it will go via that path, ending the container with a "podman kill {{ container}}" while the right way to
stop the container would be with a "docker stop {{ container }}"
The problems we are seeing are the following:
2020-08-26 08:41:36,766 p=20536 u=mistral n=ansible | changed: [undercloud -> 192.168.24.42] => (item=controller-1) => {"ansible_
And if tried to kill the container manually with "podman kill <container>" the command hangs..while doing a "docker stop <container>" succeeds.
Fix proposed to branch: master /review. opendev. org/748270
Review: https:/