ceph-osd doesn't fix /var/lib/ceph/osd ownership in postinst
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ceph (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Steps to reproduce:
1) Setup and enter a LXD VM
$ lxc launch images:ubuntu/focal foo --vm
$ lxc shell foo
2) Install ceph-base in the VM
# apt-get update -qq
# apt-get --assume-yes --option=
3) Install ceph-osd
# apt-get --assume-yes --option=
4) check the ownership of /var/lib/ceph/osd
# ll /var/lib/ceph/
total 48
drwxr-x--- 12 ceph ceph 4096 Oct 27 19:20 ./
drwxr-xr-x 23 root root 4096 Oct 27 19:20 ../
drwxr-xr-x 2 ceph ceph 4096 Sep 6 08:41 bootstrap-mds/
drwxr-xr-x 2 ceph ceph 4096 Sep 6 08:41 bootstrap-mgr/
drwxr-xr-x 2 ceph ceph 4096 Sep 6 08:41 bootstrap-osd/
drwxr-xr-x 2 ceph ceph 4096 Sep 6 08:41 bootstrap-rbd/
drwxr-xr-x 2 ceph ceph 4096 Sep 6 08:41 bootstrap-
drwxr-xr-x 2 ceph ceph 4096 Sep 6 08:41 bootstrap-rgw/
drwxr-xr-x 3 ceph ceph 4096 Oct 27 19:19 crash/
drwxr-xr-x 2 ceph ceph 4096 Sep 6 08:41 mds/
drwxr-xr-x 2 root root 4096 Sep 6 08:41 osd/
drwxr-xr-x 2 ceph ceph 4096 Sep 6 08:41 tmp/
The osd/ should be owned by "ceph:ceph" like the other directories.
Looking at the postinst scripts it looks like this is an issue if ceph-base and ceph-osd are installed in two separate steps as ceph-base takes care of permissions under /var/lib/ceph in its postinst script.