Page MenuHomeVyOS Platform

reboot now and poweroff does not work
Closed, ResolvedPublicBUG

Description

The reboot now or poweroff does not work

vyos@r14:~$ reboot now
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/powerctrl.py", line 236, in <module>
    main()
  File "/usr/libexec/vyos/op_mode/powerctrl.py", line 219, in main
    execute_shutdown(args.reboot, reboot=True, ask=args.yes)
  File "/usr/libexec/vyos/op_mode/powerctrl.py", line 120, in execute_shutdown
    check_unsaved_config()
  File "/usr/libexec/vyos/op_mode/powerctrl.py", line 113, in check_unsaved_config
    if unsaved_commits() and boot_configuration_success():
       ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/config_mgmt.py", line 77, in unsaved_commits
    ret = not cmp(tmp_save, config_file, shallow=False)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/filecmp.py", line 54, in cmp
    s2 = _sig(os.stat(f2))
              ^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/opt/vyatta/etc/config/config.boot'
vyos@r14:~$

Check files:

vyos@r14:~$ ls -la /opt/vyatta/etc/config/config.boot
ls: cannot access '/opt/vyatta/etc/config/config.boot': No such file or directory
vyos@r14:~$

ls config:

vyos@r14:~$ ls -la /opt/vyatta/etc/config
total 216
drwxrwsr-x 8 root vyattacfg   4096 Sep  7 15:28 .
drwxr-xr-x 1 root root        4096 Sep  7 13:44 ..
drwxrwsr-x 2 root vyattacfg   4096 Sep  7 15:33 archive
drwxrwsr-x 2 root vyattacfg   4096 Jun 27 06:17 auth
-rwxrwxr-x 1 root vyattacfg   3182 Jun 29 14:36 config.boot.2023-07-01-124801.pre-migration
-rwxrwxr-x 1 root vyattacfg   4314 Jul 18 12:56 config.boot.2023-07-21-094638.pre-migration
-rwxrwxr-x 1 root vyattacfg   4314 Jul 21 09:46 config.boot.2023-08-02-100649.pre-migration
-rwxrwxr-x 1 root vyattacfg   4403 Aug  2 10:06 config.boot.2023-08-07-102133.pre-migration
-rwxrwxr-x 1 root vyattacfg   3903 Aug  9 16:03 config.boot.2023-08-14-081216.pre-migration
-rwxrwxr-x 1 root vyattacfg   3903 Aug 14 11:12 config.boot.2023-08-15-103445.pre-migration
-rwxrwxr-x 1 root vyattacfg   3764 Aug 17 20:31 config.boot.2023-08-18-074934.pre-migration
-rwxrwxr-x 1 root vyattacfg   3758 Aug 18 10:49 config.boot.2023-08-18-122434.pre-migration
-rwxrwxr-x 1 root vyattacfg   3817 Aug 24 15:39 config.boot.2023-08-25-071959.pre-migration
-rwxrwxr-x 1 root vyattacfg   4310 Sep  7 12:06 config.boot.2023-09-07-122533.pre-migration
-rwxrwxr-x 1 root vyattacfg    807 Sep  5 22:08 dhcpd.leases
-rwxrwxr-x 1 root vyattacfg    805 Sep  5 22:08 dhcpd.leases~
drwxrwsr-x 2 root vyattacfg   4096 Sep  6 23:31 scripts
drwxrwsr-x 2 root vyattacfg   4096 Jun 27 06:17 support
drwxrwsr-x 2 root vyattacfg   4096 Jun 27 06:17 user-data
-rwxrwxr-x 1 root vyattacfg      0 Jun 27 18:21 .vyatta_config
-rwxrwxr-x 1 root vyattacfg 114925 Sep  7 15:27 vyos-migrate.log
drwxrwsr-x 2 root vyattacfg   4096 Aug  8 19:50 zabbix
vyos@r14:~$

Details

Version
VyOS 1.5-rolling-202309071044
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav renamed this task from reboot now does not work to reboot now and poweroff does not work.
Viacheslav updated the task description. (Show Details)
jestabro triaged this task as Urgent! priority.Sep 7 2023, 1:37 PM

Logic error in recent bug fix; correction is being checked ...

Not as such: this is a logic error in T5353, which will be fixed momentarily. Nonetheless, T5514 is worthwhile to consider.

jestabro moved this task from Open to Finished on the VyOS 1.5 Circinus board.

The logic error is fixed in commit above: updates work as expected, and all smoketests (but for unrelated test) pass.