Browse Source

Merge "Fix idempotency on RHEL8" into stable/stein

tags/4.5.1
Zuul 3 weeks ago
parent
commit
0ebaf833d0
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      paunch/builder/base.py

+ 3
- 1
paunch/builder/base.py View File

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

Loading…
Cancel
Save