The version of my VyOS instance is 1.2.1, recently, it has a very serious problem. after rebooting, the configuration of my instance are totally lost, and /config/config.boot also become empty, there is error message “Configuration under specified path is empty” in the file.
I restored config.boot with my configuration backup file, after booting, the configuration can be restored either, but horribly the problem occur again in the next reboot
Anyone has clue about this problem, where should I look into?
This is the version, I built it by myself based on 1.2.1 release
vyos@vyos:~$ show version
Version: VyOS 1.2.1
Built by: [email protected]
Built on: Wed 17 Apr 2019 05:35 UTC
Build ID: 6eba3606-488e-5479-b416-e9b4124352ec
Architecture: x86_64
Boot via: installed image
System type: KVM guest
Hardware vendor: innotek GmbH
Hardware model: VirtualBox
Hardware S/N: Unknown
Hardware UUID: Unknown
Copyright: VyOS maintainers and contributors
vyos@vyos:~$ show system image
The system currently has the following image(s) installed:
1: 1.2.1 (default boot)
I may found the cause. After checking the log for rc.local and /var/log/vyatta/vyatta-config-loader.log, I found that commit time has conflict between bootfile load and command execution in rc.local(PS: I put some vyos configuration commands in rc.local), this might be caused by parallel execution of systemd on boot time. After moving those configuration commands into /config/scripts/vyos-postconfig-bootup.script, the problem is solved.
But it makes me thinking that:
1 why commit conflict will cause lose of bootfile configuration?
2 is that possible that vyos only allow one configuration session at same time? it’s not only for this case on boot time, when we operate in routine, sometimes, it’s hard to avoid that one more persons are performing commands at same time