[systemd-devel] [PATCH] path_is_mount_point: handle false positive on some fs

Lennart Poettering lennart at poettering.net
Thu Mar 12 20:39:31 PDT 2015


On Wed, 11.03.15 08:12, Didier Roche (didrocks at ubuntu.com) wrote:

> Le 10/03/2015 18:54, Lennart Poettering a écrit :
> >On Tue, 10.03.15 18:01, Didier Roche (didrocks at ubuntu.com) wrote:
> >
> >>The context is bug
> >>https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1411140, where
> >>systemd-machine-id-commit unit is entering in failed state (the binary
> >>handles gracefully the fact that it can't unmount the file) on a default
> >>ubuntu live system (which is a squashfs/overlayfs system).
> >Hmm, it's not clear to me by that bug what precisely fails... Any
> >idea? Maybe it would be better to just handle that failure gracefully...
> 
> Basically, ConditionPathIsMountPoint=/etc/machine-id is met in the unit and
> so systemd-machine-id-commit is launched.
> 
> This one:
> - executes the double checking path_is_mount_point(etc_machine_id, false)
> successfully (of course)
> - find that machine-id fd is a temporary fs (based on the same issue), read
> the machine-id file content
> - switch namespace
> - call unmount(etc_machine_id), which obviously fails as there is nothing to
> unmount. I don't think we should shadow that failure and not returning in
> error here, right?

I think we should do that. I.e. downgrade the error message that happens in
this case to debug, and exit cleanly. But of course only do so if the
right errno is returned from umount(). Also, a good explanatory
comment next to it would be good...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list