Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image-tools: T5910: explicitly set transmission speed of serial console #2806

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

jestabro
Copy link
Contributor

@jestabro jestabro commented Jan 11, 2024

Change Summary

The image-tools install scripts do not explicitly set the serial console speed, resulting in a GRUB default of 9600. In the case of a serial-only installation, this is a confounding, as the live image sets transmission speed to 115200, whereas the resulting installed image does not. Explicitly set for both fresh installs and for compatibility mode when legacy images are subsequently removed.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

Proposed changes

How to test

Smoketest result

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

GRUB defaults to 9600 in case of serial console; explicitly set to
115200.
@jestabro jestabro self-assigned this Jan 11, 2024
@vyosbot vyosbot requested review from a team, dmbaturin, sarthurdev, zdc, sever-sever and c-po and removed request for a team January 11, 2024 20:02
@c-po
Copy link
Member

c-po commented Jan 11, 2024

Why not reference the serial console speed from CLI? Looks like now we have two places defining the speed.

Updating serial speed on the CLI should also be reflected in the GRUB configuration

@jestabro
Copy link
Contributor Author

Yes, good point, and in fact this reveals a second bug: config-mode system_console.py is only appropriate for legacy/compatibility grub.cfg. The good news is that the new image tools allow an easy utility for setting this from the config-mode script; this will need some care for the compatibility mode, to be addressed in a separate task.

@jestabro
Copy link
Contributor Author

(addendum:) A fix for https://vyos.dev/T5923, pending, will correctly update the GRUB settings; the default values in PR above are only for initial install.

@fghorow
Copy link

fghorow commented Jan 11, 2024

Why not reference the serial console speed from CLI? Looks like now we have two places defining the speed.

Updating serial speed on the CLI should also be reflected in the GRUB configuration

Just because I did this search yesterday when I was seeing if there was some way for me to get the codebase into my head enough to contribute a fix, this search shows 42 hits in the repo.

It's significantly more than just two places in the codebase where 115200 is a "magic number"...

@jestabro
Copy link
Contributor Author

@fghorow yes, but most of those hits are in the example configs that are used in one category of smoketests, and have no instrumental effect.

@c-po
Copy link
Member

c-po commented Jan 11, 2024

Approving this as hotfix, but we should properly resolve the issue as mentioned above with the console speed on the CLI config.

@jestabro
Copy link
Contributor Author

A fix for the follow-on https://vyos.dev/T5923 should be ready shortly.

@dmbaturin dmbaturin merged commit 4df792f into vyos:current Jan 12, 2024
8 checks passed
@c-po
Copy link
Member

c-po commented Jan 12, 2024

@Mergifyio backport sagitta

Copy link
Contributor

mergify bot commented Jan 12, 2024

backport sagitta

✅ Backports have been created

c-po added a commit that referenced this pull request Jan 12, 2024
image-tools: T5910: explicitly set transmission speed of serial console (backport #2806)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants