]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
misc.get_scratch_devices(): Ignore devtmpfs
authorZack Cerza <zack@redhat.com>
Thu, 4 Aug 2022 19:02:38 +0000 (13:02 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 8 Aug 2022 22:22:47 +0000 (16:22 -0600)
Devices shared with a container by its host will appear in /proc/mounts
this way.

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/misc.py

index 367295c429ae4233c0147c05764336b83187023f..7f630c4b606123a2505016b17cbe7c2fc1522160 100644 (file)
@@ -811,7 +811,11 @@ def get_scratch_devices(remote):
         dev_checks = [
             [['stat', dev], "does not exist"],
             [['sudo', 'dd', 'if=%s' % dev, 'of=/dev/null', 'count=1'], "is not readable"],
-            [[run.Raw('!'), 'mount', run.Raw('|'), 'grep', '-q', dev], "is in use"],
+            [
+                [run.Raw('!'), 'mount', run.Raw('|'), 'grep', '-v', 'devtmpfs', run.Raw('|'),
+                'grep', '-q', dev],
+                "is in use"
+            ],
         ]
         for args, msg in dev_checks:
             try: