Project

General

Profile

Bug #18538

ceph-disk prepare writes osd log 0 with root owner

Added by Sam Matzek 4 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
01/16/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
jewel, kraken
Regression:
No
Severity:
3 - minor
Reviewed:
ceph-qa-suite:
ceph-disk
Release:
master
Needs Doc:
No

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

Copied to Backport #18605: jewel: ceph-disk prepare writes osd log 0 with root owner Resolved
Copied to Backport #18606: kraken: ceph-disk prepare writes osd log 0 with root owner Resolved

History

#2 Updated by Kefu Chai 4 months ago

  • Status changed from New to Need Review

#3 Updated by Alfredo Deza 4 months ago

  • Status changed from Need Review to Resolved

merged commit 3e75c6b into ceph:master

#4 Updated by Nathan Cutler 4 months ago

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

#5 Updated by Nathan Cutler 4 months ago

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

#6 Updated by Nathan Cutler 4 months ago

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

#7 Updated by Nathan Cutler about 2 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF