xapi-project / xcp-networkd

The XCP networking daemon
Other
14 stars 42 forks source link

CA-244087: Update dhclient interface conf on changing default gateway. #103

Closed sharady closed 7 years ago

sharady commented 7 years ago

xcp-networkd must stop and start the dhclient for the interface if default gateway has changed.

Example: 1) If default gateway is xenbr0 - Its conf file will keep this gateway information. 2) Switch the default gateway to xenbr1 - Its conf file will be created with gateway information. 3) Switch the default gateway back to xenbr0 then dhclient won't get restarted.

Reason: 1) While switching default gateway from xenbr0 to xenbr1, gateway information from xenbr0 conf file was not removed. 2) On switching default gateway from xenbr1 to xenbr0, xcp-networkd found no diff in conf file hence not retarted the dhclient for xenbr0.

It resulted default gateway still pointed to xenbr1.

Signed-off-by: sharad yadav sharad.yadav@citrix.com

lindig commented 7 years ago

Are we waiting for @robhoes or is this now good to go in?

mseri commented 7 years ago

Awaiting for @robhoes for a final say

robhoes commented 7 years ago

Looks fine to me. But the target branch should now be master, because the tagged-vlan branch was already merged to master.

sharady commented 7 years ago

Created https://github.com/xapi-project/xcp-networkd/pull/106 for master