Page MenuHomeVyOS Platform

Correct adding interfaces on boot
Closed, ResolvedPublicBUG

Description

We have discus with @runar in slack and have some result with testing VM with 20+ interfaces.
When router booting, part of interfaces adding by coldplug function and other by hotplug.
And after boot system we have next:

vyos@vyos:~$ show interfaces 
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             -                                 A/D  
eth1             -                                 A/D  
eth2             -                                 A/D  
eth3             -                                 u/u  
eth4             -                                 A/D  
eth5             -                                 A/D  
eth6             -                                 u/u  
eth7             -                                 A/D  
eth8             -                                 u/u  
eth9             -                                 A/D  
eth10            -                                 A/D  
eth11            -                                 A/D  
eth12            -                                 A/D  
eth13            -                                 A/D  
eth14            -                                 A/D  
eth15            -                                 A/D  
eth16            -                                 A/D  
eth17            -                                 A/D  
eth18            -                                 A/D  
eth19            -                                 A/D  
eth20            -                                 A/D  
eth21            -                                 A/D  
lo               127.0.0.1/8                       u/u  
                 ::1/128

If we look in to configuration

vyos@vyos:~$ show configuration commands | match interface
set interfaces ethernet eth3 hw-id '50:00:00:05:00:03'
set interfaces ethernet eth6 hw-id '50:00:00:05:00:06'
set interfaces ethernet eth8 hw-id '50:00:00:05:00:08'
set interfaces loopback lo

And for this task @runar have workaround, which can solve this issue, and some issues with interface naming. We can modify vyos-router and add next:

# On boot time udev migth take quite a lot of time to reorder nic's, this will ensure that
# all udev activity is completed and all nics present at boot-time will have their final name before 
# continuing with vyos-router initialization.
echo "`date '+%a %b %d %H:%M:%S %Y'`: vyos-router: Waiting for NIC's to settle down" | tee -a /run/udev/log/vyatta-net-name.coldplug
SECONDS=0
udevadm settle
echo "`date '+%a %b %d %H:%M:%S %Y'`: vyos-router: NIC's used ${SECONDS}sec to settle down" | tee -a /run/udev/log/vyatta-net-name.coldplug

Details

Difficulty level
Unknown (require assessment)
Version
1.2.4
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Revisions and Commits

Event Timeline

Unknown Object (User) created this task.Jan 19 2020, 5:21 PM
Unknown Object (User) changed the task status from Open to Needs testing.Jan 23 2020, 7:49 AM
Unknown Object (User) changed the task status from Needs testing to Backport candidate.Jan 23 2020, 12:26 PM
Unknown Object (User) added a project: VyOS 1.2 Crux (VyOS 1.2.5).

This patch tested successful on VyOS 1.2.4 VM with 25 network interfaces.
Also works as expected on VyOS 1.3-rolling-202001230217
Thx @runar !

Thanks @runar . It worked for me.
Libvirtd +6 interfaces.

syncer triaged this task as High priority.Feb 28 2020, 2:58 AM
syncer moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.