Page MenuHomePhabricator

'show system image' odd behavior when console is ttyS1
Closed, ResolvedPublic

Description

When I add a new lithium dev image

$ add system image 'http://dev.packages.vyos.net/iso/current/amd64/vyos-999.201609070235-amd64.iso'

[ ... fetching ... ]

Do you want to continue without signature check? (yes/no) [yes]
Checking MD5 checksums of files on the ISO image...OK.
Done!
What would you like to name this image? [999.201609070235-]:999.201609070235-lithium
OK.  This image will be named: 999.201609070235-lithium
Installing "999.201609070235-lithium" image.
Copying new release files...
Would you like to save the current configuration
directory and config file? (Yes/No) [Yes]:
Copying current configuration...
Would you like to save the SSH host keys from your
current configuration? (Yes/No) [Yes]:
Copying SSH keys...
Running post-install script...
Setting up grub configuration...
Done.
$ show system image
The system currently has the following image(s) installed:

   1: 999.201609070235-lithium (default boot)

Notice that the current, running image is not shown. (I expected to see both "1.1.7" and the dev image I last tried, "999.201607300237-current" as well.) This does not give me confidence that I'll be able to revert to the current system should the dev build not work out.

After reboot, I see the same result. However the Grub menu does contain choices for all three images, so I should be able to go back to 1.1.7 when I want to.

Details

Difficulty level
Easy (less than an hour)
Version
-
gadams created this task.Sep 8 2016, 1:55 AM
gadams added a comment.Sep 8 2016, 4:41 AM

Aha! I think I have found the cause. In vyatta-boot-image.pl, there is this code:

		if (/console=tty0.*console=ttyS0/) {
		    $ehash{'term'} = 'serial';
		} else {
		    $ehash{'term'} = 'kvm';
		}

That won't catch my console setting, which is ttyS1 (See T117). So, it decides that the new default image (the one just installed) is a serial terminal type, while all my already-installed images are of kvm type (because they have console=ttyS1). Since vyatta-boot-image.pl only shows grub entries that match the console type of the default image, no other entries show up.

Updating the pattern to match ttyS1 as well fixes the problem. I can send a pull request with that change.

gadams renamed this task from 'add system image' odd behavior for lithium images to 'show system image' odd behavior when console is ttyS1.Sep 21 2016, 12:54 AM
syncer added a subscriber: VyOS 1.2.x.
syncer triaged this task as Normal priority.Aug 1 2017, 5:34 AM
syncer changed the edit policy from "Task Author" to "Custom Policy".
syncer set Version to -.
syncer reassigned this task from syncer to UnicronNL.
syncer edited subscribers, added: Community, Core Community; removed: VyOS 1.2.x.
syncer added subscribers: UnicronNL, syncer.

@UnicronNL can you review this one?

dmbaturin closed this task as Resolved.Jun 24 2018, 12:02 PM
dmbaturin added a subscriber: dmbaturin.

The pull request was merged.