Project

General

Profile

Actions

Bug #13059

closed

rpm upgrade does not fix /var/run/ceph ownership/permissions

Added by Sage Weil over 8 years ago. Updated over 8 years ago.

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

0%

Source:
Q/A
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

/a/sage-2015-09-10_16:14:42-rados-wip-sage-testing---basic-multi/1049102

Actions #2

Updated by Boris Ranto over 8 years ago

RPM does fix the file/dir ownership on upgrade. What happens here is that these files are managed by systemd and systemd will fix up the permissions to root/root -- it is running as root, it is managing the pid files and with systemd, the (/var)/run directory is a mounted tmpfs so no chmod/chown in post script will make the files owned by ceph forever.

I suppose we could try to not own (nor create) the file if we do a systemd build, though as it is fairly pointless to own the file/dir on systemd-enabled machines where the pid files are managed by systemd itself.

btw: I believe the ownership/permissions of these files should be tunable in the systemd unit files.

Actions #3

Updated by Sage Weil over 8 years ago

Boris Ranto wrote:

RPM does fix the file/dir ownership on upgrade. What happens here is that these files are managed by systemd and systemd will fix up the permissions to root/root -- it is running as root, it is managing the pid files and with systemd, the (/var)/run directory is a mounted tmpfs so no chmod/chown in post script will make the files owned by ceph forever.

I suppose we could try to not own (nor create) the file if we do a systemd build, though as it is fairly pointless to own the file/dir on systemd-enabled machines where the pid files are managed by systemd itself.

btw: I believe the ownership/permissions of these files should be tunable in the systemd unit files.

Isn't this waht the tmpfiles.d file controls?

https://github.com/ceph/ceph/blob/master/systemd/ceph.tmpfiles.d

I think the problem is that for a new install systemd-tmpfiles creates it correctly, but for an upgrade the existing dir isn't fixed...?

Actions #4

Updated by Sage Weil over 8 years ago

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

Updated by Sage Weil over 8 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF