Project

General

Profile

Bug #37595

device_id function causes breakage when trying to format

Added by Alfredo Deza 7 months ago. Updated 7 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
12/11/2018
Due date:
% Done:

0%

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

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)

History

#1 Updated by Alfredo Deza 7 months ago

  • Status changed from New to In Progress

#2 Updated by Alfredo Deza 7 months ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF