Project

General

Profile

Bug #38290

py2/py3 incompatibilities with set()

Added by Joshua Schmid about 5 years ago. Updated over 4 years ago.

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

0%

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

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 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

Also available in: Atom PDF