]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume tests.functional set root:root in OSDs in bluestore
authorAlfredo Deza <adeza@redhat.com>
Mon, 10 Dec 2018 19:38:02 +0000 (14:38 -0500)
committerAlfredo Deza <adeza@redhat.com>
Thu, 3 Jan 2019 19:33:52 +0000 (14:33 -0500)
To make sure that ceph-volume will be able to set the right permissions
when trying to activate

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 98631fdeeb6dbe765d3eb80c5c1800946735f2a2)

src/ceph-volume/ceph_volume/tests/functional/lvm/playbooks/test_bluestore.yml

index 1828a1525aac3192bfc5ce24bde288ef65d3f257..353df127cb75addcbc9ec1ace272b6bb795b67b3 100644 (file)
       environment:
         CEPH_VOLUME_DEBUG: 1
 
+    - name: find all OSD directories
+      find:
+        paths: /var/lib/ceph/osd
+        recurse: no
+        file_type: directory
+      register: osd_directories
+
+    - name: find all OSD symlinks
+      find:
+        paths: /var/lib/ceph/osd
+        recurse: yes
+        depth: 2
+        file_type: link
+      register: osd_symlinks
+
+    # set the OSD dir and the block/block.db links to root:root permissions, to
+    # ensure that the OSD will be able to activate regardless
+    - file:
+        path: "{{ item.path }}"
+        owner: root
+        group: root
+      with_items:
+        - "{{ osd_directories.files }}"
+
+    - file:
+        path: "{{ item.path }}"
+        owner: root
+        group: root
+      with_items:
+        - "{{ osd_symlinks.files }}"
+
     - name: activate all to start the previously prepared osd.0
       command: "ceph-volume lvm activate --all"
       environment: