docker-rm: check if rpm dependency is actually installed
If the deployment wasn't deployed under Docker, python2-docker package
is missing. Therefore, during the upgrade we don't want to try to remove
the containers under Docker, since they don't exist anyway.
python2-docker is needed by Ansible to remove the containers, so let's
make sure the package is installed, which is the case when the
deployment was under Docker.
If the rpm doesn't exist, we'll skip the tasks and don't try to remove
the containers.
The main case where docker-rm is useful is when upgrading on centos7
from rocky to stein, since we clear containers running in Docker during
the upgrade, so they run on Podman.
In reality, the future platform won't have Docker installed, so this
role will become useless and we'll probably deprecate it.
Reviewed: https:/ /review. opendev. org/651789 /git.openstack. org/cgit/ openstack/ tripleo- common/ commit/ ?id=e368e15226b 18d6f75b0ffaca4 24ce4cb574b2a4
Committed: https:/
Submitter: Zuul
Branch: master
commit e368e15226b18d6 f75b0ffaca424ce 4cb574b2a4
Author: Emilien Macchi <email address hidden>
Date: Thu Apr 11 09:57:00 2019 -0400
docker-rm: check if rpm dependency is actually installed
If the deployment wasn't deployed under Docker, python2-docker package
is missing. Therefore, during the upgrade we don't want to try to remove
the containers under Docker, since they don't exist anyway.
python2-docker is needed by Ansible to remove the containers, so let's
make sure the package is installed, which is the case when the
deployment was under Docker.
If the rpm doesn't exist, we'll skip the tasks and don't try to remove
the containers.
The main case where docker-rm is useful is when upgrading on centos7
from rocky to stein, since we clear containers running in Docker during
the upgrade, so they run on Podman.
In reality, the future platform won't have Docker installed, so this
role will become useless and we'll probably deprecate it.
Closes-Bug: #1824301 e3806e18b09e034 af2290bfb56
Change-Id: Ic5036ffa756775