Comment 38 for bug 1359439

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 1359439] Re: [ 7.287663] systemd-logind[1057]: Failed to start unit user@126.service: Unknown unit: user@126.service

Hey Nathan,

Nathan Rennie-Waldock [2015-02-23 16:07 -0000]:
> This is actually in systemd, not systemd-shim.

No, it's still in -shim.

> I patched systemd-shim to ignore unknown unit warning, so then I get
> a warning from systemd-logind: systemd-logind[1414]: Failed to start
> user service: Message did not receive a reply (timeout by message
> bus)

Yeah, ignoring the warning is simple, but it's opening a can of worms
indeed as then logind runs into more unimplemented API from -shim. I
wrote an initial (incomplete) patch months ago:

  http://people.canonical.com/~pitti/tmp/0001-Quiesce-warning-about-missing-user-NNNN.service.patch

but it's not sufficient.

> I'm guessing user@.service is generated at runtime by systemd (which
> would require systemd is init, not upstart).

By logind, yes.

> Suggestions for fixing this:
> 1. Move /etc/pam.d/systemd-user to the systemd-sysv package (assuming none of systemd-logind's features are required)

That would be wrong (as you can boot with systemd without having the
systemd-sysv package), as well as unnecessary (if user@.service isn't
started, this pam file should be a no-op).

> 2. Patch systemd-logind to not start the user service if the system
> wasn't booted with systemd

This is ugly indeed, but would be an acceptable SRU for utopic. For
vivid (or possibly in vivid+1 now) we want to switch to systemd for
booting, so it will become unnecessary.

Thanks!

Martin