Project

General

Profile

Actions

Bug #37595

closed

device_id function causes breakage when trying to format

Added by Alfredo Deza over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

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

Description

[root@osd0 vagrant]# CEPH_VOLUME_DEBUG=1 ceph-volume lvm batch --bluestore --report /dev/sdb
usage: ceph-volume lvm batch [-h] [--bluestore] [--filestore] [--report]
                             [--yes] [--format {json,pretty}] [--dmcrypt]
                             [--crush-device-class CRUSH_DEVICE_CLASS]
                             [--no-systemd]
                             [--osds-per-device OSDS_PER_DEVICE]
                             [--block-db-size BLOCK_DB_SIZE]
                             [--journal-size JOURNAL_SIZE] [--prepare]
 ceph-volume lvm batch: error: argument DEVICES: invalid <ceph_volume.util.arg_validators.ValidDevice object at 0x7f68072497d0> value: '/dev/sdb'

The error is eaten up by argparse:

>>> from ceph_volume.util import device
>>> device.Device('/dev/sdb')
 Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/ceph_volume/util/device.py", line 92, in __init__
    self.device_id = self._get_device_id()
  File "/usr/lib/python2.7/site-packages/ceph_volume/util/device.py", line 198, in _get_device_id
    dev_id = '_'.join(p['ID_MODEL'], p['ID_SERIAL_SHORT'])
TypeError: join() takes exactly one argument (2 given)
Actions #1

Updated by Alfredo Deza over 5 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Alfredo Deza over 5 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF