Page MenuHomeVyOS Platform

Unable to delete the image version that came from OVA
Closed, ResolvedPublicBUG

Description

I have a couple virtual routers where I'm not able to delete the initial image that was installed on the system. See below:

bmtauer@vr06-1:~$ show system image
The system currently has the following image(s) installed:

   1: 1.2.4 (default boot) (running image)
   2: "1.2.3"

The problem image is 1.2.3

bmtauer@vr06-1:~$ delete system image 
The following image(s) can be deleted:

   1: 1.2.4 (default boot) (running image)
   2: "1.2.3"

Select the image to delete: 2

Are you sure you want to delete the
""1.2.3"" image? (Yes/No) [No]: yes
Cannot find the target image. Exiting...

No go... trying a different way

bmtauer@vr06-1:~$ delete system image '"1.2.3"'
Are you sure you want to delete the
""1.2.3"" image? (Yes/No) [No]: yes
Cannot find the target image. Exiting...

Again, unable to delete...

Details

Difficulty level
Unknown (require assessment)
Version
1.2.4
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Perfectly compatible

Event Timeline

Unknown Object (User) added a subscriber: Unknown Object (User).Apr 16 2020, 3:18 PM

Hi @bmtauer ,

Is 1.2.3 was deployed from OVA or install from ISO?
Which hypervisor?

Can you explain how to reproduce this?

Hypervisor is VMware ESXi. I believe these were installed from OVA several
months ago, but haven't reproduced recently.

What happened (longer story) is that a couple systems ran out of space due
to excessive logs under /var/log and they got so broken I just replaced
them via (I believe) new OVA templates.

Unknown Object (User) changed the task status from Open to Confirmed.Apr 16 2020, 4:50 PM
Unknown Object (User) triaged this task as High priority.

I can confirm this bug, also exist in 1.2.5 OVA

dmbaturin renamed this task from Unable to delete system image to Unable to delete the image version that came from OVA.Jun 18 2020, 10:44 PM
dmbaturin edited projects, added VyOS 1.2 Crux (VyOS 1.2.6); removed VyOS 1.2 Crux.

Just an update on this... I _had_ two systems with this problem, but have found a possible workaround?

After digging through the vyatta-boot-image.pl file, I couldn't find any system image files for the undeleteable version under /lib/live/mount/persistence/boot. Taking a guess, I went ahead and manually edited the /lib/live/mount/persistence/boot/grub/grub.cfg file and deleted the menu entries for the undeleteable version. It stopped showing up in the "show system image" list.

My guess is the image files either already got deleted when I tried to run the "delete system image" command, or they are stored somewhere else for OVA installs. Anyway, the problem is solved for me now, so this can be closed if nobody else cares about it.

Issue seems to be related to quote handling. OS seems to have version as 1.2.5 and GRUB file shows "1.2.5". show system image reflects the GRUB name. If I manually remove the quotes from the GRUB file, I can successfully rename and delete the image.

Bad GRUB entry

menuentry "VyOS  (KVM console)" {
        linux /boot/"1.2.5"/vmlinuz boot=live quiet vyos-union=/boot/"1.2.5" console=ttyS0,9600 console=tty0 systemd.show_status=true
        initrd /boot/"1.2.5"/initrd.img
}

Before editing GRUB

vyos@vyos:~$ show system image
The system currently has the following image(s) installed:

   1: 1.2.6-epa1 (default boot) (running image)
   2: "1.2.5"

Fixed GRUB entry

menuentry "VyOS  (KVM console)" {
        linux /boot/1.2.5/vmlinuz boot=live quiet vyos-union=/boot/1.2.5 console=ttyS0,9600 console=tty0 systemd.show_status=true
        initrd /boot/1.2.5/initrd.img
}

After editing GRUB

root@vyos:/home/vyos# show system image 
The system currently has the following image(s) installed:

   1: 1.2.6-epa1 (default boot) (running image)
   2: 1.2.5
dmbaturin changed Why the issue appeared? from Will be filled on close to Implementation mistake.
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
syncer moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.6) board.