Merge "Fix idempotency on RHEL8" into stable/stein

This commit is contained in:
Zuul 2019-08-29 04:26:49 +00:00 committed by Gerrit Code Review
commit 0ebaf833d0
1 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@
import distutils.spawn import distutils.spawn
import json import json
import os
import re import re
import shutil import shutil
import tenacity import tenacity
@ -67,7 +68,8 @@ class BaseBuilder(object):
# container that runs under Docker first before starting it with # container that runs under Docker first before starting it with
# Podman. The container will be removed later in THT during # Podman. The container will be removed later in THT during
# upgrade_tasks. # upgrade_tasks.
if self.runner.cont_cmd == 'podman' and self.which('docker'): if self.runner.cont_cmd == 'podman' and \
os.path.exists('/var/run/docker.sock'):
self.runner.stop_container(container, 'docker', quiet=True) self.runner.stop_container(container, 'docker', quiet=True)
self.log.debug("Apply action {} for container {}.".format( self.log.debug("Apply action {} for container {}.".format(