Revert "app-emulation/wa-linux-agent: Disable interface restarting"

This reverts commit 9556c7f94b
because waagent looks for internal hostname changes and wants to
propagate them to the Azure VM properties by issuing a new DHCP request.
This commit is contained in:
Kai Lueke 2024-05-03 20:37:18 +09:00
parent 425a6df565
commit 08d60880ff

View File

@ -172,7 +172,7 @@ new file mode 100644
index 00000000..e31b2923 index 00000000..e31b2923
--- /dev/null --- /dev/null
+++ b/azurelinuxagent/common/osutil/flatcar.py +++ b/azurelinuxagent/common/osutil/flatcar.py
@@ -0,0 +1,80 @@ @@ -0,0 +1,78 @@
+# +#
+# Copyright 2023 Microsoft Corporation +# Copyright 2023 Microsoft Corporation
+# +#
@ -240,8 +240,6 @@ index 00000000..e31b2923
+ Restart an interface by bouncing the link. systemd-networkd observes + Restart an interface by bouncing the link. systemd-networkd observes
+ this event, and forces a renew of DHCP. + this event, and forces a renew of DHCP.
+ """ + """
+ logger.info("not restarting interface {}".format(ifname))
+ return
+ retry_limit = retries + 1 + retry_limit = retries + 1
+ for attempt in range(1, retry_limit): + for attempt in range(1, retry_limit):
+ return_code = shellutil.run("ip link set {0} down && ip link set {0} up".format(ifname)) + return_code = shellutil.run("ip link set {0} down && ip link set {0} up".format(ifname))