Open pescobar opened 5 years ago
Hi Pablo, can you check what the default route is after the first and second runs? Has the network config been applied successfully or not?
ups, I missed this...sorry for the late reply. I will do the requested tests tomorrow and I will reply here again
this is the network config with a clean installation of the machine (no ansible execution yet)
$> ip a
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 3e:ae:97:38:7d:c9 brd ff:ff:ff:ff:ff:ff
inet 10.10.10.17/25 brd 10.10.10.127 scope global noprefixroute dynamic eth0
valid_lft 42695sec preferred_lft 42695sec
inet6 fe80::3cae:97ff:fe38:7dc9/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 06:a5:b3:8f:34:fd brd ff:ff:ff:ff:ff:ff
$> ip r
default via 10.10.10.1 dev eth0 proto dhcp metric 100
10.10.10.0/25 dev eth0 proto kernel scope link src 10.10.10.17 metric 100
after the first run I get the error in RUNNING HANDLER [MichaelRigart.interfaces : Check active Ethernet interface state]
and this the network status after the error:
$> ip a
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 3e:ae:97:38:7d:c9 brd ff:ff:ff:ff:ff:ff
inet 10.10.10.17/25 brd 10.10.10.127 scope global dynamic eth0
valid_lft 43120sec preferred_lft 43120sec
inet6 fe80::3cae:97ff:fe38:7dc9/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 06:a5:b3:8f:34:fd brd ff:ff:ff:ff:ff:ff
inet 100.100.100.66/24 brd 100.100.100.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::4a5:b3ff:fe8f:34fd/64 scope link
valid_lft forever preferred_lft forever
$> ip r
default via 10.10.10.1 dev eth0
10.10.10.0/25 dev eth0 proto kernel scope link src 10.10.10.17
100.100.100.0/24 dev eth1 proto kernel scope link src 100.100.100.66
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
and after second execution it works fine and this is the final network status:
$> ip a
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 3e:ae:97:38:7d:c9 brd ff:ff:ff:ff:ff:ff
inet 10.10.10.17/25 brd 10.10.10.127 scope global dynamic eth0
valid_lft 42953sec preferred_lft 42953sec
inet6 fe80::3cae:97ff:fe38:7dc9/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 06:a5:b3:8f:34:fd brd ff:ff:ff:ff:ff:ff
inet 100.100.100.66/24 brd 100.100.100.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::4a5:b3ff:fe8f:34fd/64 scope link
valid_lft forever preferred_lft forever
$> ip r
default via 100.100.100.254 dev eth1
10.10.10.0/25 dev eth0 proto kernel scope link src 10.10.10.17
100.100.100.0/24 dev eth1 proto kernel scope link src 100.100.100.66
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
thanks for looking into this issue
I am trying to configure a machine that is working with gateway 10.10.10.1 (eth0) to use a different gateway (100.100.100.254) in eth1 . this is my config:
When I run the role I get this error:
If I rerun the role it works fine at the second try.
I could also workaround the issue by commenting out these lines
any suggestion about how to do a proper fix that could be merged upstream? I can test it and send a PR