]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: simple scan should ignore tmpfs 36953/head
authorAndrew Schoen <aschoen@redhat.com>
Fri, 4 Sep 2020 14:44:49 +0000 (09:44 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 4 Sep 2020 14:56:34 +0000 (09:56 -0500)
When simple scan is ran against a ceph-volume
OSD, util.encryption.legacy_encrypted returns
tmpfs. We want to avoid creating a Device
object with tmpfs and ignore the OSD as it's
not a ceph-disk created OSD.

Resolves: rhbz#1872983

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit ff4b7bfa573e95acf4cdc01ccf2881f0935e91d6)

src/ceph-volume/ceph_volume/devices/simple/scan.py

index 0f83b37ef440ee489376740674c55172ab1dfb23..34da0962b0fc8639cc6bc095c8e29f169ffe1e35 100644 (file)
@@ -375,8 +375,11 @@ class Scan(object):
             self.encryption_metadata = encryption.legacy_encrypted(args.osd_path)
             self.is_encrypted = self.encryption_metadata['encrypted']
 
-            device = Device(self.encryption_metadata['device'])
-            if not device.is_ceph_disk_member:
-                terminal.warning("Ignoring %s because it's not a ceph-disk created osd." % path)
+            if self.encryption_metadata['device'] != "tmpfs":
+                device = Device(self.encryption_metadata['device'])
+                if not device.is_ceph_disk_member:
+                    terminal.warning("Ignoring %s because it's not a ceph-disk created osd." % path)
+                else:
+                    self.scan(args)
             else:
-                self.scan(args)
+                terminal.warning("Ignoring %s because it's not a ceph-disk created osd." % path)