Bug 1174733

Summary: No journal in the initramfs
Product: [Fedora] Fedora Reporter: Harald Hoyer <harald>
Component: dracutAssignee: dracut-maint-list
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: bugzilla, dracut-maint-list, jonathan, samuel-rhbugs, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dracut-038-32.git20141216.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-06 06:08:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Harald Hoyer 2014-12-16 11:52:48 UTC
dracut has a symlink from /var/log to /run/log in the initramfs

Some programs e.g. systemd-journald expect a directory in /var/log as
the marker to do some actions. Here journald tries to flush
/run/log/journal to /var/log/journal, if the directory is seen.

Comment 1 Fedora Update System 2014-12-16 12:12:47 UTC
dracut-038-32.git20141216.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dracut-038-32.git20141216.fc21

Comment 2 Zbigniew Jędrzejewski-Szmek 2014-12-17 00:10:19 UTC
*** Bug 1169269 has been marked as a duplicate of this bug. ***

Comment 3 Zbigniew Jędrzejewski-Szmek 2014-12-17 00:12:09 UTC
Harald, does /var/log have to exist? IIUC, your patch fixes the problem by delaying the creation of the /var/log link, but it is still a race condition. If systemd-journald was restarted, then it'll see /var/log exists. It would be nicer to get rid of the symlink entirely.

Comment 4 Harald Hoyer 2014-12-17 08:17:30 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #3)
> Harald, does /var/log have to exist? IIUC, your patch fixes the problem by
> delaying the creation of the /var/log link, but it is still a race
> condition. If systemd-journald was restarted, then it'll see /var/log
> exists. It would be nicer to get rid of the symlink entirely.

/var/log does not point to /run/log now. That is the trick.

Because /run/log/journal existed, /var/log/journal also existed and thus journald was trying to flush to /var/log/journal.

/var/log now points to /run/initramfs/log, which is why it works now.

Comment 5 Fedora Update System 2014-12-18 06:09:12 UTC
Package dracut-038-32.git20141216.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dracut-038-32.git20141216.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-17180/dracut-038-32.git20141216.fc21
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2015-01-06 06:08:09 UTC
dracut-038-32.git20141216.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.