Project

General

Profile

Bug #13970

ceph-disk list fails on /dev/cciss!c0d0

Added by Loic Dachary almost 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
Start date:
12/03/2015
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
infernalis
Regression:
Yes
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

Reported by Stolte, Felix

„ceph-disk list“ I get the following Traceback:
 ceph-disk list
Traceback (most recent call last):
  File "/usr/sbin/ceph-disk", line 3576, in <module>
    main(sys.argv[1:])
  File "/usr/sbin/ceph-disk", line 3532, in main
    main_catch(args.func, args)
  File "/usr/sbin/ceph-disk", line 3554, in main_catch
    func(args)
  File "/usr/sbin/ceph-disk", line 2915, in main_list
    devices = list_devices(args)
  File "/usr/sbin/ceph-disk", line 2855, in list_devices
    partmap = list_all_partitions(args.path)
  File "/usr/sbin/ceph-disk", line 545, in list_all_partitions
    dev_part_list[name] = list_partitions(os.path.join('/dev', name))
  File "/usr/sbin/ceph-disk", line 550, in list_partitions
    if is_mpath(dev):
  File "/usr/sbin/ceph-disk", line 433, in is_mpath
    uuid = get_dm_uuid(dev)
  File "/usr/sbin/ceph-disk", line 421, in get_dm_uuid
    uuid_path = os.path.join(block_path(dev), 'dm', 'uuid')
  File "/usr/sbin/ceph-disk", line 416, in block_path
    rdev = os.stat(path).st_rdev
OSError: [Errno 2] No such file or directory: '/dev/cciss!c0d0'

I’m running ceph 9.2 on Ubuntu 14.04.3 LTS on HP Hardware with HP P400 Raidcontroller. 4 Node Cluster (3 of them are Mons), 5-6 OSDs per Node with journals on separate drive.


Related issues

Blocked by Ceph - Bug #13988: new OSD re-using old OSD id fails to boot Resolved 12/05/2015
Copied to Ceph - Backport #14044: infernalis: ceph-disk list fails on /dev/cciss!c0d0 Resolved

Associated revisions

Revision 17430d0c (diff)
Added by Loic Dachary over 3 years ago

ceph-disk: fix regression in cciss devices names

The cciss driver has device paths such as /dev/cciss/c0d1 with a
matching /sys/block/cciss!c0d1. The general case is that whenever a
device name is found in /sys/block, the / is replaced by the !.

When refactoring the ceph-disk list subcommand, this conversion was
overlooked in a few places. All explicit concatenation of /dev with a
device name are replaced with a call to get_dev_name which does the same
but also converts all ! in /.

http://tracker.ceph.com/issues/13970 Fixes: #13970

Signed-off-by: Loic Dachary <>

Revision 22881b16 (diff)
Added by Loic Dachary over 3 years ago

ceph-disk: fix regression in cciss devices names

The cciss driver has device paths such as /dev/cciss/c0d1 with a
matching /sys/block/cciss!c0d1. The general case is that whenever a
device name is found in /sys/block, the / is replaced by the !.

When refactoring the ceph-disk list subcommand, this conversion was
overlooked in a few places. All explicit concatenation of /dev with a
device name are replaced with a call to get_dev_name which does the same
but also converts all ! in /.

http://tracker.ceph.com/issues/13970 Fixes: #13970

Signed-off-by: Loic Dachary <>
(cherry picked from commit a2fd3a535e66b3a2b694cda9c6add33383ccfa4a)

Conflicts:
src/ceph-disk : trivial resolution

History

#1 Updated by Loic Dachary almost 4 years ago

  • Status changed from Verified to In Progress
  • Backport set to infernalis

#2 Updated by Loic Dachary almost 4 years ago

A tentative workaround is to replace in /usr/sbin/ceph-disk

def block_path(dev):
    path = os.path.realpath(dev)

with
def block_path(dev):
    path = get_dev_path(os.path.basename(os.path.realpath(dev)))

#3 Updated by Nathan Cutler almost 4 years ago

Is that exclamation point supposed to be there??

Look at http://man7.org/linux/man-pages/man4/cciss.4.html

The device naming scheme is:

/dev/cciss/c0d0         Controller 0, disk 0, whole device
/dev/cciss/c0d0p1       Controller 0, disk 0, partition 1
/dev/cciss/c0d0p2       Controller 0, disk 0, partition 2
/dev/cciss/c0d0p3       Controller 0, disk 0, partition 3

/dev/cciss/c1d1         Controller 1, disk 1, whole device
/dev/cciss/c1d1p1       Controller 1, disk 1, partition 1
/dev/cciss/c1d1p2       Controller 1, disk 1, partition 2
/dev/cciss/c1d1p3       Controller 1, disk 1, partition 3

#4 Updated by Nathan Cutler almost 4 years ago

nevermind, now I see the email - it comes from /dev/cciss/c0d0 being mapped to /sys/block/cciss!c0d0

#5 Updated by Loic Dachary almost 4 years ago

  • Status changed from In Progress to Need Review

#6 Updated by Loic Dachary almost 4 years ago

  • Status changed from Need Review to Pending Backport

#7 Updated by Loic Dachary almost 4 years ago

  • Copied to Backport #14044: infernalis: ceph-disk list fails on /dev/cciss!c0d0 added

#8 Updated by Loic Dachary almost 4 years ago

  • Status changed from Pending Backport to Need Review

#9 Updated by Loic Dachary almost 4 years ago

  • Regression changed from No to Yes

#10 Updated by Loic Dachary almost 4 years ago

  • Blocked by Bug #14080: ceph-disk: use blkid instead of sgdisk -i added

#11 Updated by Loic Dachary almost 4 years ago

  • Blocked by deleted (Bug #14080: ceph-disk: use blkid instead of sgdisk -i)

#12 Updated by Loic Dachary almost 4 years ago

  • Blocked by Bug #13988: new OSD re-using old OSD id fails to boot added

#13 Updated by Loic Dachary over 3 years ago

  • Status changed from Need Review to Pending Backport

#14 Updated by Nathan Cutler over 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF