diff options
author | James Falcon <therealfalcon@gmail.com> | 2021-09-24 09:47:45 -0500 |
---|---|---|
committer | James Falcon <therealfalcon@gmail.com> | 2021-09-24 09:47:45 -0500 |
commit | 432156053d8ecf6cd787897844fc02ddd24ff0bb (patch) | |
tree | f8724886c6856141b7b67771244db42ec3fa9a4a | |
parent | 2d11b7aa0a84e0fbd79be38e93925dbaa410a6d4 (diff) | |
download | cloud-init-git-432156053d8ecf6cd787897844fc02ddd24ff0bb.tar.gz |
Revert "cherry pick e69a8874"
This reverts commit 859bcc2cb0c7489aa2ee0b3456a6504757bcb130.
-rw-r--r-- | debian/patches/cpick-e69a8874-Set-Azure-to-only-update-metadata-on-BOOT_NEW_INSTANCE | 55 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 0 insertions, 56 deletions
diff --git a/debian/patches/cpick-e69a8874-Set-Azure-to-only-update-metadata-on-BOOT_NEW_INSTANCE b/debian/patches/cpick-e69a8874-Set-Azure-to-only-update-metadata-on-BOOT_NEW_INSTANCE deleted file mode 100644 index c6ff7345..00000000 --- a/debian/patches/cpick-e69a8874-Set-Azure-to-only-update-metadata-on-BOOT_NEW_INSTANCE +++ /dev/null @@ -1,55 +0,0 @@ -From e69a88745e37061e0ab0a1e67ad11015cca610c1 Mon Sep 17 00:00:00 2001 -From: James Falcon <therealfalcon@gmail.com> -Date: Fri, 3 Sep 2021 12:57:20 -0500 -Subject: [PATCH] Set Azure to only update metadata on BOOT_NEW_INSTANCE - (#1006) - -In #834, we refactored the handling of events for fetching new metadata. -Previously, in Azure's __init__, the BOOT event was added to the -update_events, so it was assumed that Azure required the standard BOOT -behavior, which is to apply metadata twice every boot: once during -local-init, then again during standard init phase. -https://github.com/canonical/cloud-init/blob/21.2/cloudinit/sources/DataSourceAzure.py#L356 - -However, this line was effectively meaningless. After the metadata was -fetched in local-init, it was then pickled out to disk. Because -"update_events" was a class variable, the EventType.BOOT was not -persisted into the pickle. When the pickle was then unpickled in the -init phase, metadata did not get re-fetched because EventType.BOOT was -not present, so Azure is effectely only BOOT_NEW_INSTANCE. - -Fetching metadata twice during boot causes some issue for -pre-provisioning on Azure because updating metadata during -re-provisioning will cause cloud-init to poll for reprovisiondata again -in DataSourceAzure, which will infinitely return 404(reprovisiondata -is deleted from IMDS after health signal was sent by cloud-init during -init-local). This makes cloud-init stuck in 'init' ---- - cloudinit/sources/DataSourceAzure.py | 9 +-------- - 1 file changed, 1 insertion(+), 8 deletions(-) - ---- a/cloudinit/sources/DataSourceAzure.py -+++ b/cloudinit/sources/DataSourceAzure.py -@@ -22,7 +22,7 @@ import requests - from cloudinit import dmi - from cloudinit import log as logging - from cloudinit import net --from cloudinit.event import EventScope, EventType -+from cloudinit.event import EventType - from cloudinit.net import device_driver - from cloudinit.net.dhcp import EphemeralDHCPv4 - from cloudinit import sources -@@ -339,13 +339,6 @@ def temporary_hostname(temp_hostname, cf - class DataSourceAzure(sources.DataSource): - - dsname = 'Azure' -- # Regenerate network config new_instance boot and every boot -- default_update_events = {EventScope.NETWORK: { -- EventType.BOOT_NEW_INSTANCE, -- EventType.BOOT, -- EventType.BOOT_LEGACY -- }} -- - _negotiated = False - _metadata_imds = sources.UNSET - _ci_pkl_version = 1 diff --git a/debian/patches/series b/debian/patches/series index b43f57c1..0ae671b5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ cpick-28e56d99-Azure-Retry-dhcp-on-timeouts-when-polling -cpick-e69a8874-Set-Azure-to-only-update-metadata-on-BOOT_NEW_INSTANCE |