]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: fix set_data_partition() when data is partition.
authoryouji <youji@ebay.com>
Fri, 8 Apr 2016 14:16:04 +0000 (07:16 -0700)
committeryouji <youji@ebay.com>
Fri, 8 Apr 2016 15:17:43 +0000 (08:17 -0700)
Signed-off-by: You Ji <youji@ebay.com>
src/ceph-disk/ceph_disk/main.py

index d0ec596c2aa43aec2dcb27f7c4d8a24cc02197be..c13cda44df8a35ec9d30f3d4b1fed873b81eff7f 100755 (executable)
@@ -2539,8 +2539,8 @@ class PrepareData(object):
                       self.args.data)
             self.partition = DevicePartition.factory(
                 path=None, dev=self.args.data, args=self.args)
-            ptype = partition.get_ptype()
-            ready = Ptype.get_ready_by_type('osd')
+            ptype = self.partition.get_ptype()
+            ready = Ptype.get_ready_by_name('osd')
             if ptype not in ready:
                 LOG.warning('incorrect partition UUID: %s, expected %s'
                             % (ptype, str(ready)))