]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-docker: fix bootstrap directories permissions 1345/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 3 Mar 2017 13:58:56 +0000 (14:58 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 22 Mar 2017 10:18:56 +0000 (11:18 +0100)
Make bootstrap directories permissions work for both RedHat and Debian
os families.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Fix: #1338

group_vars/docker-commons.yml.sample
roles/ceph-docker-common/defaults/main.yml
roles/ceph-docker-common/tasks/main.yml
roles/ceph-mds/tasks/docker/dirs_permissions.yml
roles/ceph-mon/tasks/docker/dirs_permissions.yml
roles/ceph-nfs/tasks/docker/dirs_permissions.yml
roles/ceph-osd/tasks/docker/dirs_permissions.yml
roles/ceph-rbd-mirror/tasks/docker/dirs_permissions.yml
roles/ceph-restapi/tasks/docker/dirs_permissions.yml
roles/ceph-rgw/tasks/docker/dirs_permissions.yml

index 8515116eef0c28bbbca535325c3d189877c8fcb6..56eefb621efbed0a6248d551d0b02c28b068d151 100644 (file)
@@ -7,7 +7,12 @@
 # file as a good configuration file when no variable in it.
 dummy:
 
-
 #ceph_docker_registry: docker.io
 #ceph_docker_enable_centos_extra_repo: false
 
+# Set uid/gid to default '64045' for bootstrap directories.
+# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
+# These values have to be set according to the base OS used by the container image, NOT the host.
+#bootstrap_dirs_owner: "64045"
+#bootstrap_dirs_group: "64045"
+
index 073aec00c8f14ddd4882d03b6fb792da2e3513bb..395acc4060ef09f7f056c7411e1107cb4a57e0e9 100644 (file)
@@ -1,4 +1,9 @@
 ---
-
 ceph_docker_registry: docker.io
 ceph_docker_enable_centos_extra_repo: false
+
+# Set uid/gid to default '64045' for bootstrap directories.
+# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
+# These values have to be set according to the base OS used by the container image, NOT the host.
+bootstrap_dirs_owner: "64045"
+bootstrap_dirs_group: "64045"
index a01824b16a8b42190d37e621ed997dc6830fc741..357573a8bf1aad8f577021f8289c5b484101ae58 100644 (file)
@@ -1,7 +1,6 @@
 ---
 - include: system_checks.yml
 
-
 - name: check if it is atomic host
   stat: path=/run/ostree-booted
   register: stat_ostree
index 7ab4d2cc88e31c4dabfaff962d2574bd044806f3..40f15941018228519659fc3540404a2ded436000 100644 (file)
@@ -3,8 +3,8 @@
   file:
     path: "{{ item }}"
     state: directory
-    owner: "64045"
-    group: "64045"
+    owner: "{{ bootstrap_dirs_owner }}"
+    group: "{{ bootstrap_dirs_group }}"
     mode: "0755"
   with_items:
     - /etc/ceph/
index 5f00ecbf4ef461085ae91800d39342b5083c9139..65997fd08b36b6f9c7bd8a84db047d8ba83feb4c 100644 (file)
@@ -3,8 +3,8 @@
   file:
     path: "{{ item }}"
     state: directory
-    owner: "64045"
-    group: "64045"
+    owner: "{{ bootstrap_dirs_owner }}"
+    group: "{{ bootstrap_dirs_group }}"
     mode: "0755"
   with_items:
     - /etc/ceph/
index 9f07c3a71e17adff6bf48a0368601e6327eb9fc7..0fc40a1cee0bc77a70424b494fb490767a73c385 100644 (file)
@@ -3,8 +3,8 @@
   file:
     path: "{{ item }}"
     state: directory
-    owner: "64045"
-    group: "64045"
+    owner: "{{ bootstrap_dirs_owner }}"
+    group: "{{ bootstrap_dirs_group }}"
     mode: "0755"
   with_items:
     - /etc/ceph/
index 615a36c9c0b7c392d0914a263f7f5613b95406e5..82b6d6b2bc09668da339182d10fd42b41190402a 100644 (file)
@@ -3,8 +3,8 @@
   file:
     path: "{{ item }}"
     state: directory
-    owner: "64045"
-    group: "64045"
+    owner: "{{ bootstrap_dirs_owner }}"
+    group: "{{ bootstrap_dirs_group }}"
     mode: "0755"
   with_items:
     - /etc/ceph/
index 4e6510b1078dae923f6ce63c1b0cc661905ae7b2..0b446c6398622c8cb2d39b08bdaa9ced8955a383 100644 (file)
@@ -3,8 +3,8 @@
   file:
     path: "{{ item }}"
     state: directory
-    owner: "64045"
-    group: "64045"
+    owner: "{{ bootstrap_dirs_owner }}"
+    group: "{{ bootstrap_dirs_group }}"
     mode: "0755"
   with_items:
     - /etc/ceph/
index 5f00ecbf4ef461085ae91800d39342b5083c9139..65997fd08b36b6f9c7bd8a84db047d8ba83feb4c 100644 (file)
@@ -3,8 +3,8 @@
   file:
     path: "{{ item }}"
     state: directory
-    owner: "64045"
-    group: "64045"
+    owner: "{{ bootstrap_dirs_owner }}"
+    group: "{{ bootstrap_dirs_group }}"
     mode: "0755"
   with_items:
     - /etc/ceph/
index 3d115557a1297b4e5c6504930f4643483d8d8385..07f36cec6dfcf1d7f53623fe51aa7e52f181da0c 100644 (file)
@@ -3,8 +3,8 @@
   file:
     path: "{{ item }}"
     state: directory
-    owner: "64045"
-    group: "64045"
+    owner: "{{ bootstrap_dirs_owner }}"
+    group: "{{ bootstrap_dirs_group }}"
     mode: "0755"
   with_items:
     - /etc/ceph/