From fc20c79e47416e3cf83f9893273c316d5c13002a Mon Sep 17 00:00:00 2001 From: Ian Howell Date: Fri, 10 Sep 2021 09:22:46 -0500 Subject: [PATCH] AIAP: Keep containers alive in successful runs Currently the task containers will reach a conclusive state (success or failure), and will promptly stop running. This creates the following problems: 1. In the case of failure, a user doesn't have the ability to exec into the container for debugging purposes. 2. In the case a success, the readiness probe for each task container will begin to fail. This happens because readiness is defined by the existence of a file; if the container stops running, the file no longer exists. This change provides a solution to the 2nd bullet, keeping the container alive in case of success. Change-Id: Iae432caada3d2a338493b1534da72957808185d2 --- tools/airship-in-a-pod/artifact-setup/assets/entrypoint.sh | 3 +++ tools/airship-in-a-pod/infra-builder/assets/entrypoint.sh | 3 +++ tools/airship-in-a-pod/runner/assets/entrypoint.sh | 3 +++ 3 files changed, 9 insertions(+) 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 c8527304b..745721130 100755 --- a/tools/airship-in-a-pod/artifact-setup/assets/entrypoint.sh +++ b/tools/airship-in-a-pod/artifact-setup/assets/entrypoint.sh @@ -58,3 +58,6 @@ fi success=true /signal_complete artifact-setup + +# Keep the container running for debugging/monitoring purposes +sleep infinity 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 d956f348a..3384b910d 100755 --- a/tools/airship-in-a-pod/infra-builder/assets/entrypoint.sh +++ b/tools/airship-in-a-pod/infra-builder/assets/entrypoint.sh @@ -34,3 +34,6 @@ ansible-playbook -v /opt/ansible/playbooks/build-infra.yaml \ success=true /signal_complete infra-builder + +# Keep the container running for debugging/monitoring purposes +sleep infinity diff --git a/tools/airship-in-a-pod/runner/assets/entrypoint.sh b/tools/airship-in-a-pod/runner/assets/entrypoint.sh index 21c8a1da4..6b7b3ee67 100755 --- a/tools/airship-in-a-pod/runner/assets/entrypoint.sh +++ b/tools/airship-in-a-pod/runner/assets/entrypoint.sh @@ -81,3 +81,6 @@ fi success=true /signal_complete runner + +# Keep the container running for debugging/monitoring purposes +sleep infinity