On Thu, 05 Oct 2017 00:20:28 +0200 Thomas Haller <thaller redhat com> wrote:
On Wed, 2017-10-04 at 11:07 -0700, Stephen Hemminger wrote:On Azure (and probably other VM environments), there is a desire to cause guest VM to renew DHCP lease in response to host infrastructure changes. These include things like spinning up lots of VM's then suspending them and later unfreezing them as needed. The other scenario is doing renew following migration. The current kernel code has a hack to try and simulate link bounce, but it doesn't work very well and the old ISC DHCP client does nothing. Network manager might be able to do something better??Hi, link bounce might not work with NetworkManager, in the current form. NM has a 5 seconds grace period, during which it ignores carrier going away. It does so because the link can go down unexpectedly for unknown reasons. Actually, after NM changes the MTU, the 5 seconds are extended to 10 seconds, because [1]. So, kernel would have to bounce the link for at least 10 seconds. Then there is a setting ignore-carrier (`man NetworkManager.conf`). That causes NM to totally ignore when the link goes down. That setting is quite common, for example on the package "NetworkManager-config- server" enables it by default on RHEL. Appart from the above obstacles, carrier going away causes the active connection to disconnect. Later, another (or the same) connection may autoconnect again. So, that sounds like what you requested, but I don't think it works well. Thomas [1] https://bugzilla.redhat.com/show_bug.cgi?id=1487702
One alternative would be to the hyper-v daemon (doing other services) could invoke a hook or script to request network manager do a renew?
Attachment:
pgpvaAsrRNp_V.pgp
Description: OpenPGP digital signature