Project

General

Profile

Bug #38290

py2/py3 incompatibilities with set()

Added by Joshua Schmid 6 months ago. Updated 6 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
Start date:
02/13/2019
Due date:
% Done:

0%

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

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

#2 Updated by Rishabh Dave 6 days ago

Perhaps we should close this ticket since PR #26399 has merged?

Also available in: Atom PDF