]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume tests.functional set root:root in OSDs in filestore
authorAlfredo Deza <adeza@redhat.com>
Mon, 10 Dec 2018 19:52:03 +0000 (14:52 -0500)
committerAlfredo Deza <adeza@redhat.com>
Thu, 3 Jan 2019 19:33:53 +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 503396f685f6a93e0c63e97477677b7145f96c26)

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

index 56592e335737e06efb2f98da710ab0e0a0ec94b7..8937df6fa1cac5ffb8a59057144400dc50f49121 100644 (file)
       environment:
         CEPH_VOLUME_DEBUG: 1
 
+    - name: find all OSD paths
+      find:
+        paths: /var/lib/ceph/osd
+        recurse: no
+        file_type: directory
+      register: osd_paths
+
+    # set all OSD paths to root:rootto ensure that the OSD will be able to
+    # activate regardless
+    - name: mangle permissions to root
+      file:
+        path: "{{ item.path }}"
+        owner: root
+        group: root
+        recurse: yes
+      with_items:
+        - "{{ osd_paths.files }}"
+
     - name: activate all to start the previously prepared osd.0
       command: "ceph-volume lvm activate --filestore --all"
       environment: