From 1dd84a5af9b54a800535ef12e7280e76364bf6cf Mon Sep 17 00:00:00 2001 From: Ian Howell Date: Thu, 19 Aug 2021 12:56:41 -0500 Subject: [PATCH] AIAP: Prevent sushy from starting prereqs are met The metal3-io sushy-tools container no longer includes the ping utility, which was being used to test that the VMs were available. This changes the container to use the shared drive to perform this check instead, relieving the need for ping. Change-Id: I0f697d1a7afac84f04fd27dc9b808857c9f64a7c --- tools/airship-in-a-pod/artifact-setup/assets/entrypoint.sh | 2 +- tools/airship-in-a-pod/examples/base/airship-in-a-pod.yaml | 6 ++++-- tools/airship-in-a-pod/infra-builder/assets/entrypoint.sh | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/airship-in-a-pod/artifact-setup/assets/entrypoint.sh b/tools/airship-in-a-pod/artifact-setup/assets/entrypoint.sh index 8d9e20c8a..2f4a404c2 100755 --- a/tools/airship-in-a-pod/artifact-setup/assets/entrypoint.sh +++ b/tools/airship-in-a-pod/artifact-setup/assets/entrypoint.sh @@ -35,7 +35,7 @@ then printf "Using cached airshipctl\n" cp -r "$CACHE_DIR/*" "$ARTIFACTS_DIR" else - printf "Waiting 30 seconds for the libvirt, sushy, and docker services to be ready\n" + printf "Waiting 30 seconds for the libvirt and docker services to be ready\n" sleep 30 cloneRepo $MANIFEST_REPO_NAME $MANIFEST_REPO_URL $MANIFEST_REPO_REF diff --git a/tools/airship-in-a-pod/examples/base/airship-in-a-pod.yaml b/tools/airship-in-a-pod/examples/base/airship-in-a-pod.yaml index 3e9e69a0c..1bdddf883 100644 --- a/tools/airship-in-a-pod/examples/base/airship-in-a-pod.yaml +++ b/tools/airship-in-a-pod/examples/base/airship-in-a-pod.yaml @@ -107,8 +107,8 @@ spec: -config <(cat /csr_details.txt) \ -extensions 'req_ext' - # Wait for interface to come up - while ! ping -c1 10.23.25.1 2>&1 >/dev/null; do sleep 1; done + # Wait for infrastructure to come up + while [[ ! -e /tmp/completed/infra-builder ]]; do printf "Waiting on infra-builder...\n"; sleep 1; done sushy-emulator \ --debug \ @@ -121,6 +121,8 @@ spec: volumeMounts: - name: var-run-libvirt mountPath: /var/run/libvirt + - name: completed + mountPath: /tmp/completed - name: nginx image: nginx:latest diff --git a/tools/airship-in-a-pod/infra-builder/assets/entrypoint.sh b/tools/airship-in-a-pod/infra-builder/assets/entrypoint.sh index 46e3ab407..c6d677a21 100755 --- a/tools/airship-in-a-pod/infra-builder/assets/entrypoint.sh +++ b/tools/airship-in-a-pod/infra-builder/assets/entrypoint.sh @@ -14,7 +14,7 @@ set -ex -printf "Waiting 30 seconds for the libvirt, sushy, and docker services to be ready\n" +printf "Waiting 30 seconds for the libvirt and docker services to be ready\n" sleep 30 ansible-playbook -v /opt/ansible/playbooks/build-infra.yaml \