Skip to content

Commit d118c03

Browse files
committed
misc.get_scratch_devices(): Ignore devtmpfs
Devices shared with a container by its host will appear in /proc/mounts this way. Signed-off-by: Zack Cerza <[email protected]>
1 parent e5a10eb commit d118c03

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

teuthology/misc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,11 @@ def get_scratch_devices(remote):
811811
dev_checks = [
812812
[['stat', dev], "does not exist"],
813813
[['sudo', 'dd', 'if=%s' % dev, 'of=/dev/null', 'count=1'], "is not readable"],
814-
[[run.Raw('!'), 'mount', run.Raw('|'), 'grep', '-q', dev], "is in use"],
814+
[
815+
[run.Raw('!'), 'mount', run.Raw('|'), 'grep', '-v', 'devtmpfs', run.Raw('|'),
816+
'grep', '-q', dev],
817+
"is in use"
818+
],
815819
]
816820
for args, msg in dev_checks:
817821
try:

0 commit comments

Comments
 (0)