Bug 825466 - /var/run not replaced with a symlink after an install with preserving an old /var
Summary: /var/run not replaced with a symlink after an install with preserving an old ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 17
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 825467 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-26 16:42 UTC by Sandro Janke
Modified: 2013-03-21 20:00 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-25 22:37:55 UTC


Attachments (Terms of Use)

Description Sandro Janke 2012-05-26 16:42:45 UTC
Description of problem:

The named daemon fails to start with error message in /var/log/messages:

systemd[1]: PID file /run/named/named.pid not readable (yet?) after start.
systemd[1]: named.service operation timed out. Terminating.

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

bind-9.9.0-4.fc17.x86_64
systemd-44-12.fc17.x86_64

How reproducible:

always

Steps to Reproduce:
1. systemctl start|restart named.service
2.
3.
  
Actual results:

Named cannot be started using systemd. It runs well when started in a console using 'named -fg'.

Expected results:

systemd succeeds starting named

Additional info:

In /usr/lib/systemd/system/named.service (provided by bind package) there is a parameter 'PIDFile' that is set to '/run/named/named.pid'. When changed to '/var/run/named/named.pid' named can be started using systemctl after running 'systemctl --system daemon-reload'.

Comment 1 Adam Tkac 2012-06-01 14:53:22 UTC
*** Bug 825467 has been marked as a duplicate of this bug. ***

Comment 2 Adam Tkac 2012-06-01 15:16:19 UTC
Did you install system from scratch or did you update it from F16? There should be symlink /var/run -> /run on your system but it is apparently not present. Maybe anaconda/preupgrade/yum failed to update your system correctly. The pid file should be in /run/

Comment 3 Oleg Girko 2012-06-01 16:18:16 UTC
(In reply to comment #2)
> Did you install system from scratch or did you update it from F16? There
> should be symlink /var/run -> /run on your system but it is apparently not
> present. Maybe anaconda/preupgrade/yum failed to update your system
> correctly. The pid file should be in /run/

The problem is caused bu missing "/usr/lib/systemd/system/var-run.mount" file. This file should cause "/run" to be bind mounted on top of "/var/run". It was provided by systemd-units package in Fedora 16. I presume that systemd-units package was merged with systemd package in Fedora 17.

In Fedora 17, the file "/usr/lib/systemd/system/var-run.mount" was provided by systemd-44-8 package from fedora repository. However, it is missing in systemd-44.12 from updates repository. Searching systemd builds in koji shows that this file went missing in systemd-44-9 build.

Hence, the root cause of the named problem is that systemd no longer provides "/usr/lib/systemd/system/var-run.mount" file since systemd-44-9 build.

The "Component" field of this bug should be changed to "systemd", and the summary corrected accordingly (or another bug filed in "systemd" category).

Comment 4 Oleg Girko 2012-06-01 17:17:30 UTC
Actually "/var/run" belongs to filesystem package, and its postinstall script should make "/var/run" to be a symlink to "/run", and this is the same for Fedora since version 15. Everything should be OK if Fedora 17 was installed from scratch or upgraded from installed from scratch version 15 or 16. However, if the system is a result of a chain of upgrades started earlier that Fedora 15, "/var/run" is still a directory, not a symlink. There was a workaround for that in form of "/usr/lib/systemd/system/var-run.mount", but it was dropped in the last update of systemd.

Comment 5 Sandro Janke 2012-06-02 20:42:50 UTC
(In reply to comment #2)
> Did you install system from scratch or did you update it from F16? There
> should be symlink /var/run -> /run on your system but it is apparently not
> present. Maybe anaconda/preupgrade/yum failed to update your system
> correctly. The pid file should be in /run/

I did an upgrade from el6 to F17 some weeks ago. Everything worked fine - at least concerning this bug - before I ran a large 'yum -y update' on May 26th.

I looked at the yum log. Bind wasn't updated on the May 26th run, but systemd was.
I downgraded systemd from 44-12.fc17.x86_64 to systemd-44-8.fc17.x86_64, which resurrects var-run.mount, which does/did the right thing in my situation.

Thanks, Oleg, I'm reassigning to systemd.

Comment 6 Michal Schmidt 2012-06-04 10:25:26 UTC
I assumed the convertfs script that does the UsrMove, which is a mandatory step in upgrading to F17, would create /var/run and /var/lock as symlinks. The code is certainly there for it.
The removal of var-run.mount was intentional. F17 system are supposed to have the symlinks.
Maybe something went wrong in the upgrade. I can if I can reproduce it.

Comment 7 Michal Schmidt 2012-06-04 10:28:24 UTC
(In reply to comment #5)
> I did an upgrade from el6 to F17 some weeks ago.

Oh wait. I missed this important sentence at the first reading.
Upgrading to Fedora N from anything else than Fedora N-2 or N-1 is not in any way a supported path. Sorry.

Comment 8 Sandro Janke 2012-06-04 11:19:15 UTC
(In reply to comment #7)
> (In reply to comment #5)
> > I did an upgrade from el6 to F17 some weeks ago.
> 
> Oh wait. I missed this important sentence at the first reading.
> Upgrading to Fedora N from anything else than Fedora N-2 or N-1 is not in
> any way a supported path. Sorry.

For the sake of clarity: after the upgrade - which I know is an unsupported step - I had a working system with regards to the described problem. It was the update of systemd that broke things.

Regarding my upgrade: I actually did a clean install, but kept the partitions used in el6 and mounted them during install. / was created and formatted during install. /var (among others) was on a separate partition. I still have the anaconda install log, if that would be of any help.

Comment 9 Michal Schmidt 2012-06-04 12:18:06 UTC
I do not want to add the workaround (var-run.mount) back. Every F17 system is supposed to have /var/run as a symlink, not as a bind mount point.

/var/run is a symlink on a new install, and it is made a symlink if upgrading.
If it's not made a symlink when doing an install with using the old /var, it may be something for anaconda developers to look at. Or maybe the filesystem package maintainer.

Comment 10 Brian Lane 2012-06-25 22:37:55 UTC
This is not something that anaconda should have to track. systemd or whoever owns it should be handling it.

Also, the scenario of upgrading from el6 to f17 is certainly not something we support.


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