Commit 35ed9977 authored by Dimitri Savineau's avatar Dimitri Savineau Committed by Dimitri Savineau
Browse files

switch2container: chown symlink in mon/mgr plays

fa2bb3af only fix the symlink owner/group issue in the OSD play. If the
OSDs are collocated with other services like MONs and MGRs then the
chown command will fail.

$ find /var/lib/ceph/osd/ceph-0 -not -user 167 -execdir chown 167:167 {} +
chown: cannot dereference './block': Permission denied

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1896448

Signed-off-by: default avatarDimitri Savineau <dsavinea@redhat.com>
parent 5ba7824c
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
# The file module has to run checks on current ownership of all directories and files. This is unnecessary # The file module has to run checks on current ownership of all directories and files. This is unnecessary
# as in this case we know we want all owned by ceph user # as in this case we know we want all owned by ceph user
- name: set proper ownership on ceph directories - name: set proper ownership on ceph directories
command: "find /var/lib/ceph /etc/ceph -not -( -user {{ ceph_uid }} -or -group {{ ceph_uid }} -) -execdir chown {{ ceph_uid }}:{{ ceph_uid }} {} +" command: "find /var/lib/ceph /etc/ceph -not -( -user {{ ceph_uid }} -or -group {{ ceph_uid }} -) -execdir chown -h {{ ceph_uid }}:{{ ceph_uid }} {} +"
changed_when: false changed_when: false
- name: check for existing old leveldb file extension (ldb) - name: check for existing old leveldb file extension (ldb)
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
# The file module has to run checks on current ownership of all directories and files. This is unnecessary # The file module has to run checks on current ownership of all directories and files. This is unnecessary
# as in this case we know we want all owned by ceph user # as in this case we know we want all owned by ceph user
- name: set proper ownership on ceph directories - name: set proper ownership on ceph directories
command: "find /var/lib/ceph /etc/ceph -not -( -user {{ ceph_uid }} -or -group {{ ceph_uid }} -) -execdir chown {{ ceph_uid }}:{{ ceph_uid }} {} +" command: "find /var/lib/ceph /etc/ceph -not -( -user {{ ceph_uid }} -or -group {{ ceph_uid }} -) -execdir chown -h {{ ceph_uid }}:{{ ceph_uid }} {} +"
changed_when: false changed_when: false
tasks: tasks:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment