Project

General

Profile

Actions

Bug #15450

closed

ceph-disk: PrepareData::set_data_partition invalid check

Added by Loïc Dachary about 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

https://github.com/ceph/ceph/pull/8508/commits/877004350668d349de98243f0499c042d73eddcf

commit 877004350668d349de98243f0499c042d73eddcf
Author: youji <youji@ebay.com>
Date:   Fri Apr 8 07:16:04 2016 -0700

    ceph-disk: fix set_data_partition() when data is partition.

    Signed-off-by: You Ji <youji@ebay.com>

diff --git a/src/ceph-disk/ceph_disk/main.py b/src/ceph-disk/ceph_disk/main.py
index d0ec596..c13cda4 100755
--- a/src/ceph-disk/ceph_disk/main.py
+++ b/src/ceph-disk/ceph_disk/main.py
@@ -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)))
Actions #1

Updated by Loïc Dachary about 8 years ago

  • Status changed from 12 to In Progress
Actions #2

Updated by Loïc Dachary about 8 years ago

  • Priority changed from Urgent to High

While the PR is merged and obviously correct, there needs to be a test covering the lines that were missed, reason why this issue is not resolved.

Actions #3

Updated by Loïc Dachary about 8 years ago

  • Status changed from In Progress to 17
Actions #4

Updated by Loïc Dachary over 7 years ago

  • Assignee deleted (Loïc Dachary)
Actions #5

Updated by Samuel Just over 7 years ago

  • Status changed from 17 to Resolved
Actions

Also available in: Atom PDF