From 8c5b6dc5bdcbaee07b9a20419417e0eb70a892ec Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Thu, 17 Aug 2023 16:41:40 +0200 Subject: [PATCH] toolbox: Add sleep script handling signals Closes-Bug: #2031692 Change-Id: I8b69869cca98d83d3b1be3f4add88ff83b22b4a1 --- docker/kolla-toolbox/Dockerfile.j2 | 2 ++ docker/kolla-toolbox/kolla_toolbox.sh | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 docker/kolla-toolbox/kolla_toolbox.sh diff --git a/docker/kolla-toolbox/Dockerfile.j2 b/docker/kolla-toolbox/Dockerfile.j2 index 5dadf07979..83af22a057 100644 --- a/docker/kolla-toolbox/Dockerfile.j2 +++ b/docker/kolla-toolbox/Dockerfile.j2 @@ -92,10 +92,12 @@ COPY find_disks.py /usr/share/ansible/ COPY ansible.cfg /etc/ansible/ansible.cfg COPY ansible_sudoers /etc/sudoers.d/kolla_ansible_sudoers COPY extend_start.sh /usr/local/bin/kolla_extend_start +COPY kolla_toolbox.sh /usr/local/bin/kolla_toolbox RUN chmod 644 /usr/share/ansible/find_disks.py \ /etc/ansible/ansible.cfg \ /usr/local/bin/kolla_extend_start \ + && chmod 755 /usr/local/bin/kolla_toolbox \ && chmod 440 /etc/sudoers.d/kolla_ansible_sudoers {% block kolla_toolbox_footer %}{% endblock %} diff --git a/docker/kolla-toolbox/kolla_toolbox.sh b/docker/kolla-toolbox/kolla_toolbox.sh new file mode 100644 index 0000000000..5dfd65338e --- /dev/null +++ b/docker/kolla-toolbox/kolla_toolbox.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +catch_term() { + exit 0 +} + +catch_quit() { + exit 0 +} + +trap catch_term SIGTERM +trap catch_quit SIGQUIT + +while :; do + sleep 1 +done