yann
January 31, 2023, 9:32am
1
I’m using version 1.3.2 of vyos.
After the first installation and reboot into vyos (normal command line login).
If you reset power(not reboot) at this time, the system will not boot properly, and it will show errors such as missing environment variables.
Note: The failure can be reproduced in the virtual machine
n.fort
January 31, 2023, 11:18am
2
This issue happens after 1.3.2 installation? Without any configuration, just a power reset on a new 1.3.2 installation?
pepe
January 31, 2023, 12:14pm
3
I confirm. This happens during the first boot after installation. You can login or not, just power off (stop) system. After that, if an error occurs, you can log in, but no commands work.
I test it on self build image form 2023.01.30.
yann
February 1, 2023, 12:40am
4
Yes, there is no configuration and it is only for the first boot after installation.
Resetting the power only after the first boot causes this problem. conf command does not work, I tried to add some environment variables manually, but the problem does not seem to be completely solved.
n.fort
February 1, 2023, 10:53am
5
Thanks for the info. I can confirm such problem on a fresh install of 1.3.2 in proxmox.
n.fort
February 1, 2023, 11:06am
6
And same error on latest 1.4.
Both tests consists on same procedure:
Create VM on proxmox
Boot from live cd and install image
Once image is installed, reboot the system through command line.
When reboot is finished and login prompt is displayed, stop the VM through Proxmox GUI.
Few seconds later, start the VM
Login and test.
pepe
February 1, 2023, 11:46am
7
It’s something related to creating users.
Boot, working vyos, log in, add new user, commit, save, exit, stop / poweroff system.
On next boot error occur in migration script. If you log in with new user no command work, but log in as old user and all working fine.
zsdc
February 2, 2023, 10:56am
8
@yann @pepe thanks a lot for the report!
I think, it should be fixed by this:
https://phabricator.vyos.net/T4975
vyos:current
← zdc:T4975-sagitta
opened 10:54AM - 02 Feb 23 UTC
## Change Summary
Fixed broken CLI commands
## Types of changes
<!---
Wh… at types of changes does your code introduce? Put an 'x' in all the boxes that apply.
NOTE: Markdown requires no leading or trailing whitespace inside the [ ] for checking
the box, please use [x]
-->
- [x] 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)
* https://phabricator.vyos.net/T4975
## 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
<!---
Please describe in detail how you tested your changes. Include details of your testing
environment, and the tests you ran. When pasting configs, logs, shell output, backtraces,
and other large chunks of text, surround this text with triple backtics
```
like this
```
-->
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:
- [x] I have read the [**CONTRIBUTING**](https://github.com/vyos/vyos-1x/blob/current/CONTRIBUTING.md) document
- [x] I have linked this PR to one or more Phabricator Task(s)
- [ ] I have run the components [**SMOKETESTS**](https://github.com/vyos/vyos-1x/tree/current/smoketest/scripts/cli) if applicable
- [x] My commit headlines contain a valid Task id
- [ ] My change requires a change to the documentation
- [ ] I have updated the documentation accordingly
pepe
February 2, 2023, 4:30pm
9
The fix seems to be working, tested on 1.3.