Page MenuHomeVyOS Platform

set system image default-boot
Open, NormalPublicBUG

Description

It looks like 1.4rc3 ‘show system image’ list may not reflect the actual default boot image. It looks like 1.4rc3 lists as ‘default boot’ the system image from the last time that image was changed from within 1.4rc3 (which may not be the actual default boot image). To change the default boot image, you have to actually change it to a different boot image (not merely ‘set’ it again to what is already listed).

Steps to reproduce:

Start with a system that has several images (mine has 1.3.4, 1.3.5, 1.3.6, 1.4rc3)
Boot into 1.4rc3
‘show version’ to confirm you’re running 1.4rc3
‘set system image default-boot 1.3.6’
‘show system image’ to confirm 1.3.6 is now the default boot
reboot
‘show version’ to confirm you’re running 1.3.6
'show system image" to confirm that 1.3.6 is default boot
‘set system image default-boot 1.4rc3’
reboot
‘show version’ to confirm you’re running 1.4rc3
‘show system image’ and see that 1.3.6 is still listed as default boot
‘set system image default-boot 1.3.6’ and read message: ‘The image “1.3.6” is already configured as default’
reboot
‘show version’ to see that you are still running 1.4rc3
‘set system image default-boot 1.3.5’
‘show system image’ to see that the default boot is now 1.3.5
reboot
‘show version’ to see that you are now running 1.3.5

So 1.4rc3 seems to update/change the default boot version only when the default boot is actually changed from within 1.4rc3.

Details

Difficulty level
Unknown (require assessment)
Version
1.4rc3
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

I also see this behavior when switching between images in 1.4.0-rc3" and sometimes default-boot setting does not work.

vyos@vyos# run sh ver
Version:          VyOS 1.4.0-rc3
Release train:    sagitta

Built by:         Sentrium S.L.
Built on:         Thu 18 Jan 2024 19:21 UTC
Build UUID:       8603fe3e-29bd-4669-9427-cc07110bd272
Build commit ID:  651ff15892ade4

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID:    3f566e62-2ce2-4641-bada-14c4c47e9c40

Copyright:        VyOS maintainers and contributors

vyos@vyos# run sh sys image
Name                      Default boot    Running
------------------------  --------------  ---------
1.4.0-rc3                                 Yes
1.3.3                     Yes
1.5-rolling-202401190024
1.3.2
[edit]
vyos@vyos# run set sys image default-boot 1.4.0-rc3
The image "1.4.0-rc3" cannot be found
[edit]
vyos@vyos# run set system image default-boot 1.3.3
The image "1.3.3" already configured as default
Viacheslav triaged this task as Normal priority.Feb 7 2024, 5:23 PM

https://github.com/vyos/vyos-1x/blob/sagitta/src/op_mode/image_manager.py

line 107: available_images: list[str] = annotated_list(grub.version_list())
Should be: available_images: list[str] = grub.version_list()

This change (for 1.4) allows me to use "set system image default-boot" properly, without getting the message "The image cannot be found"

I don't know if I've done this correctly or not, so I am not going to submit a pull request.

The regression causing 'image cannot be found" was fixed in https://vyos.dev/T6186.