From 4a76c5d508d637af932d6226030e33d45f6765ea Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Fri, 17 Jul 2015 08:18:30 -0400 Subject: [PATCH] Make test timeout a variable Make the test timeout that governs how long the preparing for test playbook wait for SSH connectivity before proceeding. This value, typically would need to be a longer value on larger guest images as they will take longer to deploy and potentially they have more services that extend the boot-up time. Change-Id: Id76a40be2b7aadbc4594fb619b7fcb70cc2c9b2a --- playbooks/roles/bifrost-prepare-for-test-dynamic/README.md | 3 +++ .../roles/bifrost-prepare-for-test-dynamic/defaults/main.yml | 1 + .../roles/bifrost-prepare-for-test-dynamic/tasks/main.yml | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/bifrost-prepare-for-test-dynamic/README.md b/playbooks/roles/bifrost-prepare-for-test-dynamic/README.md index 566ba787c..e3319b4ce 100644 --- a/playbooks/roles/bifrost-prepare-for-test-dynamic/README.md +++ b/playbooks/roles/bifrost-prepare-for-test-dynamic/README.md @@ -18,6 +18,9 @@ node_ssh_pause: The amount of time, defaulted to 4 seconds, to pause useeful if the test image has a tendency to have networking restart after sshd has started. +wait_timeout: The number of seconds to wait for SSH connectivity to + the test machine to be established before proceeding. + Dependencies ------------ diff --git a/playbooks/roles/bifrost-prepare-for-test-dynamic/defaults/main.yml b/playbooks/roles/bifrost-prepare-for-test-dynamic/defaults/main.yml index 50a373825..53ee3dccf 100644 --- a/playbooks/roles/bifrost-prepare-for-test-dynamic/defaults/main.yml +++ b/playbooks/roles/bifrost-prepare-for-test-dynamic/defaults/main.yml @@ -1,2 +1,3 @@ --- node_ssh_pause: 10 +wait_timeout: 900 diff --git a/playbooks/roles/bifrost-prepare-for-test-dynamic/tasks/main.yml b/playbooks/roles/bifrost-prepare-for-test-dynamic/tasks/main.yml index 622cd16ec..1b17e7662 100644 --- a/playbooks/roles/bifrost-prepare-for-test-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-prepare-for-test-dynamic/tasks/main.yml @@ -13,7 +13,7 @@ # limitations under the License. --- - name: "Waiting for the base testvm machine to become available." - wait_for: state=started port=22 host={{ ipv4_address }} timeout=900 + wait_for: state=started port=22 host={{ ipv4_address }} timeout={{ wait_timeout }} when: ipv4_address is defined - name: "Pausing for 4 seconds to allow testvm to become fully operational and to avoid any potential sshd startup race." # NOTE(TheJulia): AFAIK sshd opens it's socket and then loads/generates