Bug 851428 - sensord creates /run/sensord.pid instead of /run/sensord/sensord.pid
sensord creates /run/sensord.pid instead of /run/sensord/sensord.pid
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: lm_sensors (Show other bugs)
18
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Nikola Pajkovsky
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-24 03:50 EDT by Miroslav Grepl
Modified: 2014-02-02 17:16 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-24 04:56:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miroslav Grepl 2012-08-24 03:50:35 EDT
Description of problem:

sensord creates /run/sensord.pid instead of /run/sensord/sensord.pile

Version-Release number of selected component (if applicable):

lm_sensors-sensord-3.3.2-3.fc18.x86_64

How reproducible:

# systemctl start sensord.service
# ls -lZ /run/sensord.pid 
-rw-r--r--. root root system_u:object_r:var_run_t:s0   /run/sensord.pid

Steps to Reproduce:
1. yum install lm_sensors-sensord
2. systemctl start sensord.service
  
Actual results:

sensord.pid file is placed in the /run directory

Expected results:

sensord.pid file should be placed in the /run/sensord directory. Then you can create/rename whatever you want in this directory and we won't need to update SELinux rules.

Additional info:

http://fedoraproject.org/wiki/Packaging:Tmpfiles.d
Comment 1 Hans de Goede 2012-08-24 03:59:04 EDT
I disagree, /var/run/$name.pid is the standard pid file location for daemons and has been so for ages. A lot of distros depend on this, and we used to depend on it until we moved to systemd which no longer cares about pid files. Let me quote a snipper from /etc/init.d/functions

# Set $pid to pids from /var/run* for {program}.  $pid should be declared
# local in the caller.
# Returns LSB exit code for the 'status' action.
__pids_var_run() {
        local base=${1##*/}
        local pid_file=${2:-/var/run/$base.pid}

Making the requested change means making changes to the daemon C-code, and if we then upstream these changes, they will cause issues for other distro's. I believe that a change like this, which I assume you've requested from other daemons to should first be discussed on fedora-devel, as upstreaming the necessary changes is going to be a problem.
Comment 2 Hans de Goede 2012-08-24 04:07:39 EDT
I;ve started a discussion about this on fedora-devel-list, subject: "Moving pid files from /var/run/$name.pid to /var/run/$name/$name.pid"
Comment 3 Miroslav Grepl 2012-08-24 04:36:27 EDT
I fill bugs like this if I create a new SELinux policies and I see this situation.

Basically we have no problem with /var/run/$name.pid until this path is changed or you add a sock file for example. Then there will be an issue from the SELinux point of view.
Comment 4 Ralf Corsepius 2012-08-24 04:51:31 EDT
/var/run/$name.pid is the location mandated by the FHS [1].

[1] http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA

I do not see any reason to diverge from this long estabilished convention.

Should Red Hat have strong reasons to enforce this change, it defintely needs FESCO and FPC approval.
Comment 5 Miroslav Grepl 2012-08-24 05:01:06 EDT
It was more a question about moving of sensord.pid than a new standard.
Comment 6 Nikola Pajkovsky 2012-08-24 08:58:29 EDT
Wasn't that feature to move pid files from /var/run to /run because of systemd and its super hyper fast  boot?

Note You need to log in before you can comment on or make changes to this bug.