Page MenuHomeVyOS Platform

Equuleus: "reboot at 04:00" command not working
Closed, ResolvedPublicBUG

Description

vyos@vyos:~$ reboot at 04:00
Unit systemd-shutdownd.service could not be found.
Shutdown is not scheduled

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-201912021432
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

c-po created this task.Dec 2 2019, 7:56 PM
Viacheslav added a subscriber: Viacheslav.EditedDec 4 2019, 3:13 PM
vyos@1.3-roll:~$ sh version 
Version:          VyOS 1.3-rolling-201912040242

vyos@1.3-roll:~$ reboot at 04:00
Shutdown scheduled for Thu 2019-12-05 04:00:00 UTC
vyos@1.3-roll:~$

Maybe we need to use "systemd-reboot" and "systemd-poweroff.service"?

root@1:/# systemctl status systemd-shutdownd.service
Unit systemd-shutdownd.service could not be found.

root@1:/# systemctl status systemd-reboot.service
โ— systemd-reboot.service - Reboot
   Loaded: loaded (/lib/systemd/system/systemd-reboot.service; static; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:systemd-halt.service(8)

root@1:/# systemctl status systemd-poweroff.service
โ— systemd-poweroff.service - Power-Off
   Loaded: loaded (/lib/systemd/system/systemd-poweroff.service; static; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:systemd-halt.service(8)
pasik added a subscriber: pasik.Dec 4 2019, 3:23 PM

I agree. If it works in a way that is consistent with what the command promises, let's use it.

c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.Dec 10 2019, 9:15 AM
c-po moved this task from Finished to Backlog on the VyOS 1.3 Equuleus board.
Dmitry changed the task status from Open to In progress.Jan 9 2020, 8:17 AM
Dmitry claimed this task.
Dmitry changed the task status from In progress to Needs testing.Jan 9 2020, 8:25 AM

In this case we can use /run/systemd/shutdown/scheduled file for detecting powertrl scheduler
PR for this task https://github.com/vyos/vyos-1x/pull/201

All works, but seems we need works with timezone for correct converting USEC to "date time" format

vyos@GW1:~$ date
Fri 10 Jan 2020 11:25:57 AM EET
vyos@GW1:~$ reboot at 12:00
Reboot is scheduled 2020-01-10 10:00:00
vyos@GW1:~$ show reboot 
Reboot is scheduled 2020-01-10 10:00:00
c-po closed this task as Resolved.Apr 25 2020, 7:33 AM
c-po moved this task from Backlog to Finished on the VyOS 1.3 Equuleus board.May 22 2020, 10:37 AM