Config.boot become empty after reboot

Hi,

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?

best regards.

Hello,

can you please run and show us,

show system image
and
show version

thank you

Hi,

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:         test@test.com
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)

Hey,

there are some things you can try:

  • boot a minimal config (maybe just one interface ip)
  • test the current rolling release here
  • “show log all” and look if there are error which look like the cause
  • activate the vyos-debug option on boot

press ‘e’ in grub and add vyos-debug option, after this press crtl+x to boot

           GNU GRUB  version 1.98+20100804-14+vyos1+helium1

 +--------------------------------------------------------------------------+
 | linux /boot/1.2.1/vmlinuz boot=live quiet rootdelay=5 vyos-union=/boo /\ |
 | 1.2.1 console=tty0 console=ttyS0,9600 vyos-debug                         |
 | initrd /boot/1.2.1/initrd.img                                            |
 |                                                                          |
 |                                                                          |
 |                                                                          |
 |                                                                          |
 |                                                                          |
 |                                                                          |
 |                                                                          |
 |                                                                          |
 +--------------------------------------------------------------------------+

  Minimum Emacs-like screen editing is supported. TAB lists
  completions. Press Ctrl-x to boot, Ctrl-c for a
  command-line or ESC to discard edits and return to the
  GRUB menu.

the debug information are here:
/var/log/vyatta/cfg-stdout.log

Hi,

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

best regards.