NetworkManager deletes IPs, doesn't restore them
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
network-manager (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
In Ubuntu 8.10, when a switch or hub is disconnected, NetworkManager deletes the IP assignment(s) and the routes associated with that interface. When the switch or hub is reconnected, NetworkManager recognizes it is back, but fails to do the "ifdown ethX; ifup ethX" or equivalent to restore the IPs and the routing. This means that merely powercycling a hub or switch requires logging into each server to restore the IPs and routing.
Checking "man NetworkManager" gives no advice on how to either turn the first "feature" of deleting static IP assignments off, or how to enable NetworkManager to properly work from the assignments in /etc/network/
It also doesn't fully take the interface down. It's up, just with no IPs and no associated routing, from the system's point of view. This is also a bug.
I've verified this on two different systems. It consistently happens. It looks like this on being triggered:
Jun 16 14:02:36 green NetworkManager: <info> (eth1): carrier now OFF (device state 3)
Jun 16 14:02:36 green NetworkManager: <info> (eth1): device state change: 3 -> 2
Jun 16 14:02:36 green NetworkManager: <info> (eth1): deactivating device (reason: 0).
Jun 16 14:02:36 green NetworkManager: <WARN> check_one_route(): (eth1) error -34 returned from rtnl_route_del(): Sucess
And this on being restored:
Jun 16 14:03:48 green kernel: [15372693.685407] eth1: link up, 100Mbps, full-duplex, lpa 0xC5E1
Jun 16 14:03:48 green NetworkManager: <info> (eth1): carrier now ON (device state 2)
Jun 16 14:03:48 green NetworkManager: <info> (eth1): device state change: 2 -> 3
Jun 16 14:03:48 green kernel: [15372693.686837] ADDRCONF(
Jun 16 14:03:59 green kernel: [15372703.856011] eth1: no IPv6 routers present
But there's no restoration of the IPs and routing.
I also suggest that the very inclusion of NetworkManager in Ubuntu is a bug. But meanwhile, what's the workaround please?
do you use ifup/ifdown (aka /etc/network/ interfaces) to control your networks? if you dont do tht NM should do the right thing. e.g. down interfaces if there is no carrier and then re-up it when there is.
To give more context, please attach the complete syslog after reproducing this.