From: Khem Raj <raj.khem@gmail.com>
To: randy.e.witt@linux.intel.com
Cc: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] systemd: Fix the problem of an empty journal on boot
Date: Fri, 6 Mar 2015 01:18:40 -0800 [thread overview]
Message-ID: <F29A110F-58F7-4878-ACFA-B1683AEFD651@gmail.com> (raw)
In-Reply-To: <64249.10.254.177.107.1425621678.squirrel@linux.intel.com>
> On Mar 5, 2015, at 10:01 PM, randy.e.witt@linux.intel.com wrote:
>
>> On Mar 5, 2015 6:13 PM, "Randy Witt" <randy.e.witt@linux.intel.com> wrote:
>>>
>>> systemd by default tries to write the journal to /var/log/journal.
>>> But base-files has a symlink /var/log -> /var/volatile/log. And
>>> /var/volatile is a tmpfs mount in /etc/fstab.
>>>
>>> If the journal service started before /var/volatile was mounted (which
>>> was the typical scenario) then the journal would appear empty since
>>> the old location was mounted over.
>>>
>>> This change fixes the problem by ensuring that the journal doesn't start
>>> until after the mount happens.
>>>
>>
>> What happens if folks have a different fstab then default? Will it still
>> work
>
> Yes, the "After" only changes behavior if something else has caused
> var-volatile.mount to be in the set of services to be started.
>
> I verified that was the case by removing /var/volatile from /etc/fstab and
> the journal still starts with no errors.
perfect thanks. I will test it out in few hrs myself.
>
>>> [Yocto #7388]
>>>
>>> Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
>>> ---
>>> meta/recipes-core/systemd/systemd/journald-volatile.conf | 6 ++++++
>>> meta/recipes-core/systemd/systemd_219.bb | 2 ++
>>> 2 files changed, 8 insertions(+)
>>> create mode 100644
>> meta/recipes-core/systemd/systemd/journald-volatile.conf
>>>
>>> diff --git a/meta/recipes-core/systemd/systemd/journald-volatile.conf
>> b/meta/recipes-core/systemd/systemd/journald-volatile.conf
>>> new file mode 100644
>>> index 0000000..b11e160
>>> --- /dev/null
>>> +++ b/meta/recipes-core/systemd/systemd/journald-volatile.conf
>>> @@ -0,0 +1,6 @@
>>> +# If /var/volatile is a mount point then make sure to mount it before
>>> +# the journal starts. This is because base-files creates a symlink
>>> +# /var/log -> /var/volatile/log. And if the journal starts before the
>> mount
>>> +# happens, the journal will appear empty until restarted.
>>> +[Unit]
>>> +After=var-volatile.mount
>>> diff --git a/meta/recipes-core/systemd/systemd_219.bb
>> b/meta/recipes-core/systemd/systemd_219.bb
>>> index 3c4b6cf..2be66af 100644
>>> --- a/meta/recipes-core/systemd/systemd_219.bb
>>> +++ b/meta/recipes-core/systemd/systemd_219.bb
>>> @@ -48,6 +48,7 @@ SRC_URI = "git://
>> anongit.freedesktop.org/systemd/systemd;branch=master;protocol=
>>> file://00-create-volatile.conf \
>>> file://init \
>>> file://run-ptest \
>>> + file://journald-volatile.conf \
>>> "
>>>
>>> S = "${WORKDIR}/git"
>>> @@ -143,6 +144,7 @@ do_install() {
>>> install -m 0644 ${WORKDIR}/*.rules
>>> ${D}${sysconfdir}/udev/rules.d/
>>>
>>> install -m 0644 ${WORKDIR}/00-create-volatile.conf
>> ${D}${sysconfdir}/tmpfiles.d/
>>> + install -D -m 0644 ${WORKDIR}/journald-volatile.conf
>> ${D}${systemd_unitdir}/system/systemd-journald.service.d/journald-volatile.conf
>>>
>>> if
>> ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
>>> install -d ${D}${sysconfdir}/init.d
>>> --
>>> 1.9.3
>>>
>>> --
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
next prev parent reply other threads:[~2015-03-06 9:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-06 2:11 [PATCH] systemd: Fix the problem of an empty journal on boot Randy Witt
2015-03-06 4:22 ` Khem Raj
2015-03-06 6:01 ` randy.e.witt
2015-03-06 9:18 ` Khem Raj [this message]
2015-03-07 19:37 ` Khem Raj
2015-03-11 4:48 ` Khem Raj
2015-03-11 5:09 ` Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F29A110F-58F7-4878-ACFA-B1683AEFD651@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=randy.e.witt@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox