]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests: Add more smarts when creating a container
authorTom Hromatka <tom.hromatka@oracle.com>
Wed, 17 Jul 2024 19:06:49 +0000 (13:06 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 17 Jul 2024 21:15:53 +0000 (15:15 -0600)
If lxc returns 'Instance is busy running a "create" operation', the
container was successfully created but it's not yet fully running.  Call
this a success as future operations will succeed once the container has
fully started.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
tests/ftests/container.py

index a54f6a3a4ddb7aa39c2cbddd52c17b7455b19ec7..594c73e9c48d6ecf5f76e05fc9d9ed11a664d13c 100644 (file)
@@ -102,6 +102,9 @@ class Container(object):
         try:
             Run.run(cmd)
             q.put(True)
+        except RunError as re:
+            if re.stderr.find('Instance is busy running a "create" operation') >= 0:
+                q.put(True)
         except Exception:  # noqa: E722
             q.put(False)
         except BaseException:  # noqa: E722