NethSecurity 8.7.1: Slave WAN Interfaces Not Coming Up After HA Upgrade [SOLVED]

Hello,
After I upgraded from NethSecurity 8-24.10.0-ns.1.6.0 to NethSecurity 8.7.1, the two WAN interfaces on the Slave router don’t come up.
What I did:

  1. Upgrade of Slave and Primary routers to NethSecurity 8.7.1
  2. ns-ha-config reset
  3. Configuring keepalived.

After configuration the status is OK, I stop Primary and Slave becomes Primary now, but the WAN interfaces are down.
The VIP IP address moves between primary and slave
Any idea what the problem is?

I noticed perhaps two problems:

  1. in /etc/init.d/mwan3 restart there is a syntax error:
# /etc/init.d/mwan3 restart
grep: warning: stray \ before :
grep: warning: stray \ before :

Fixed by replacing on line 80:
from

for rule in $($IP rule list | grep -E '^[1-3][0-9]{3}\:' | cut -d ':' -f 1); do

to

for rule in $($IP rule list | grep -E '^[1-3][0-9]{3}:' | cut -d ':' -f 1); do
  1. When I try to run keepalived debug, I get an error with reload_config
 [P]:~# uci set keepalived.primary.debug=1
 [P]:~# uci commit keepalived
 [P]:~# reload_config
uci: Entry not found
 [P]:~#

For point 2, I have no idea why it’s giving an error.

Best Regards,

P.S.: I forgot to add, I tried to do ifup wan1, but it has no effect. I had added the option option auto '0', I removed it manually, restarted, it doesn’t help. For some reason this option appeared again. This is the config of one WAN


config device 'ns_50cf3728'
        option name 'eth0.11'
        option type '8021q'
        option ifname 'eth0'
        option vid '11'
        option ipv6 '0'
        option macaddr '00:AA:BB:CC:DD:EE'

config interface 'wan1'
        list ns_tag 'ha'
        option auto '0'
        option device 'eth0.11'
        option proto 'dhcp'
        option hostname '*'
        option force_link '0'
        option metric '30'

Do you see anything wrong in this config?

After several hours of struggle, I finally found the problem, there were duplicate entries in /etc/config/network

# uci show network | grep -E 'ns_50cf3728|ns_bb7eee63'
network.ns_50cf3728=device
network.ns_50cf3728.name='eth0.11'
network.ns_50cf3728.type='8021q'
network.ns_50cf3728.ifname='eth0'
network.ns_50cf3728.vid='11'
network.ns_50cf3728.ipv6='0'
network.ns_50cf3728.macaddr='00:90:7f:44:5a:41'
network.ns_bb7eee63=device
network.ns_bb7eee63.name='eth0.11'
network.ns_bb7eee63.ifname='eth0'
network.ns_bb7eee63.vid='11'
network.ns_bb7eee63.ipv6='0'
network.ns_bb7eee63.macaddr='00:90:7f:44:5a:41'
network.ns_bb7eee63.ns_tag='ha'

Since I didn’t know which entry was old (outdated), I checked which entry ns_50cf3728 or ns_bb7eee63 existed on the primary router. In my case, the primary router had an entry for ns_50cf3728 and I deleted ns_bb7eee63

uci delete network.ns_bb7eee63
uci commit network

I tried with /etc/init.d/network reload but it didn’t work and I restarted the router. After that everything works normally.

2 Likes