Project

General

Profile

Actions

Bug #18538

closed

ceph-disk prepare writes osd log 0 with root owner

Added by Sam Matzek over 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
jewel, kraken
Regression:
No
Severity:
3 - minor
Reviewed:
ceph-qa-suite:
ceph-disk
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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.


Related issues 2 (0 open2 closed)

Copied to Ceph - Backport #18605: jewel: ceph-disk prepare writes osd log 0 with root ownerResolvedNathan CutlerActions
Copied to Ceph - Backport #18606: kraken: ceph-disk prepare writes osd log 0 with root ownerResolvedNathan CutlerActions
Actions #2

Updated by Kefu Chai over 7 years ago

  • Status changed from New to Fix Under Review
Actions #3

Updated by Alfredo Deza about 7 years ago

  • Status changed from Fix Under Review to Resolved

merged commit 3e75c6b into ceph:master

Actions #4

Updated by Nathan Cutler about 7 years ago

  • Status changed from Resolved to Pending Backport
  • Backport set to jewel, kraken
Actions #5

Updated by Nathan Cutler about 7 years ago

  • Copied to Backport #18605: jewel: ceph-disk prepare writes osd log 0 with root owner added
Actions #6

Updated by Nathan Cutler about 7 years ago

  • Copied to Backport #18606: kraken: ceph-disk prepare writes osd log 0 with root owner added
Actions #7

Updated by Nathan Cutler about 7 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF