[systemd-devel] 4 failing tests
Timothy Pepper
timothy.c.pepper at linux.intel.com
Fri Nov 30 14:00:44 PST 2012
On Fri 30 Nov at 19:26:21 +0100 kay at vrfy.org said:
> >
> > It would be nice to at least do an overmount in cases where something
> > sane for a default could be created at boot.
>
> We obviously cannot over mount a non-existing file :) You have to
> leave it empty, then we will do that.
I suppose I was thinking of the broader case of unexpected content,
which non-existing file may or may not be within.
> > For kicks I removed
> > /etc/machine-id on a test machine and the machine no longer booted,
>
> Well, a fork in the eye hurts or kicks sometimes. :)
>
> > instead just spewing to the console repeatedly:
> > systemd[1]: Failed to start Journal Service.
>
> Yeah, right, the error should tell what's wrong.
With an existing but empty /etc/machine-id I do get the slightly more
useful message at boot:
Installed transient /etc/machine-id file.
and the much more useful everything seems to continue running fine
(with an overmounted tmpfs /etc/machine-id with a generated id).
Given a quick read through of that code path, I probably did get a:
"Cannot open /etc/machine-id: %m"
out of machine_id_setup() without a machine-id file, but didn't see it go
by on my console. The code indeed does try to open O_RDWR|O_CREAT, but
the trick is it fails since this is early and the fs is mounted readonly.
The code falls back to a readonly open and would even try to overmount
but the file doesn't exist as a mount point and is not creatable...so
there's not much that can be done anymore. Booting with 'rw' instead of
'ro', I do get both a new machine-id file and content created.
So not only is the file required by systemd, there is actually a full
best effort to insure both sane content and the presence of the file.
--
Tim Pepper <timothy.c.pepper at linux.intel.com>
Intel Open Source Technology Centre
More information about the systemd-devel
mailing list