]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume lvm.activate always chown osd path before osd-prime-dir in bluestore
authorAlfredo Deza <adeza@redhat.com>
Mon, 10 Dec 2018 18:27:20 +0000 (13:27 -0500)
committerAlfredo Deza <adeza@redhat.com>
Tue, 11 Dec 2018 13:28:04 +0000 (08:28 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/devices/lvm/activate.py

index acebfe123b6bb8a92a1b8baadf6820a14c2826b9..afb7c668bba364c3c1e5357d85dd98f51e508d2a 100644 (file)
@@ -151,7 +151,10 @@ def activate_bluestore(lvs, no_systemd=False):
     db_device_path = get_osd_device_path(osd_lv, lvs, 'db', dmcrypt_secret=dmcrypt_secret)
     wal_device_path = get_osd_device_path(osd_lv, lvs, 'wal', dmcrypt_secret=dmcrypt_secret)
 
-    # Once symlinks are removed, the osd dir can be 'primed again.
+    # Once symlinks are removed, the osd dir can be 'primed again. chown first,
+    # regardless of what currently exists so that ``prime-osd-dir`` can succeed
+    # even if permissions are somehow messed up
+    system.chown(osd_path)
     prime_command = [
         'ceph-bluestore-tool', '--cluster=%s' % conf.cluster,
         'prime-osd-dir', '--dev', osd_lv_path,