summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceOracle.py
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-08-14 11:37:33 -0400
committerGitHub <noreply@github.com>2020-08-14 11:37:33 -0400
commit2d3533b59c7bf00affbda9c2c94fb5f214ffcb11 (patch)
treeddc2e87c994ded3d67998acb389e47df887c47fb /cloudinit/sources/DataSourceOracle.py
parentc3556ae82dfb47d635344fcd78908f003648d6d2 (diff)
downloadvyos-cloud-init-2d3533b59c7bf00affbda9c2c94fb5f214ffcb11.tar.gz
vyos-cloud-init-2d3533b59c7bf00affbda9c2c94fb5f214ffcb11.zip
DataSourceOracle: retry twice (and document why we retry at all) (#536)
Diffstat (limited to 'cloudinit/sources/DataSourceOracle.py')
-rw-r--r--cloudinit/sources/DataSourceOracle.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceOracle.py b/cloudinit/sources/DataSourceOracle.py
index 2354648b..20d6487d 100644
--- a/cloudinit/sources/DataSourceOracle.py
+++ b/cloudinit/sources/DataSourceOracle.py
@@ -297,7 +297,10 @@ def read_opc_metadata(*, fetch_vnics_data: bool = False):
`fetch_vnics_data` is True, else None
"""
- retries = 1
+ # Per Oracle, there are short windows (measured in milliseconds) throughout
+ # an instance's lifetime where the IMDS is being updated and may 404 as a
+ # result. To work around these windows, we retry a couple of times.
+ retries = 2
def _fetch(metadata_version: int, path: str) -> dict:
headers = {