faf1e5
From 4e539790e57452b24aa6851452201c0f2a87c464 Mon Sep 17 00:00:00 2001
faf1e5
From: Eduardo Otubo <otubo@redhat.com>
faf1e5
Date: Tue, 5 May 2020 08:08:21 +0200
faf1e5
Subject: [PATCH 4/5] exoscale: Increase url_max_wait to 120s.
faf1e5
faf1e5
RH-Author: Eduardo Otubo <otubo@redhat.com>
faf1e5
Message-id: <20200504085238.25884-5-otubo@redhat.com>
faf1e5
Patchwork-id: 96247
faf1e5
O-Subject: [RHEL-7.8.z cloud-init PATCH 4/5] exoscale: Increase url_max_wait to 120s.
faf1e5
Bugzilla: 1827207
faf1e5
RH-Acked-by: Cathy Avery <cavery@redhat.com>
faf1e5
RH-Acked-by: Mohammed Gamal <mgamal@redhat.com>
faf1e5
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
faf1e5
faf1e5
commit 3e2482e8aa6630ca9bc115dc1f82d44d3fde1681
faf1e5
Author: Chris Glass <chris@exoscale.ch>
faf1e5
Date:   Thu Oct 24 17:32:58 2019 +0000
faf1e5
faf1e5
    exoscale: Increase url_max_wait to 120s.
faf1e5
faf1e5
    The exoscale datasource defines a shorter timeout than the default (10)
faf1e5
    but did not override url_max_wait, resulting in a single attempt being
faf1e5
    made to wait for the metadata service.
faf1e5
faf1e5
    In some rare cases, a race condition means the route to the metadata
faf1e5
    service is not set within 10 seconds, and more attempts should be made.
faf1e5
faf1e5
    This sets the url_max_wait for the datasource to 120.
faf1e5
faf1e5
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
faf1e5
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
faf1e5
---
faf1e5
 cloudinit/sources/DataSourceExoscale.py | 2 ++
faf1e5
 1 file changed, 2 insertions(+)
faf1e5
faf1e5
diff --git a/cloudinit/sources/DataSourceExoscale.py b/cloudinit/sources/DataSourceExoscale.py
faf1e5
index fdfb4ed..4616daa 100644
faf1e5
--- a/cloudinit/sources/DataSourceExoscale.py
faf1e5
+++ b/cloudinit/sources/DataSourceExoscale.py
faf1e5
@@ -26,6 +26,8 @@ class DataSourceExoscale(sources.DataSource):
faf1e5
 
faf1e5
     dsname = 'Exoscale'
faf1e5
 
faf1e5
+    url_max_wait = 120
faf1e5
+
faf1e5
     def __init__(self, sys_cfg, distro, paths):
faf1e5
         super(DataSourceExoscale, self).__init__(sys_cfg, distro, paths)
faf1e5
         LOG.debug("Initializing the Exoscale datasource")
faf1e5
-- 
faf1e5
1.8.3.1
faf1e5