]> git.proxmox.com Git - mirror_ifupdown2.git/commit
addons: address: log error when ip route gateway command fails
authorJulien Fortin <julien@cumulusnetworks.com>
Fri, 13 Jan 2017 03:51:28 +0000 (06:51 +0300)
committerJulien Fortin <julien@cumulusnetworks.com>
Fri, 13 Jan 2017 03:51:28 +0000 (06:51 +0300)
commit5b6667493853c3e62bf1336518fd41a6f389d141
tree5146da6971e8993afbde0004fc97c5fe59903ab7
parent23d70d0414dce298f9eb62f8f915f3b9282cf470
addons: address: log error when ip route gateway command fails

Ticket: CM-14386
Reviewed By: Roopa, Purna, NIkhil G
Testing Done:

We have incorrect Address Range and Default g/w configuration. Kernel will give
error in such condition and ignore the route. but ifupdown2 is masking this
error and making user in blind spot.

$ ifdown -a -X eth0
$ ifreload -a
error: h2t_c-1: cmd 'ip route add table DataVrf1080 default via 3.0.0.1 dev h2t_c-1' failed: returned 2 (RTNETLINK answers: Network is unreachable
)
$ echo $?
1
$ ifquery -a
auto h2t_c-1
iface h2t_c-1
      address 6.0.0.1/26
      address 2001:fee1::1/64
      bond-slaves swp1 swp2
      bond-mode 802.3ad
      bond-miimon 100
      bond-min-links 1
      bond-xmit-hash-policy layer3+4
      bond-lacp-rate 1
      mtu 9152
      alias Local Node/s hostd-1-1 and Ports swp1 swp2 <==> Remote  Node/s torc-1-1 torc-1-2 and Ports swp7 swp7
      gateway 3.0.0.1
      gateway 2001:fee1::1
      vrf DataVrf1080

auto DataVrf1080
iface DataVrf1080
      vrf-table 1080

$

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
addons/address.py