Network migration 21.02.0-rc2

FYI:

I upgraded various devices in mixed configurations to 21.02.0-rc2 and all of them failed to migrate a custom mac-address on a bridge.

FYI:

We don’t have a officially relesed rc2 yet.

That's why i posted it, so maybe this could go into release notes.

you should probably create a ticket at github, including the specifics.

The migration is due to a really recent network config stanza change that has been implemented in the last few days/weeks, mainyl by @rmilecki. It has been backported to 21.02 roughly at the same time as it has been implemented in master.

I thnk that the migration logic is a bit simplified, and will migrate the main items, but it may not be able fully migrate all various customs configs in all scenarios. The migration will need user verification afterward. The notification about the migration should maybe contain a note about that.

2 Likes

I understand, sorry for the noise.

I've submitted a fix for that: [PATCH luci] luci-mod-network: migrate macaddr during bridge
migration

I don't think it's critical enough to skip rc2 (and e.g. proceed with rc3). We should just put that bug info in the rc2 release notes.

5 Likes

I've tried to migrate my Archer C7v2 network config by pressing the "migrate" button that was offered by LUCI after upgrading from 21.02.0-rc.1 to 21.02.0-rc.2. After that, my device went unreachable (no web UI, no ping).

My original network config I copied off the device before starting the migration was:


config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd63:8f35:a549::/48'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '1'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option vid '10'
	option ports '0t 1t'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option vid '50'
	option ports '0t 6t 1t'

config switch_vlan
	option device 'switch0'
	option vlan '4'
	option vid '30'
	option ports '0t 6t 1t'

config switch_vlan
	option device 'switch0'
	option vlan '5'
	option vid '40'
	option ports '0t 6t 1t'

config switch_vlan
	option device 'switch0'
	option vlan '6'
	option vid '134'
	option ports '0t 6t 1t'

config switch_vlan
	option device 'switch0'
	option vlan '7'
	option ports '0t 6t 1t'
	option vid '133'

config interface 'VL10'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option ipaddr 'x.y.z.61'
	option netmask '255.255.254.0'
	option gateway 'x.y.z.1'
	option broadcast 'x.y.z.255'
	list dns 'IP_ADDR_DNS1'
	list dns 'IP_ADDR_DNS2'
	option type 'bridge'
	option ifname 'bat0.10 eth1.10'

config interface 'VL30'
	option type 'bridge'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option ifname 'bat0.30 eth0.30'

config interface 'VL40'
	option type 'bridge'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option ifname 'bat0.40 eth1.40'

config interface 'VL50'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option type 'bridge'
	option ifname 'bat0.50 eth0.50'

config interface 'VL133'
	option type 'bridge'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option ifname 'eth0.133'

config interface 'VL134'
	option type 'bridge'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option ifname 'bat0.134 eth1.134'

config interface 'bat0'
	option proto 'batadv'
	option routing_algo 'BATMAN_IV'
	option aggregation '1'
	option ap_isolation '0'
	option bonding '0'
	option fragmentation '1'
	option gw_mode 'off'
	option log_level '0'
	option orig_interval '10000'
	option bridge_loop_avoidance '1'
	option distributed_arp_table '1'
	option multicast_mode '1'
	option network_coding '0'
	option hop_penalty '30'
	option isolation_mark '0x00000000/0x00000000'

config interface 'nwi_mesh0'
	option mtu '1532'
	option proto 'batadv_hardif'
	option master 'bat0'

Will now try to pull off the config LUCI created automatically out of this...

UPDATE: I can no longer access fail safe mode (ssh, telnet do NOT work) - connected as usual with a direct connection PC<->AP and coming from 192.168.1.2/24 to 192.168.1.1. The device's system led flashes fast which indicates it successfully entered failsafe mode but I cannot access it.

UPDATE 2: I've restored 21.02.0-rc.1 including my settings, then upgraded to 21.02.0-rc.2 again and manually edited my "/etc/config/network" as follows:

  • Replaced "ifname" by "device"
  • I've removed "bat0.10" from my mgmt interface where OpenWrt Web UI runs.
    I can now successfully reach my device's web UI and SSH after reboot on 21.02.0-rc.2.

SUMMARY: It looks like automatic network config migration needs to remove "bat0.XX" from bridge interfaces. I will now have a look into why that is required or if another manual config edit solves the problem.

SOLUTION is to edit /etc/config/network manually to get "DSA conform".

config device
	option name 'br-vl10'
	option type 'bridge'
	list ports 'bat0.10'
	list ports 'eth1.10'
	option igmp_snooping '1'
	option igmp_v3 '1'

config interface 'VL10'
	option proto 'static'
	option delegate '0'
	option ipaddr 'IP_ADDR'
	option netmask '255.255.254.0'
	option gateway 'GW_IP_ADDR'
	option broadcast 'BROADCAST_IP_ADDR'
	list dns 'DNS_IP1'
	list dns 'DNS_IP2'
	option device 'br-vl10'

Second device here that failed migration... Unfortunately, I'm again unable to enter fail-safe mode. 192.168.1.1 does not respond while the system led is (expectedly) fast flashing.

After all trouble now I've manually adjusted my config files and it runs fine.

I'd suggest to provide rollback after x seconds after migration took place, just in case there are problems and the device is unreachable (like we already have auto rollback for other luci driven changes).

@rmilecki Above, I've posted my originally working config before migration.

I've manually migrated to this working config. Sorry, I wasn't able to pull off what the config looked like after LuCi automated migration.


config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fd63:8f35:a549::/48'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '1'
	option description 'default'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option vid '10'
	option ports '0t 1t'
	option description 'XXX'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option vid '30'
	option ports '0t 6t 1t'
	option description 'XXX'

config switch_vlan
	option device 'switch0'
	option vlan '4'
	option vid '40'
	option ports '0t 6t 1t'
	option description 'XXX'

config switch_vlan
	option device 'switch0'
	option vlan '5'
	option vid '50'
	option ports '0t 6t 1t'
	option description 'XXX'

config switch_vlan
	option device 'switch0'
	option vlan '6'
	option ports '0t 6t 1t'
	option vid '133'
	option description 'XXX'

config switch_vlan
	option device 'switch0'
	option vlan '7'
	option vid '134'
	option ports '0t 6t 1t'
	option description 'XXX'

config device
	option name 'br-vl10'
	option type 'bridge'
	list ports 'bat0.10'
	list ports 'eth1.10'
	option igmp_snooping '1'
	option igmp_v3 '1'

config device
	option name 'br-vl30'
	option type 'bridge'
	list ports 'bat0.30'
	list ports 'eth1.30'
	option igmp_snooping '1'
	option igmp_v3 '1'

config device
	option name 'br-vl40'
	option type 'bridge'
	list ports 'bat0.40'
	list ports 'eth1.40'
	option igmp_snooping '1'
	option igmp_v3 '1'

config device
	option name 'br-vl50'
	option type 'bridge'
	list ports 'bat0.50'
	list ports 'eth1.50'
	option igmp_snooping '1'
	option igmp_v3 '1'

config device
	option name 'br-vl133'
	option type 'bridge'
	list ports 'eth1.133'
	option igmp_snooping '1'
	option igmp_v3 '1'

config device
	option name 'br-vl134'
	option type 'bridge'
	list ports 'bat0.134'
	list ports 'eth1.134'
	option igmp_snooping '1'
	option igmp_v3 '1'

config interface 'VL10'
	option proto 'static'
	option delegate '0'
	option ipaddr 'XXX'
	option netmask '255.255.254.0'
	option gateway 'XXX'
	option broadcast 'XXX'
	list dns 'XXX'
	list dns 'XXX'
	option device 'br-vl10'
	option ipv6 '0'

config interface 'VL30'
	option proto 'static'
	option delegate '0'
	option device 'br-vl30'
	option defaultroute '0'
	option ipv6 '0'

config interface 'VL40'
	option proto 'static'
	option delegate '0'
	option device 'br-vl40'
	option defaultroute '0'
	option ipv6 '0'

config interface 'VL50'
	option proto 'static'
	option delegate '0'
	option device 'br-vl50'
	option defaultroute '0'
	option ipv6 '0'

config interface 'VL133'
	option proto 'static'
	option delegate '0'
	option device 'br-vl133'
	option defaultroute '0'
	option ipv6 '0'

config interface 'VL134'
	option proto 'static'
	option delegate '0'
	option device 'br-vl134'
	option defaultroute '0'
	option ipv6 '0'

config interface 'bat0'
	option proto 'batadv'
	option routing_algo 'BATMAN_IV'
	option aggregation '1'
	option ap_isolation '0'
	option bonding '0'
	option fragmentation '1'
	option gw_mode 'off'
	option log_level '0'
	option orig_interval '10000'
	option bridge_loop_avoidance '1'
	option distributed_arp_table '1'
	option multicast_mode '1'
	option network_coding '0'
	option hop_penalty '30'
	option isolation_mark '0x00000000/0x00000000'

config interface 'nwi_mesh0'
	option mtu '1532'
	option proto 'batadv_hardif'
	option master 'bat0'

should be doable via serial... or something like;

(sleep 120; cp /etc/config/network /USBMOUNT/; sync) &

then perform migration and wait 2 mins... would be most helpful... ( same goes for anyone else testing the RC )

2 Likes

I am now seeing this in my log for two SSID bridged to the same interface (config interface). The interface is correctly configured to a bridge (config device).

Jun  3 09:36:57 WifiAP-01-OG kernel: [55258.125559] ath10k_pci 0000:00:00.0: No VIF found for vdev 1
Jun  3 09:36:57 WifiAP-01-OG kernel: [55258.131358] ath10k_pci 0000:00:00.0: received addba event for invalid vdev_id: 1
Jun  3 09:36:57 WifiAP-01-OG kernel: [55258.162437] ath10k_pci 0000:00:00.0: No VIF found for vdev 1
Jun  3 09:36:57 WifiAP-01-OG kernel: [55258.168243] ath10k_pci 0000:00:00.0: no vif for vdev_id 1 found
Jun  3 09:36:57 WifiAP-01-OG hostapd: nl80211: Failed to remove interface wlan0-1 from bridge br-vl101: No such device

Tried "wifi down; sleep 10; wifi up" and got the above logread output.

EDIT: I removed the parts that were wrong - had another unrelated issue.

Thanks for your great debugging @anon2180415!

I took your original config, copied to my working device and run step 1 migration on it. It broke connectivity for me as I run totally different device but I could still make a copy using serial console shell access.
I fixed my network, copied post-step-1 version of your network and run step 2 migration on it. I lost connectivity again but I got the final (post migration process) network.

I'm pasting relevant part of post-migration network:

config device
	option name 'br-VL10'
	option type 'bridge'
	list ports 'bat0.10'
	list ports 'eth1.10'

config interface 'VL10'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option ipaddr 'x.y.z.61'
	option netmask '255.255.254.0'
	option gateway 'x.y.z.1'
	option broadcast 'x.y.z.255'
	list dns 'IP_ADDR_DNS1'
	list dns 'IP_ADDR_DNS2'
	option device 'br-VL10'

I've compared network I got after migration with your manually editied one:

obraz

I don't see anything important in your manual modifications that could explain why auto-migrated config didn't work. Your lower case br-vl10 looks nice but it shouldn't matter. IGMP options and multicast_querier were not migrated automatically but they shouldn't be critical.

1 Like

I've compared your manually migrated config with the automatically migrated one:

config interface 'loopback'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'
	option device 'lo'

config globals 'globals'
	option ula_prefix 'fd63:8f35:a549::/48'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '1'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option vid '10'
	option ports '0t 1t'

config switch_vlan
	option device 'switch0'
	option vlan '3'
	option vid '50'
	option ports '0t 6t 1t'

config switch_vlan
	option device 'switch0'
	option vlan '4'
	option vid '30'
	option ports '0t 6t 1t'

config switch_vlan
	option device 'switch0'
	option vlan '5'
	option vid '40'
	option ports '0t 6t 1t'

config switch_vlan
	option device 'switch0'
	option vlan '6'
	option vid '134'
	option ports '0t 6t 1t'

config switch_vlan
	option device 'switch0'
	option vlan '7'
	option ports '0t 6t 1t'
	option vid '133'

config interface 'VL10'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option ipaddr 'x.y.z.61'
	option netmask '255.255.254.0'
	option gateway 'x.y.z.1'
	option broadcast 'x.y.z.255'
	list dns 'IP_ADDR_DNS1'
	list dns 'IP_ADDR_DNS2'
	option device 'br-VL10'

config interface 'VL30'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option device 'br-VL30'

config interface 'VL40'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option device 'br-VL40'

config interface 'VL50'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option device 'br-VL50'

config interface 'VL133'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option device 'br-VL133'

config interface 'VL134'
	option proto 'static'
	option delegate '0'
	option igmp_snooping '1'
	option igmp_v3 '1'
	option multicast_querier '0'
	option device 'br-VL134'

config interface 'bat0'
	option proto 'batadv'
	option routing_algo 'BATMAN_IV'
	option aggregation '1'
	option ap_isolation '0'
	option bonding '0'
	option fragmentation '1'
	option gw_mode 'off'
	option log_level '0'
	option orig_interval '10000'
	option bridge_loop_avoidance '1'
	option distributed_arp_table '1'
	option multicast_mode '1'
	option network_coding '0'
	option hop_penalty '30'
	option isolation_mark '0x00000000/0x00000000'

config interface 'nwi_mesh0'
	option mtu '1532'
	option proto 'batadv_hardif'
	option master 'bat0'

config device
	option name 'br-VL10'
	option type 'bridge'
	list ports 'bat0.10'
	list ports 'eth1.10'

config device
	option name 'br-VL30'
	option type 'bridge'
	list ports 'bat0.30'
	list ports 'eth0.30'

config device
	option name 'br-VL40'
	option type 'bridge'
	list ports 'bat0.40'
	list ports 'eth1.40'

config device
	option name 'br-VL50'
	option type 'bridge'
	list ports 'bat0.50'
	list ports 'eth0.50'

config device
	option name 'br-VL133'
	option type 'bridge'
	list ports 'eth0.133'

config device
	option name 'br-VL134'
	option type 'bridge'
	list ports 'bat0.134'
	list ports 'eth1.134'

Except for igmp_snooping, igmp_v3 and multicast_querier I see that your manually migrated config has:

  1. ipv6 set to 0
  2. defaultroute set to 0
  3. lowecase bridge device names
  4. changed vid
  5. changed eth0 to eth1

The last one is a bit suspicious. Is that possible something has changed in Ethernet devices numeration (eth0 swapped with eth1) in the 21.02?

@anon2180415: did you use prebuilt 21.02-rc2 or did you build own firmware w Image Builder?

1 Like

@rmilecki I did use imageBuilder, somehow eth1 is related to the wan port of archer c7v2, eth0 is lan 1 to 4 ports. I did tag the cpu handling eth0 with vlan and put the other cpu handling eth1 to off on the switch page. (did this long ago and it worked on 19.07). Maybe the problem is how the cpu's are tagged on the switch page for him?

@rmilecki My first try migrating on 21.02.0-rc.2 was using an outdated package version of luci-app-network that was present on the servers for some time after the official announcement and then got replaced by the correct package version (I've read that on the other thread.). If your migration tests look good, I think the outdated package version is the culprit.

1 Like