Losing Interface configuration on reboot randomly

Hello All,

My Vyos router sometimes loses the interface configuration and bring down the interface on reboot. It is happening randomly. Has someone else also experienced this issue? any clues, please

Hello @mohisaxe, I guess this is a rolling version, which version exactly?
Can you describe the platform (bare metal, hypervisor), count of NICs?
In debugging chapter https://docs.vyos.io/en/latest/contributing/development.html#debugging described how to get config backtrace if something wrong.

Linux version 4.19.84-amd64-vyos (vyos_bld@7cb18d84c40e) (gcc version 4.9.2 (Debian 4.9.2-10+deb8u2)) #1 SMP Sun Nov 17 19:42:30 UTC 2019

Its base metal install on Intel Celeron J1900 Quad Core Processor. There are 4 Gigabit Ethernet Ports.
I tried checking the config commits and here are my findings:

-rw-r–r-- 1 root vyattacfg 367 Jul 31 15:15 config.boot.13.gz
-rw-r–r-- 1 root vyattacfg 553 Jul 31 15:07 config.boot.14.gz
-rw-r–r-- 1 infi users 578 Jul 31 15:06 config.boot.15
-rw-r–r-- 1 infi vyattacfg 4603 Jul 30 22:05 config.boot.16
-rw-r–r-- 1 infi users 578 Jul 30 16:54 config.boot.17

infinity@k752zzb3:/opt/vyatta/etc/config/archive$ more config.boot.15
system {
config-management {
commit-revisions 200
}
console {
device ttyS0 {
speed 9600
}
}
ntp {
}
time-zone UTC
}

/* Warning: Do not remove the following line. /
/
=== vyatta-config-version: “broadcast-relay@1:cluster@1:config-management@1:conntrack-sync@1:conntrack@1:dhcp-relay@2:dhcp-server@5:dns-forwarding@1:firewal
l@5:ipsec@5:l2tp@1:mdns@1:nat@4:ntp@1:pptp@1:qos@1:quagga@3:snmp@1:ssh@1:system@9:vrrp@2:wanloadbalance@3:webgui@1:webproxy@1:webproxy@2:zone-policy@1” === /
/
Release version: 1.2.3 */
infinity@k752zzb3:/opt/vyatta/etc/config/archive$

13      2020-07-31 15:15:23 root by cli
14      2020-07-31 15:07:52 root by vyos-http-api
15      2020-07-31 15:06:36 root by boot-config-loader
16      2020-07-30 22:05:48 infi by cli

you can see that the config file initially was 4603 Bytes and the boot loader again committed and file size remained 578 Bytes only. The file only had the system section.

its 1.2.3, bare metal, 4 Gbe interfaces

Linux version 4.19.84-amd64-vyos (vyos_bld@7cb18d84c40e) (gcc version 4.9.2 (Debian 4.9.2-10+deb8u2)) #1 SMP Sun Nov 17 19:42:30 UTC 2019

Its base metal install on Intel Celeron J1900 Quad Core Processor. There are 4 Gigabit Ethernet Ports.
I tried checking the config commits and here are my findings:

-rw-r–r-- 1 root vyattacfg 367 Jul 31 15:15 config.boot.13.gz
-rw-r–r-- 1 root vyattacfg 553 Jul 31 15:07 config.boot.14.gz
-rw-r–r-- 1 infi users 578 Jul 31 15:06 config.boot.15
-rw-r–r-- 1 infi vyattacfg 4603 Jul 30 22:05 config.boot.16
-rw-r–r-- 1 infi users 578 Jul 30 16:54 config.boot.17

infinity@k752zzb3:/opt/vyatta/etc/config/archive$ more config.boot.15
system {
config-management {
commit-revisions 200
}
console {
device ttyS0 {
speed 9600
}
}
ntp {
}
time-zone UTC
}

/* Warning: Do not remove the following line. /
/
=== vyatta-config-version: “broadcast-relay@1:cluster@1:config-management@1:conntrack-sync@1:conntrack@1:dhcp-relay@2:dhcp-server@5:dns-forwarding@1:firewal
l@5:ipsec@5:l2tp@1:mdns@1:nat@4:ntp@1:pptp@1:qos@1:quagga@3:snmp@1:ssh@1:system@9:vrrp@2:wanloadbalance@3:webgui@1:webproxy@1:webproxy@2:zone-policy@1” === /
/
Release version: 1.2.3 */
infinity@k752zzb3:/opt/vyatta/etc/config/archive$

13      2020-07-31 15:15:23 root by cli
14      2020-07-31 15:07:52 root by vyos-http-api
15      2020-07-31 15:06:36 root by boot-config-loader
16      2020-07-30 22:05:48 infi by cli

you can see that the config file initially was 4603 Bytes and the boot loader again committed and file size remained 578 Bytes only. The file only had the system section.

Hello @mohisaxe, do you have a chance to update your router to 1.2.5? As I remember from 1.2.4 was added some NICs settle delay for solving the similar issues
Provide please also output of the commands:

sudo cat /var/log/vyatta/vyatta-config-loader.log 
sudo cat /var/log/vyatta/vyatta-commit.log

2020-07-28 15:47:55 – load finished successfully
2020-07-28 15:47:55 – begin commit
2020-07-28 15:48:31 – commit succeeded
2020-07-28 15:48:31 – teardown succeeded
2020-07-28 15:48:31 – exiting
2020-07-29 13:35:14 == begin boot-config-loader
2020-07-29 13:35:14 – begin load
2020-07-29 13:35:14 – load finished successfully
2020-07-29 13:35:14 – begin commit
2020-07-29 13:35:17 – commit succeeded
2020-07-29 13:35:17 – teardown succeeded
2020-07-29 13:35:17 – exiting
2020-07-30 13:59:24 == begin boot-config-loader
2020-07-30 13:59:24 – begin load
2020-07-30 13:59:25 – load finished successfully
2020-07-30 13:59:25 – begin commit
2020-07-30 14:00:02 – commit succeeded
2020-07-30 14:00:02 – teardown succeeded
2020-07-30 14:00:02 – exiting
2020-07-30 16:54:47 == begin boot-config-loader
2020-07-30 16:54:47 – begin load
2020-07-30 16:54:47 – load finished successfully
2020-07-30 16:54:47 – begin commit
2020-07-30 16:54:50 – commit succeeded
2020-07-30 16:54:50 – teardown succeeded
2020-07-30 16:54:50 – exiting
2020-07-31 15:06:33 == begin boot-config-loader
2020-07-31 15:06:33 – begin load
2020-07-31 15:06:33 – load finished successfully
2020-07-31 15:06:33 – begin commit
2020-07-31 15:06:36 – commit succeeded
2020-07-31 15:06:36 – teardown succeeded
2020-07-31 15:06:36 – exiting
2020-07-31 15:15:15 == begin boot-config-loader
2020-07-31 15:15:15 – begin load
2020-07-31 15:15:16 – load finished successfully
2020-07-31 15:15:16 – begin commit
2020-07-31 15:15:20 – commit succeeded
2020-07-31 15:15:21 – teardown succeeded
2020-07-31 15:15:21 – exiting
2020-07-31 15:28:05 == begin boot-config-loader
2020-07-31 15:28:05 – begin load
2020-07-31 15:28:05 – load finished successfully
2020-07-31 15:28:05 – begin commit
2020-07-31 15:28:08 – commit succeeded
2020-07-31 15:28:08 – teardown succeeded
2020-07-31 15:28:08 – exiting
2020-07-31 16:55:05 == begin boot-config-loader
2020-07-31 16:55:05 – begin load
2020-07-31 16:55:05 – load finished successfully
2020-07-31 16:55:05 – begin commit
2020-07-31 16:55:10 – commit succeeded
2020-07-31 16:55:10 – teardown succeeded
2020-07-31 16:55:10 – exiting
2020-07-31 16:57:03 == begin boot-config-loader
2020-07-31 16:57:03 – begin load
2020-07-31 16:57:03 – load finished successfully
2020-07-31 16:57:03 – begin commit
2020-07-31 16:57:06 – commit succeeded
2020-07-31 16:57:06 – teardown succeeded
2020-07-31 16:57:06 – exiting
2020-07-31 17:31:42 == begin boot-config-loader
2020-07-31 17:31:42 – begin load
2020-07-31 17:31:43 – load finished successfully
2020-07-31 17:31:43 – begin commit
2020-07-31 17:32:12 – commit succeeded

Hello @mohisaxe, it seems all commands from config applied successfully. Maybe you know how to reproduce behavior with unconfigured interfaces after reboot?

But i think the config.boot itself got reduced to System section only and lost all the interfaces and routing configuration. Please see my previous comment where I have mentioned the size of the config.boot reducing to 578 bytes only.

I guess this possible only when some parts of the config did not apply.
Can you try to reproduce this on 1.2.5?

Ok let me try to do that