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

login: T4975: Fixed broken CLI commands #1795

Merged
merged 1 commit into from
Feb 3, 2023
Merged

Conversation

zdc
Copy link
Contributor

@zdc zdc commented Feb 2, 2023

Change Summary

Fixed broken CLI commands

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)

Component(s) name

login, CLI

Proposed changes

User profile files are not saved to disk after configuration is fully applied. Because of this, after a fast system reset, profile files can be empty, and CLI is broken.

This fix adds a sync() call after the user's configuration, which should protect from data loss and fix the problem with profiles.

How to test

  1. Boot VyOS for the first time (after installation or from VM image).
  2. After full boot, reset the VM.
  3. Wait for the boot and log in.
  4. Check the CLI.
  5. VyOS-specific commands will not work.
vyos@vyos:~$ show 
showconsolefont  showkey          
vyos@vyos:~$ show interfaces

  Invalid command: [show]

vyos@vyos:~$

After the fix, everything should be OK.

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

User profile files are not saved to disk after configuration is fully applied.
Because of this, after a fast system reset, profile files can be empty, and CLI
is broken.

This fix adds a `sync()` call after the user's configuration, which should
protect from data loss and fix the problem with profiles.
@c-po c-po requested review from a team, dmbaturin, sarthurdev, jestabro, sever-sever and c-po and removed request for a team February 2, 2023 10:54
@dmbaturin dmbaturin merged commit bcee46a into vyos:current Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants