Bug #18538
closedceph-disk prepare writes osd log 0 with root owner
0%
Description
The ceph-disk prepare call calls the following lines to check journal options with a hard coded osd id 0:
/usr/bin/ceph-osd --check-allows-journal -i 0 --cluster ceph
/usr/bin/ceph-osd --check-wants-journal -i 0 --cluster ceph
/usr/bin/ceph-osd --check-needs-journal -i 0 --cluster ceph
This causes /var/log/<cluster>-osd-0.log to be written with owner and group as root. This happens on every node that ceph-disk prepare is run on. What happens downstream is the node where osd 0 will really run has problems because the OSD daemon, which runs as user 'ceph' cannot write to its own log because it has already been created with root/root.
The ceph-osd command has --setuser and --setgroup parameters that when added to this call make the file have the ceph user and group. The fix is likely just adding those parameters to the call.
Updated by Sam Matzek over 7 years ago
Updated by Kefu Chai over 7 years ago
- Status changed from New to Fix Under Review
Updated by Alfredo Deza about 7 years ago
- Status changed from Fix Under Review to Resolved
merged commit 3e75c6b into ceph:master
Updated by Nathan Cutler about 7 years ago
- Status changed from Resolved to Pending Backport
- Backport set to jewel, kraken
Updated by Nathan Cutler about 7 years ago
- Copied to Backport #18605: jewel: ceph-disk prepare writes osd log 0 with root owner added
Updated by Nathan Cutler about 7 years ago
- Copied to Backport #18606: kraken: ceph-disk prepare writes osd log 0 with root owner added
Updated by Nathan Cutler about 7 years ago
- Status changed from Pending Backport to Resolved