Page MenuHomeVyOS Platform

Reboot at reports wrong time or missing timezone
Closed, ResolvedPublicBUG

Description

vyos@vyos:~$ reboot at 05:00
Reboot is scheduled 2020-02-02 04:00:00

Timezone is set to Europe/Berlin (CET)

I'd image to see Reboot is schedulet 2020-02-02 05:00:00 or 04:00:00 and UTC timezone

Details

Difficulty level
Easy (less than an hour)
Version
1.3-rolling-202001300217
Why the issue appeared?
Design mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Unknown Object (User) added a subscriber: Unknown Object (User).Feb 1 2020, 7:38 PM

Related with https://phabricator.vyos.net/T1842 I think we need pytz

c-po triaged this task as Normal priority.Apr 26 2020, 11:02 AM
c-po changed Why the issue appeared? from Will be filled on close to Design mistake.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
vyos@vyos:~$ reboot cancel
Reboot or poweroff is not scheduled

vyos@vyos:~$ reboot at 05:00
Reboot is scheduled 2020-04-27 05:00:00

vyos@vyos:~$ reboot cancel

Broadcast message from vyos@vyos (somewhere) (Sun Apr 26 13:50:30 2020):

Scheduled reboot has been cancelled 2020-04-26 13:50:30

@c-po errors in latest rolling VyOS 1.3-rolling-202004270117

$ show poweroff
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/powerctrl.py", line 193, in <module>
    main()
  File "/usr/libexec/vyos/op_mode/powerctrl.py", line 188, in main
    check_shutdown()
  File "/usr/libexec/vyos/op_mode/powerctrl.py", line 74, in check_shutdown
    dt = datetime.strptime(output['DATETIME'], '%Y-%m-%d %H:%M:%S')
TypeError: 'NoneType' object is not subscriptable
$ show reboot
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/powerctrl.py", line 193, in <module>
    main()
  File "/usr/libexec/vyos/op_mode/powerctrl.py", line 188, in main
    check_shutdown()
  File "/usr/libexec/vyos/op_mode/powerctrl.py", line 74, in check_shutdown
    dt = datetime.strptime(output['DATETIME'], '%Y-%m-%d %H:%M:%S')
TypeError: 'NoneType' object is not subscriptable
c-po reopened this task as In progress.Apr 27 2020, 8:08 AM

Nice catch - I was not aware of that show command.

erkin set Issue type to Bug (incorrect behavior).Aug 31 2021, 5:46 PM