← Back to team overview

cloud-init-dev team mailing list archive

Re: [Merge] ~chad.smith/cloud-init:bug/1803598-dont-retry-on-timeout-in-imds-poll into cloud-init:master

 


Diff comments:

> diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
> index 9e8a1a8..2a3e567 100644
> --- a/cloudinit/sources/DataSourceAzure.py
> +++ b/cloudinit/sources/DataSourceAzure.py
> @@ -526,6 +526,13 @@ class DataSourceAzure(sources.DataSource):
>          report_ready = bool(not os.path.isfile(REPORTED_READY_MARKER_FILE))
>          LOG.debug("Start polling IMDS")
>  
> +        def exc_cb(msg, exception):
> +            if isinstance(exception, UrlError) and exception.code == 404:
> +                return True

How do we know that the exception we get is because of timeout? should we check that somehow ?

> +            # If we get an exception while trying to call IMDS, we
> +            # call DHCP and setup the ephemeral network to acquire the new IP.
> +            return False
> +
>          while True:
>              try:
>                  # Save our EphemeralDHCPv4 context so we avoid repeated dhcp


-- 
https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/358872
Your team cloud-init commiters is requested to review the proposed merge of ~chad.smith/cloud-init:bug/1803598-dont-retry-on-timeout-in-imds-poll into cloud-init:master.


References