From: Patrick Ohly <patrick.ohly@intel.com>
To: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Cc: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: systemd and /etc/machine-id
Date: Sun, 05 Mar 2017 17:15:23 +0100 [thread overview]
Message-ID: <1488730523.7785.290.camel@intel.com> (raw)
In-Reply-To: <CAP71WjxRGB3L=iKN+LK2JTdO51oy10Vua-sg46E6MvOu+B52fQ@mail.gmail.com>
On Sun, 2017-03-05 at 10:40 +0100, Nicolas Dechesne wrote:
> hi,
>
> I am trying to understand why the systemd recipe creates an
> empty /etc/machine-id file:
>
> # Create machine-id
>
> # 20:12 < mezcalero> koen: you have three options: a) run
> systemd-machine-id-setup at install time, b) have / read-only and an
> empty file there (for stateless) and c) boot with / writable
> touch ${D}${sysconfdir}/machine-id
It's probably done for case b, the read-only rootfs (both when never
mounted read/write and when initially read-only until fsck completes).
systemd mounts a temporary machine-id over the empty file while the
rootfs is read-only. This is definitely needed for the permanently
read-only rootfs, because several services (for example, journald, if I
remember correctly) do not run without a valid machine-id.
I'm not 100% sure whether the "read-only initially" case also needs the
file. If not, then perhaps it can be limited to images with "read-only"
in IMAGE_FEATURES?
> Having an empty machine-id file seems to prevent the
> "ConditionFirstBoot" to be ever met, e.g. I have a service that tries
> to use it, and at first boot i am seeing in systemctl status:
>
> ConditionFirstBoot=yes was not met
When the rootfs is read-only permanently, does this condition still make
sense? Probably not, because each boot would be considered a "first
boot". Just wondering how this condition could be handled better.
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
prev parent reply other threads:[~2017-03-05 16:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-05 9:40 systemd and /etc/machine-id Nicolas Dechesne
2017-03-05 16:15 ` Patrick Ohly [this message]
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=1488730523.7785.290.camel@intel.com \
--to=patrick.ohly@intel.com \
--cc=nicolas.dechesne@linaro.org \
--cc=openembedded-core@lists.openembedded.org \
/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