]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
mon: do not hardcode ceph uid
authorSébastien Han <seb@redhat.com>
Fri, 8 Feb 2019 15:05:20 +0000 (16:05 +0100)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Mon, 11 Feb 2019 09:09:40 +0000 (09:09 +0000)
167 is the ceph uid for Red Hat based system, thus trying to deploy a
monitor on Debian fail since the ceph user id on that system is 64045.
This commit uses the ceph_uid variable which contains the right uid
based on system/container detection.

Closes: https://github.com/ceph/ceph-ansible/issues/3589
Signed-off-by: Sébastien Han <seb@redhat.com>
roles/ceph-mon/tasks/deploy_monitors.yml

index d89c5e89f7509fe4f298280c1197fb1e4829064c..6cb79f6ce75839afdeffef5f783bec5c0d92ea34 100644 (file)
@@ -97,8 +97,8 @@
   command: >
     {{ ceph_mon_cmd }}
     --cluster {{ cluster }}
-    --setuser 167
-    --setgroup 167
+    --setuser "{{ ceph_uid if containerized_deployment else 'ceph' }}"
+    --setgroup "{{ ceph_uid if containerized_deployment else 'ceph' }}"
     --mkfs
     -i {{ monitor_name }}
     --fsid {{ fsid }}
   command: >
     {{ ceph_mon_cmd }}
     --cluster {{ cluster }}
-    --setuser ceph
-    --setgroup ceph
+    --setuser "{{ ceph_uid if containerized_deployment else 'ceph' }}"
+    --setgroup "{{ ceph_uid if containerized_deployment else 'ceph' }}"
     --mkfs
     -i {{ monitor_name }}
     --fsid {{ fsid }}