summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorvteratipally <67723486+vteratipally@users.noreply.github.com>2021-09-20 21:53:05 -0700
committerGitHub <noreply@github.com>2021-09-20 22:53:05 -0600
commite27c30748e88409b1646a552f994edf9ed9d017e (patch)
tree638e22b5f5b59e2636fe3bca7e659358b9637b63 /doc
parentdc22786980a05129c5971e68ae37b1a9f76f882d (diff)
downloadvyos-cloud-init-e27c30748e88409b1646a552f994edf9ed9d017e.tar.gz
vyos-cloud-init-e27c30748e88409b1646a552f994edf9ed9d017e.zip
Add retries to DataSourceGCE.py when connecting to GCE (#1005)
Add retries to DatasourceGCE when connecting to GCE. Sometimes when the trying to fetch the metadata, cloud-init fails and the fallback datasource NoCloud is used which is not expected. Add retries to ensure loading of the data source.
Diffstat (limited to 'doc')
-rw-r--r--doc/rtd/topics/datasources/gce.rst22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/rtd/topics/datasources/gce.rst b/doc/rtd/topics/datasources/gce.rst
index 8406695c..f3590282 100644
--- a/doc/rtd/topics/datasources/gce.rst
+++ b/doc/rtd/topics/datasources/gce.rst
@@ -15,6 +15,28 @@ to provide ``public-keys``.
``user-data`` and ``user-data-encoding`` can be provided to cloud-init by
setting those custom metadata keys for an *instance*.
+Configuration
+-------------
+The following configuration can be set for the datasource in system
+configuration (in `/etc/cloud/cloud.cfg` or `/etc/cloud/cloud.cfg.d/`).
+
+The settings that may be configured are:
+
+ * **retries**: The number of retries that should be done for an http request.
+ This value is used only after metadata_url is selected. (default: 5)
+ * **sec_between_retries**: The amount of wait time between the retries when
+ crawling the metadata service. (default: 1)
+
+
+An example configuration with the default values is provided below:
+
+.. sourcecode:: yaml
+
+ datasource:
+ GCE:
+ retries: 5
+ sec_between_retries: 1
+
.. _GCE metadata docs: https://cloud.google.com/compute/docs/storing-retrieving-metadata#querying
.. vi: textwidth=78