Sync charms.ceph

Sync charms.ceph to pick up fix for LP #1851869

Change-Id: Ie3027d030c71faec0108fcde7fdd624b29623d49
Closes-Bug: #1851869
Partial-Bug: #1879464
This commit is contained in:
Liam Young 2020-05-19 08:18:36 +00:00
parent 8499123077
commit 59160b0815
1 changed files with 7 additions and 3 deletions

View File

@ -1139,8 +1139,9 @@ osd_upgrade_caps = collections.OrderedDict([
])
rbd_mirror_caps = collections.OrderedDict([
('mon', ['profile rbd']),
('mon', ['profile rbd; allow r']),
('osd', ['profile rbd']),
('mgr', ['allow r']),
])
@ -1481,11 +1482,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 +1958,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()))