← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1667863] Re: if a subnet has multiple static routes, the network interfaces file is invalid

 

[Expired for MAAS because there has been no activity for 60 days.]

** Changed in: maas
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1667863

Title:
  if a subnet has multiple static routes, the network interfaces file is
  invalid

Status in cloud-init:
  Expired
Status in curtin:
  Invalid
Status in MAAS:
  Expired

Bug description:
  I have multiple subnets, each has an additional custom static route.

  those subnets are used by different bridges on the same node.

  example:
  brAdm (on interface enp9s0) - subnet 172.30.72.128/25 - static route 172.30.72.0/21 gw 172.30.72.129
  brPublic (on interface ens9.2002) - subnet 172.30.80.128/25 - static route 172.30.80.0/21 gw 172.30.80.129

  the resulting pre-up and post-up lines in /etc/network/interfaces are
  malformed, which creates then the wrong routing table.

  It seems the pre-down of one route and the post-up of the next route
  are not separated by a newline.

  See below:

  post-up route add -net 172.30.80.0 netmask 255.255.248.0 gw 172.30.80.129 metric 0 || true
  pre-down route del -net 172.30.80.0 netmask 255.255.248.0 gw 172.30.80.129 metric 0 || truepost-up route add -net 172.30.72.0 netmask 255.255.248.0 gw 172.30.72.129 metric 0 || true
  pre-down route del -net 172.30.72.0 netmask 255.255.248.0 gw 172.30.72.129 metric 0 || true

  
  Here's the entire resulting network configuration for reference.
  note that a bunch of other bridge interfaces are created, but not used on this machine, so not configured.

  ----------------------------
  cat /etc/network/interfaces
  auto lo
  iface lo inet loopback
      dns-nameservers 172.30.72.130
      dns-search r16maas.os maas

  auto enp9s0
  iface enp9s0 inet manual
      mtu 9000

  auto ens9
  iface ens9 inet manual
      mtu 9000

  auto brAdm
  iface brAdm inet static
      address 172.30.72.132/25
      hwaddress ether 08:9e:01:ab:fc:f6
      bridge_ports enp9s0
      bridge_fd 15
      mtu 9000

  auto brData
  iface brData inet manual
      hwaddress ether 00:02:c9:ce:7c:16
      bridge_ports ens9.0
      bridge_fd 15
      mtu 9000

  auto brExt
  iface brExt inet manual
      hwaddress ether 00:02:c9:ce:7c:16
      bridge_ports ens9.0
      bridge_fd 15
      mtu 9000

  auto brInt
  iface brInt inet manual
      hwaddress ether 00:02:c9:ce:7c:16
      bridge_ports ens9.0
      bridge_fd 15
      mtu 9000

  auto brPublic
  iface brPublic inet static
      address 172.30.80.132/25
      gateway 172.30.80.129
      hwaddress ether 00:02:c9:ce:7c:16
      bridge_ports ens9.0
      bridge_fd 15
      mtu 9000

  auto brStoClu
  iface brStoClu inet manual
      hwaddress ether 00:02:c9:ce:7c:16
      bridge_ports ens9.0
      bridge_fd 15
      mtu 9000

  auto brStoData
  iface brStoData inet manual
      hwaddress ether 00:02:c9:ce:7c:16
      bridge_ports ens9.0
      bridge_fd 15
      mtu 9000

  auto brAdm.52
  iface brAdm.52 inet manual
      vlan_id 52
      mtu 1500
      vlan-raw-device brAdm

  auto ens9.0
  iface ens9.0 inet manual
      mtu 9000
      vlan-raw-device ens9
  post-up route add -net 172.30.80.0 netmask 255.255.248.0 gw 172.30.80.129 metric 0 || true
  pre-down route del -net 172.30.80.0 netmask 255.255.248.0 gw 172.30.80.129 metric 0 || truepost-up route add -net 172.30.72.0 netmask 255.255.248.0 gw 172.30.72.129 metric 0 || true
  pre-down route del -net 172.30.72.0 netmask 255.255.248.0 gw 172.30.72.129 metric 0 || true
  source /etc/network/interfaces.d/*.cfg

  ----------------------------
  route
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  172.30.72.128   *               255.255.255.128 U     0      0        0 brAdm
  172.30.80.128   *               255.255.255.128 U     0      0        0 brPublic

  
  ----------------------------
  ifconfig
  brAdm     Link encap:Ethernet  HWaddr 08:9e:01:ab:fc:f6
            inet addr:172.30.72.132  Bcast:172.30.72.255  Mask:255.255.255.128
            inet6 addr: fe80::a9e:1ff:feab:fcf6/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:9000  Metric:1
            RX packets:15029 errors:0 dropped:0 overruns:0 frame:0
            TX packets:1447 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:7393978 (7.3 MB)  TX bytes:182411 (182.4 KB)

  brAdm.52  Link encap:Ethernet  HWaddr 08:9e:01:ab:fc:f6
            inet6 addr: fe80::a9e:1ff:feab:fcf6/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:7885 errors:0 dropped:0 overruns:0 frame:0
            TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:398943 (398.9 KB)  TX bytes:488 (488.0 B)

  brData    Link encap:Ethernet  HWaddr 00:02:c9:ce:7c:16
            inet6 addr: fe80::202:c9ff:fece:7c16/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:9000  Metric:1
            RX packets:2 errors:0 dropped:0 overruns:0 frame:0
            TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:152 (152.0 B)  TX bytes:648 (648.0 B)

  brExt     Link encap:Ethernet  HWaddr ca:48:e5:20:50:fa
            inet6 addr: fe80::c848:e5ff:fe20:50fa/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B)  TX bytes:648 (648.0 B)

  brInt     Link encap:Ethernet  HWaddr fa:63:19:24:ed:80
            inet6 addr: fe80::f863:19ff:fe24:ed80/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B)  TX bytes:648 (648.0 B)

  brPublic  Link encap:Ethernet  HWaddr 00:02:c9:ce:7c:16
            inet addr:172.30.80.132  Bcast:172.30.80.255  Mask:255.255.255.128
            inet6 addr: fe80::9840:fbff:fe1f:b2b4/64 Scope:Link
            UP BROADCAST MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B)  TX bytes:258 (258.0 B)

  brStoClu  Link encap:Ethernet  HWaddr c2:09:5a:67:d3:da
            inet6 addr: fe80::c009:5aff:fe67:d3da/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B)  TX bytes:648 (648.0 B)

  brStoData Link encap:Ethernet  HWaddr 0e:24:f0:9b:e5:ea
            inet6 addr: fe80::c24:f0ff:fe9b:e5ea/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
            TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:0 (0.0 B)  TX bytes:648 (648.0 B)

  enp9s0    Link encap:Ethernet  HWaddr 08:9e:01:ab:fc:f6
            inet6 addr: fe80::a9e:1ff:feab:fcf6/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:9000  Metric:1
            RX packets:18629 errors:0 dropped:67 overruns:0 frame:0
            TX packets:1454 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:7960838 (7.9 MB)  TX bytes:190759 (190.7 KB)
            Interrupt:18 Memory:dfd00000-dfd20000

  ens9      Link encap:Ethernet  HWaddr 00:02:c9:ce:7c:16
            inet6 addr: fe80::202:c9ff:fece:7c16/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:9000  Metric:1
            RX packets:9747 errors:0 dropped:67 overruns:0 frame:0
            TX packets:154 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:658955 (658.9 KB)  TX bytes:15148 (15.1 KB)

  ens9.0    Link encap:Ethernet  HWaddr 00:02:c9:ce:7c:16
            UP BROADCAST RUNNING MULTICAST  MTU:9000  Metric:1
            RX packets:2 errors:0 dropped:0 overruns:0 frame:0
            TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000
            RX bytes:152 (152.0 B)  TX bytes:1156 (1.1 KB)

  lo        Link encap:Local Loopback
            inet addr:127.0.0.1  Mask:255.0.0.0
            inet6 addr: ::1/128 Scope:Host
            UP LOOPBACK RUNNING  MTU:65536  Metric:1
            RX packets:163 errors:0 dropped:0 overruns:0 frame:0
            TX packets:163 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1
            RX bytes:12104 (12.1 KB)  TX bytes:12104 (12.1 KB)

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1667863/+subscriptions