31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
From ae1b843c7ab8b173ef2ffd9ea02842d1d4455e64 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Burmashev <alexander.burmashev@oracle.com>
|
|
Date: Fri, 5 May 2023 03:15:06 -0700
|
|
Subject: [PATCH] Increase retry value and add timeout for OCI
|
|
|
|
To be sure there are no failures, and accomodate to current behaviour on some supoported shapes it is needed to set
|
|
increased values for retries and timeout.
|
|
|
|
Orabug: 35329883
|
|
|
|
Signed-off-by: Alex Burmashev <alexander.burmashev@oracle.com>
|
|
---
|
|
cloudinit/sources/DataSourceOracle.py | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/cloudinit/sources/DataSourceOracle.py b/cloudinit/sources/DataSourceOracle.py
|
|
--- a/cloudinit/sources/DataSourceOracle.py 2023-10-03 22:09:18.480515323 +0000
|
|
+++ b/cloudinit/sources/DataSourceOracle.py 2023-10-03 22:21:31.155006874 +0000
|
|
@@ -364,11 +364,12 @@
|
|
return asset_tag == CHASSIS_ASSET_TAG
|
|
|
|
|
|
-def _fetch(metadata_version: int, path: str, retries: int = 2) -> dict:
|
|
+def _fetch(metadata_version: int, path: str, retries: int = 9) -> dict:
|
|
return readurl(
|
|
url=METADATA_PATTERN.format(version=metadata_version, path=path),
|
|
headers=V2_HEADERS if metadata_version > 1 else None,
|
|
retries=retries,
|
|
+ timeout=20,
|
|
)._response.json()
|