diff options
author | spisarski <s.pisarski@cablelabs.com> | 2018-01-03 10:00:43 -0700 |
---|---|---|
committer | spisarski <s.pisarski@cablelabs.com> | 2018-01-03 10:00:43 -0700 |
commit | 125a7061b19afdd3c2e4f0e463e85572dfb3783d (patch) | |
tree | f84e3d0a5cb82729f44761ab51fc20b481aae891 /snaps/openstack/create_instance.py | |
parent | 24e4fc3b5efd3382836091809e075ea6b371e597 (diff) |
Added new configuration option for OpenStackVmInstance for cloud-init
Added cloud_init_timeout to VM instance configuration to override the
default timeout value hardcoded @ 120 seconds. This patch not only
expands the default value to 300, but also allows the client to override
this value as cloud-init can take quite some time depending on what is
being requested.
Change-Id: Ia4d0a54ce853a93748b16945f5ddd4d5887feb7d
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/create_instance.py')
-rw-r--r-- | snaps/openstack/create_instance.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/snaps/openstack/create_instance.py b/snaps/openstack/create_instance.py index b68372e..d91e360 100644 --- a/snaps/openstack/create_instance.py +++ b/snaps/openstack/create_instance.py @@ -32,7 +32,6 @@ logger = logging.getLogger('create_instance') POLL_INTERVAL = 3 STATUS_ACTIVE = 'ACTIVE' STATUS_DELETED = 'DELETED' -CLOUD_INIT_TIMEOUT = 120 class OpenStackVmInstance(OpenStackComputeObject): @@ -680,7 +679,7 @@ class OpenStackVmInstance(OpenStackComputeObject): # sleep and wait for VM status change logger.info('Checking if cloud-init has completed') - timeout = CLOUD_INIT_TIMEOUT + timeout = self.instance_settings.cloud_init_timeout if self.vm_active(block=True) and self.vm_ssh_active(block=True): if block: |