Bug #38290
py2/py3 incompatibilities with set()
0%
Description
Executed:
ceph-volume lvm batch --bluestore /dev/vdb --wal-devices /dev/vdc --db-devices /dev/vde
on python=3.6.5
--> TypeError: unhashable type: 'Device'
File "/usr/lib/python3.6/site-packages/ceph_volume-1.0.0-py3.6.egg/ceph_volume/devices/lvm/strategies/bluestore.py", line 434, in _validate_db_devs
self.blank_db_devs = set(self.db_or_journal_devs).difference(vg_members)
TypeError: unhashable type: 'Device
self.blank_db_devs = set(self.db_or_journal_devs).difference(..
set(self.db_or_journal_devs)
TypeError: unhashable type: 'Device'
(Pdb) type(self.db_or_journal_devs)
<class 'list'>
(Pdb) self.db_or_journal_devs0
<Raw Device: /dev/vde>
When used with python2:
import ceph_volume.util.device as dv
set([dv.Device('/dev/vdb')])
set([<Raw Device: /dev/vdb>])
History
#1 Updated by Jan Fajerski about 5 years ago
#2 Updated by Rishabh Dave over 4 years ago
Perhaps we should close this ticket since PR #26399 has merged?
#3 Updated by Jan Fajerski over 4 years ago
- Status changed from New to Resolved