Bug#898388: systemd-sysv: shutdown command always fails

2018-05-13 Thread Meeuwissen Olaf
Hi,

Michael Biebl writes:

> Am 14.05.2018 um 01:23 schrieb Meeuwissen Olaf:
>> Hi,
>>
>> Michael Biebl writes:
>>
>>> Am 11.05.2018 um 08:10 schrieb Meeuwissen Olaf:
 Hi,

 Thanks for the quick follow-up.

 Michael Biebl writes:

> Control: tags -1 + moreinfo
>
>> I have set up unattended-upgrades to reboot my machine at 04:00 when
>> necessary.  Internally, unattended-upgrades runs
>>
>>   /sbin/shutdown -r 04:00
>>
>> trying to achieve this.  This fails as evidenced by these (dated) log
>> messages
>>
>>   Apr 25 06:55:18 easy apt.systemd.daily[38369]: Found 
>> /var/run/reboot-required, rebooting
>>   Apr 25 06:55:18 easy apt.systemd.daily[38369]: Failed to connect to 
>> bus: No such file or directory
>
> [ ... ]

 FTR, after I install dbus, I get

   $ sudo shutdown -r 04:00
   Shutdown scheduled for Sat 2018-05-12 04:00:00 JST, use 'shutdown -c' to 
 cancel.
>>>
>>> Scheduled shutdowns require systemd-logind, which in turn requires
>>> dbus.
>>
>> In my initial bug report I included
>>
>>   root@debian:~$ shutdown -r 04:00
>>   Failed to connect to bus: No such file or directory
>>   root@debian:~$ shutdown -r
>>   Failed to connect to bus: No such file or directory
>>   root@debian:~$ shutdown
>>   Failed to connect to bus: No such file or directory
>>
>> What is scheduled about the last two commands?  The implicit "now"?
>
> Please read the manual for shutdown carefully:
>
> "If no time argument is specified, +1 is implied."
>
> So yes, all the examples you gave are scheduled shutdowns.

Sorry, my bad.  I missed that.  Instead my eyes got stuck on "now".

> If you use shutdown -h now (no scheduled shutdown), it should work
> without dbus.
>
> You said that shutdown is completely broken for you, are you implying
> that -h now does not work for you?

shutdown -h now works without dbus.  So the shutdown command is not
completely broken, just seriously broken :-/
--
Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- EPSON AVASYS CORPORATION
   Free Software Foundation Associate Member since 2004-01-27
Support Free Software  https://my.fsf.org/donate
Join the Free Software Foundationhttps://my.fsf.org/join
___
Pkg-systemd-maintainers mailing list
Pkg-systemd-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Bug#898388: systemd-sysv: shutdown command always fails

2018-05-13 Thread Michael Biebl
Am 14.05.2018 um 01:23 schrieb Meeuwissen Olaf:

> Definitely not from my POV.  I'm off now installing dbus myself because
> systemd-sysv didn't think it important enough to do that for me :-(
> 

Well, the systemd package does do it for you, but you actively prevented
dbus from being installed, so I don't think it's justified for you to
complain about that.
In any case, yes, it's a good idea to have dbus installed and we do
recommend you do so. I also recommend that you install libpam-systemd,
so your user sessions are moved into proper cgroups.

Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature
___
Pkg-systemd-maintainers mailing list
Pkg-systemd-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Bug#898388: systemd-sysv: shutdown command always fails

2018-05-13 Thread Meeuwissen Olaf
Hi,

Michael Biebl writes:

> Am 11.05.2018 um 08:10 schrieb Meeuwissen Olaf:
>> Hi,
>>
>> Thanks for the quick follow-up.
>>
>> Michael Biebl writes:
>>
>>> Control: tags -1 + moreinfo
>>>
 I have set up unattended-upgrades to reboot my machine at 04:00 when
 necessary.  Internally, unattended-upgrades runs

   /sbin/shutdown -r 04:00

 trying to achieve this.  This fails as evidenced by these (dated) log
 messages

   Apr 25 06:55:18 easy apt.systemd.daily[38369]: Found 
 /var/run/reboot-required, rebooting
   Apr 25 06:55:18 easy apt.systemd.daily[38369]: Failed to connect to bus: 
 No such file or directory
>>>
>>> What's the output of
>>> systemctl status dbus.socket dbus.service systemd-logind.service
>>
>>   $ sudo systemctl status dbus.socket dbus.service systemd-logind.service
>>   Unit dbus.socket could not be found.
>>   Unit dbus.service could not be found.
>>   * systemd-logind.service - Login Service
>>  Loaded: loaded (/lib/systemd/system/systemd-logind.service; static; 
>> vendor preset: enabled)
>>  Active: inactive (dead)
>>   Condition: start condition failed at Fri 2018-05-11 04:00:25 JST; 10h ago
>>  `- ConditionPathExists=/lib/systemd/system/dbus.service was not 
>> met
>>Docs: man:systemd-logind.service(8)
>>  man:logind.conf(5)
>>  http://www.freedesktop.org/wiki/Software/systemd/logind
>>  http://www.freedesktop.org/wiki/Software/systemd/multiseat
>>
>> Yes, I don't have dbus installed.  Nothing I have installed has a
>> dependency on it that is Depends: or more important.  I don't install
>> Recommends: and actively remove them unless other installed packages
>> declare a (Pre-)Depends:
>>
>> Based on my understanding of the relevant section[1] in the Debian
>> Policy, I would argue that systemd-sysv needs a Depends: dbus.
>>
>>  [1]: 
>> https://www.debian.org/doc/debian-policy/#binary-dependencies-depends-recommends-suggests-enhances-pre-depends
>>
>> The Recommends: that systemd declares looks fine as I have not observed
>> any other breakage.
>>
>> FTR, after I install dbus, I get
>>
>>   $ sudo shutdown -r 04:00
>>   Shutdown scheduled for Sat 2018-05-12 04:00:00 JST, use 'shutdown -c' to 
>> cancel.
>>
>
> Scheduled shutdowns require systemd-logind, which in turn requires
> dbus.

In my initial bug report I included

  root@debian:~$ shutdown -r 04:00
  Failed to connect to bus: No such file or directory
  root@debian:~$ shutdown -r
  Failed to connect to bus: No such file or directory
  root@debian:~$ shutdown
  Failed to connect to bus: No such file or directory

What is scheduled about the last two commands?  The implicit "now"?

The reboot command, also provided by systemd-sysv, works *without* dbus
installed.  So do the halt and poweroff commands.

The only thing login related I could find in the shutdown manual page is
the creating of a /run/nologin file in case a timespec is given.

> The basic functionality of systemd does not strictly require dbus
> though. This pretty much fits the bill for recommends and we want to
> allow (at least for the time being), to not have dbus installed, even if
> this means, that certain functionality in systemd is then not available.
> This is a choice the admin has to make.

And I agreed that the Recommends: dbus for systemd is fine.  I said that
I thought that systemd-sysv needs a Depends: because the absence of dbus
breaks the shutdown command *completely*.

# OK, so invoking it with the --help option works.  Great!

I would think completely breaking the shutdown command meets

  The Depends field should be used if the depended-on package is
  required for the depending package to provide a significant amount of
  functionality.

unless you want to argue that shutdown is not a significant amount of
functionality provided by systemd-sysv.

Seeing that systemd does not depend on systemd-sysv, adding the dbus
dependency to systemd-sysv will not introduce a dbus dependency for
systemd itself.

> If you choose to not install dbus, then you can't use logind (and as
> such scheduled shutdowns).
>
> So everything is behaving as expected.

Definitely not from my POV.  I'm off now installing dbus myself because
systemd-sysv didn't think it important enough to do that for me :-(

Hope this helps,
--
Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- EPSON AVASYS CORPORATION
   Free Software Foundation Associate Member since 2004-01-27
Support Free Software  https://my.fsf.org/donate
Join the Free Software Foundationhttps://my.fsf.org/join
___
Pkg-systemd-maintainers mailing list
Pkg-systemd-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Bug#898388: systemd-sysv: shutdown command always fails

2018-05-11 Thread Michael Biebl
Am 11.05.2018 um 08:10 schrieb Meeuwissen Olaf:
> Hi,
> 
> Thanks for the quick follow-up.
> 
> Michael Biebl writes:
> 
>> Control: tags -1 + moreinfo
>>
>>> I have set up unattended-upgrades to reboot my machine at 04:00 when
>>> necessary.  Internally, unattended-upgrades runs
>>>
>>>   /sbin/shutdown -r 04:00
>>>
>>> trying to achieve this.  This fails as evidenced by these (dated) log
>>> messages
>>>
>>>   Apr 25 06:55:18 easy apt.systemd.daily[38369]: Found 
>>> /var/run/reboot-required, rebooting
>>>   Apr 25 06:55:18 easy apt.systemd.daily[38369]: Failed to connect to bus: 
>>> No such file or directory
>>
>> What's the output of
>> systemctl status dbus.socket dbus.service systemd-logind.service
> 
>   $ sudo systemctl status dbus.socket dbus.service systemd-logind.service
>   Unit dbus.socket could not be found.
>   Unit dbus.service could not be found.
>   * systemd-logind.service - Login Service
>  Loaded: loaded (/lib/systemd/system/systemd-logind.service; static; 
> vendor preset: enabled)
>  Active: inactive (dead)
>   Condition: start condition failed at Fri 2018-05-11 04:00:25 JST; 10h ago
>  `- ConditionPathExists=/lib/systemd/system/dbus.service was not 
> met
>Docs: man:systemd-logind.service(8)
>  man:logind.conf(5)
>  http://www.freedesktop.org/wiki/Software/systemd/logind
>  http://www.freedesktop.org/wiki/Software/systemd/multiseat
> 
> Yes, I don't have dbus installed.  Nothing I have installed has a
> dependency on it that is Depends: or more important.  I don't install
> Recommends: and actively remove them unless other installed packages
> declare a (Pre-)Depends:
> 
> Based on my understanding of the relevant section[1] in the Debian
> Policy, I would argue that systemd-sysv needs a Depends: dbus.
> 
>  [1]: 
> https://www.debian.org/doc/debian-policy/#binary-dependencies-depends-recommends-suggests-enhances-pre-depends
> 
> The Recommends: that systemd declares looks fine as I have not observed
> any other breakage.
> 
> FTR, after I install dbus, I get
> 
>   $ sudo shutdown -r 04:00
>   Shutdown scheduled for Sat 2018-05-12 04:00:00 JST, use 'shutdown -c' to 
> cancel.
> 

Scheduled shutdowns require systemd-logind, which in turn requires dbus.
The basic functionality of systemd does not strictly require dbus
though. This pretty much fits the bill for recommends and we want to
allow (at least for the time being), to not have dbus installed, even if
this means, that certain functionality in systemd is then not available.
This is a choice the admin has to make.

If you choose to not install dbus, then you can't use logind (and as
such scheduled shutdowns).

So everything is behaving as expected.


Regards,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature
___
Pkg-systemd-maintainers mailing list
Pkg-systemd-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-systemd-maintainers

Bug#898388: systemd-sysv: shutdown command always fails

2018-05-11 Thread Meeuwissen Olaf
Hi,

Thanks for the quick follow-up.

Michael Biebl writes:

> Control: tags -1 + moreinfo
>
>> I have set up unattended-upgrades to reboot my machine at 04:00 when
>> necessary.  Internally, unattended-upgrades runs
>>
>>   /sbin/shutdown -r 04:00
>>
>> trying to achieve this.  This fails as evidenced by these (dated) log
>> messages
>>
>>   Apr 25 06:55:18 easy apt.systemd.daily[38369]: Found 
>> /var/run/reboot-required, rebooting
>>   Apr 25 06:55:18 easy apt.systemd.daily[38369]: Failed to connect to bus: 
>> No such file or directory
>
> What's the output of
> systemctl status dbus.socket dbus.service systemd-logind.service

  $ sudo systemctl status dbus.socket dbus.service systemd-logind.service
  Unit dbus.socket could not be found.
  Unit dbus.service could not be found.
  * systemd-logind.service - Login Service
 Loaded: loaded (/lib/systemd/system/systemd-logind.service; static; vendor 
preset: enabled)
 Active: inactive (dead)
  Condition: start condition failed at Fri 2018-05-11 04:00:25 JST; 10h ago
 `- ConditionPathExists=/lib/systemd/system/dbus.service was not met
   Docs: man:systemd-logind.service(8)
 man:logind.conf(5)
 http://www.freedesktop.org/wiki/Software/systemd/logind
 http://www.freedesktop.org/wiki/Software/systemd/multiseat

Yes, I don't have dbus installed.  Nothing I have installed has a
dependency on it that is Depends: or more important.  I don't install
Recommends: and actively remove them unless other installed packages
declare a (Pre-)Depends:

Based on my understanding of the relevant section[1] in the Debian
Policy, I would argue that systemd-sysv needs a Depends: dbus.

 [1]: 
https://www.debian.org/doc/debian-policy/#binary-dependencies-depends-recommends-suggests-enhances-pre-depends

The Recommends: that systemd declares looks fine as I have not observed
any other breakage.

FTR, after I install dbus, I get

  $ sudo shutdown -r 04:00
  Shutdown scheduled for Sat 2018-05-12 04:00:00 JST, use 'shutdown -c' to 
cancel.

Hope this helps,
--
Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- EPSON AVASYS CORPORATION
   Free Software Foundation Associate Member since 2004-01-27
Support Free Software  https://my.fsf.org/donate
Join the Free Software Foundationhttps://my.fsf.org/join
___
Pkg-systemd-maintainers mailing list
Pkg-systemd-maintainers@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-systemd-maintainers