Ensure that links are followed during upgrade
When upgrading mon and osd units, ensure that symlinks are followed to ensure that directory based OSD's are upgraded correctly (which are typically a symlink from /var/lib/ceph/osd/X -> actual_dir). Change-Id: I7656bbc633b9706bd406dbca0f11fe6108916a02 Partial-Bug: 1611082
This commit is contained in:
parent
1e60cf0fbe
commit
9c707f166a
|
@ -1433,7 +1433,8 @@ def upgrade_monitor(new_version):
|
|||
# Ensure the ownership of Ceph's directories is correct
|
||||
chownr(path=os.path.join(os.sep, "var", "lib", "ceph"),
|
||||
owner=ceph_user(),
|
||||
group=ceph_user())
|
||||
group=ceph_user(),
|
||||
follow_links=True)
|
||||
if systemd():
|
||||
for mon_id in get_local_mon_ids():
|
||||
service_start('ceph-mon@{}'.format(mon_id))
|
||||
|
@ -1611,7 +1612,8 @@ def upgrade_osd(new_version):
|
|||
# Ensure the ownership of Ceph's directories is correct
|
||||
chownr(path=os.path.join(os.sep, "var", "lib", "ceph"),
|
||||
owner=ceph_user(),
|
||||
group=ceph_user())
|
||||
group=ceph_user(),
|
||||
follow_links=True)
|
||||
if systemd():
|
||||
for osd_id in get_local_osd_ids():
|
||||
service_start('ceph-osd@{}'.format(osd_id))
|
||||
|
|
|
@ -111,7 +111,8 @@ class UpgradeRollingTestCase(unittest.TestCase):
|
|||
])
|
||||
chownr.assert_has_calls(
|
||||
[
|
||||
call(group='ceph', owner='ceph', path='/var/lib/ceph')
|
||||
call(group='ceph', owner='ceph', path='/var/lib/ceph',
|
||||
follow_links=True)
|
||||
]
|
||||
)
|
||||
|
||||
|
|
|
@ -98,7 +98,8 @@ class UpgradeRollingTestCase(unittest.TestCase):
|
|||
)
|
||||
chownr.assert_has_calls(
|
||||
[
|
||||
call(group='ceph', owner='ceph', path='/var/lib/ceph')
|
||||
call(group='ceph', owner='ceph', path='/var/lib/ceph',
|
||||
follow_links=True)
|
||||
]
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue