Page MenuHomeVyOS Platform

Changing serial settings from a serial console ends session abruptly
Open, HighPublicBUG

Description

SUMMARY

You cannot change serial console settings from a serial console, as the script will restart the serial gettys as part of the commit process, throwing you out from your session.

STEPS TO REPRODUCE

  1. Login to VyOS through a serial console and enter configure mode
  2. Run the following commands:
set system name-server 8.8.8.8 # or whatever set command you like, really
set system console device ttyS0 speed 9600
commit

OBSERVED RESULT

You get thrown out to the login prompt. When you log back in, you sadly discover that none of your commands have made it to the running configuration.

Also note that even if you change the settings from a VT, any admins connected to a serial console would be thrown out and their changes discarded.

EXPECTED RESULT

The router should stop playing shenanigans on the admin, and just apply the requested configuration like a good boy :-)

SOFTWARE/OS VERSIONS

VyOS 1.4-rolling-202102180218

ADDITIONAL INFORMATION

The problem is that vyos-1x's script src/conf_mode/system_console.py unconditionally restarts all serial gettys. It should rather check whether an user is connected to the TTY before restarting it, I attach a patch to do that:

The ideal solution, I guess, would be some daemon to apply the settings when the user disconnects, but that's a bit overengineered, Fixing the commit failure is mostly enough for me.

Details

Difficulty level
Easy (less than an hour)
Version
1.4-rolling-202102180218
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Unspecified (please specify)