Sync helpers for 20.05
Change-Id: I695760d4319b8c5c01ad0fd54d6c8d7d1d2633f8
This commit is contained in:
parent
8499123077
commit
e43b5e6562
@ -1481,11 +1481,11 @@ def get_devices(name):
|
||||
:returns: Set(device names), which are strings
|
||||
"""
|
||||
if config(name):
|
||||
devices = [l.strip() for l in config(name).split(' ')]
|
||||
devices = [dev.strip() for dev in config(name).split(' ')]
|
||||
else:
|
||||
devices = []
|
||||
storage_ids = storage_list(name)
|
||||
devices.extend((storage_get('location', s) for s in storage_ids))
|
||||
devices.extend((storage_get('location', sid) for sid in storage_ids))
|
||||
devices = filter(os.path.exists, devices)
|
||||
|
||||
return set(devices)
|
||||
@ -1957,6 +1957,9 @@ def _allocate_logical_volume(dev, lv_type, osd_fsid,
|
||||
vg_name = None
|
||||
if not lvm.is_lvm_physical_volume(pv_dev):
|
||||
lvm.create_lvm_physical_volume(pv_dev)
|
||||
if not os.path.exists(pv_dev):
|
||||
# NOTE: trigger rescan to work around bug 1878752
|
||||
rescan_osd_devices()
|
||||
if shared:
|
||||
vg_name = 'ceph-{}-{}'.format(lv_type,
|
||||
str(uuid.uuid4()))
|
||||
|
5
tox.ini
5
tox.ini
@ -41,6 +41,11 @@ basepython = python3.7
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:py38]
|
||||
basepython = python3.8
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:py3]
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
|
Loading…
Reference in New Issue
Block a user