Page MenuHomeVyOS Platform

Command 'add system upgrade' uses local script instead of updated script provided by ISO
Open, LowPublicBUG

Description

Working with https://vyos.dev/T5593 it turns out that when performing add system image then /opt/vyatta/sbin/install-image-existing is used rather than the updated script provided by the ISO.

This will make the upgrade fail with the result that the upgraded image wont be able to boot since Linux kernel-files are missing (one have to select previous version of VyOS to get the system back online).

A dirty workaround is to start over with a fresh install (wipe the whole disk) and use the ISO where the PR's for T5593 have been merged.

Or manually extract the files needed from the ISO and place them into the persistent boot-directory on the drive.

However the problem will return next time the install-image-existing script is getting updated (rumours has it that work is in progress to replace the script with python code instead).

A better solution would then be if the op-mode add system image gets updated so it will fetch and use the script provided by the ISO instead (for example by mounting the ISO as a loopdevice during upgrade).

This way instead of doing a fresh install (wiping the disk) the user can update to the VyOS version where the updated add system image exists and from there upgrade into the version where T5593 is provided (or other tasks which affects the scripts used during upgrades).

For more information see:

https://github.com/vyos/vyatta-cfg-system/pull/209#issuecomment-1740146385

and

https://github.com/vyos/vyos-build/pull/427#issuecomment-1739978709

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.5-rolling-202309240023
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

I suppose the maintainers already considered the below but I got a suggestion on how to resolve this issue:

TLDR:

Before production users can upgrade into LTS 1.4.0 they first must (if on 1.2.x) upgrade to 1.2.10 or (if on 1.3.x) upgrade to 1.3.10.

From the 1.x.10 version they can upgrade into LTS 1.4.0.

Another option for production users is to do a fresh install using LTS 1.4.0.

The above will be stated in the release notes for LTS 1.4.0.

For 1.5-rolling users prior to 2023-09-30 they must first upgrade to 1.5-rolling 2023-10-01 before going to whatever 1.5-rolling version they prefer (which is 2023-10-01 or newer).

Another option for the rolling usesr is to do a fresh install using 1.5-rolling 2023-10-01.

The above will be stated on blog and forum.

Longer edition:

  1. The python-edition of install/upgrade scripts gets upgraded to use the method in PR209 (vyatta-cfg-system):
find ${boot_dir} -maxdepth 1 \( -type f \( -name "config-*" -o -name "initrd.img" -o -name "initrd.img-*" -o -name "System.map-*" -o -name "vmlinuz" -o -name "vmlinuz-*" \) -o -type l \( -name "initrd.img" -o -name "vmlinuz" \) \)
  1. This switch to python-edition is what happens in 1.2.10 and 1.3.10 (the 1.x.10 versions ONLY contains that change compared to previous version of each tree).
  1. LTS 1.4.0 and 1.5-rolling 2023-10-01 gets the new python-edition aswell.
  1. Seemless upgrade path with the only bump that 1.2.x users must first upgrade to 1.2.10 and 1.3.x users must first upgrade to 1.3.10 before going for LTS 1.4.0 or 1.5-rolling 2023-10-01 or newer.
  • 1.2.9-S1 -> 1.2.10 -> LTS 1.4.0
  • LTS 1.3.4 -> LTS 1.3.10 -> LTS 1.4.0
  • 1.5-rolling 2023-09-29 -> 1.5-rolling 2023-10-01 -> 1.5-rolling...
  1. Then for LTS 1.4.1 and 1.5-rolling 2023-10-02 the T5593 fix gets fully implemented (since now the new python edition exists who will do the magic T5593 needs during install and upgrades) and 34MB can be shaved from the ISO size.
  1. Happy users and smaller imagesize?
Apachez renamed this task from Add system upgrade uses local script instead of updated script provided by ISO to Command 'add system upgrade' uses local script instead of updated script provided by ISO.Sep 30 2023, 7:11 AM

Just in case: using anything except current image scripts for installation is not possible without a full chroot into the installation candidate. Python versions and modules may be different and new scripts in many cases will not work in the old environment.

Hopefully this can be resolved for VyOS 2.0 in the future...

Viacheslav edited projects, added VyOS 2.0.x; removed VyOS 1.5 Circinus.