From 57c5f2c77e95b1cc4277ca36c72d3627f38555ab Mon Sep 17 00:00:00 2001 From: Stanley Karunditu Date: Sat, 22 Aug 2015 11:40:01 +0100 Subject: [PATCH] Add configurable ssh_delay This patch adds a configurable delay time for retrying the ssh connection when waiting for the containers to restart. This is useful for environments where resources are constrained and containers may take longer to restart. Change-Id: I0383e34a273b93e1b2651460c853cf1ceba89029 Closes-Bug: #1476885 --- etc/openstack_deploy/user_variables.yml | 5 +++++ playbooks/galera-install.yml | 2 +- playbooks/inventory/group_vars/hosts.yml | 4 ++++ playbooks/os-ceilometer-install.yml | 2 +- playbooks/os-cinder-install.yml | 2 +- playbooks/os-glance-install.yml | 2 +- playbooks/os-neutron-install.yml | 2 +- playbooks/repo-server.yml | 2 +- playbooks/rsyslog-install.yml | 2 +- 9 files changed, 16 insertions(+), 7 deletions(-) diff --git a/etc/openstack_deploy/user_variables.yml b/etc/openstack_deploy/user_variables.yml index 7e9b9225c4..8f383aa39c 100644 --- a/etc/openstack_deploy/user_variables.yml +++ b/etc/openstack_deploy/user_variables.yml @@ -149,3 +149,8 @@ ssl_cipher_suite: "ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AE # horizon_available_regions: # - { url: "{{ keystone_service_internalurl }}", name: "{{ keystone_service_region }}" } # - { url: "http://cluster1.example.com:5000/v2.0", name: "RegionTwo" } + +## SSH connection wait time +# If an increased delay for the ssh connection check is desired, +# uncomment this variable and set it appropriately. +#ssh_delay: 5 diff --git a/playbooks/galera-install.yml b/playbooks/galera-install.yml index dbf314caa8..0db115e610 100644 --- a/playbooks/galera-install.yml +++ b/playbooks/galera-install.yml @@ -86,7 +86,7 @@ - name: Wait for container ssh wait_for: port: "22" - delay: 5 + delay: "{{ ssh_delay }}" search_regex: "OpenSSH" host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}" diff --git a/playbooks/inventory/group_vars/hosts.yml b/playbooks/inventory/group_vars/hosts.yml index 0088f82c2b..83998996a6 100644 --- a/playbooks/inventory/group_vars/hosts.yml +++ b/playbooks/inventory/group_vars/hosts.yml @@ -18,6 +18,10 @@ debug: False verbose: True +## SSH connection wait time +ssh_delay: 5 + + ## Repo server repo_service_user_name: nginx repo_service_home_folder: /var/www diff --git a/playbooks/os-ceilometer-install.yml b/playbooks/os-ceilometer-install.yml index 2016afb541..c355bd930f 100644 --- a/playbooks/os-ceilometer-install.yml +++ b/playbooks/os-ceilometer-install.yml @@ -26,7 +26,7 @@ - name: Wait for container ssh wait_for: port: "22" - delay: 5 + delay: "{{ ssh_delay }}" search_regex: "OpenSSH" host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}" diff --git a/playbooks/os-cinder-install.yml b/playbooks/os-cinder-install.yml index 0c80c5c379..f6709c4c7a 100644 --- a/playbooks/os-cinder-install.yml +++ b/playbooks/os-cinder-install.yml @@ -76,7 +76,7 @@ - name: Wait for container ssh wait_for: port: "22" - delay: 5 + delay: "{{ ssh_delay }}" search_regex: "OpenSSH" host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}" diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index eb6131e434..a4614eae27 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -37,7 +37,7 @@ - name: Wait for container ssh wait_for: port: "22" - delay: 5 + delay: "{{ ssh_delay }}" search_regex: "OpenSSH" host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}" diff --git a/playbooks/os-neutron-install.yml b/playbooks/os-neutron-install.yml index 20c05d61ad..7cc15eccfe 100644 --- a/playbooks/os-neutron-install.yml +++ b/playbooks/os-neutron-install.yml @@ -39,7 +39,7 @@ - name: Wait for container ssh wait_for: port: "22" - delay: 5 + delay: "{{ ssh_delay }}" search_regex: "OpenSSH" host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}" diff --git a/playbooks/repo-server.yml b/playbooks/repo-server.yml index 66f71935e9..fa1c5c630f 100644 --- a/playbooks/repo-server.yml +++ b/playbooks/repo-server.yml @@ -37,7 +37,7 @@ - name: Wait for container ssh wait_for: port: "22" - delay: 5 + delay: "{{ ssh_delay }}" search_regex: "OpenSSH" host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}" diff --git a/playbooks/rsyslog-install.yml b/playbooks/rsyslog-install.yml index 0b9266cb8c..9ab4d2918a 100644 --- a/playbooks/rsyslog-install.yml +++ b/playbooks/rsyslog-install.yml @@ -45,7 +45,7 @@ - name: Wait for container ssh wait_for: port: "22" - delay: 5 + delay: "{{ ssh_delay }}" search_regex: "OpenSSH" host: "{{ ansible_ssh_host }}" delegate_to: "{{ physical_host }}"