From 85534b7796d7e4d849662cafaa1173787047e88c Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Mon, 11 Mar 2019 17:26:06 -0500 Subject: [PATCH] Exec: Use nsenter to enter all host namespaces when running exec This PS moves to pivot to the hosts namespaces rather than chroot so as to allow scripts to run fully in the context of the host. Change-Id: I6b4dab92b6f8a7f9fa5b895d546117fdae43d731 Signed-off-by: Pete Birley --- divingbell/templates/bin/_exec.sh.tpl | 2 +- setup.cfg | 2 +- tools/helm_install.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/divingbell/templates/bin/_exec.sh.tpl b/divingbell/templates/bin/_exec.sh.tpl index 41924f0..bcbba24 100644 --- a/divingbell/templates/bin/_exec.sh.tpl +++ b/divingbell/templates/bin/_exec.sh.tpl @@ -217,7 +217,7 @@ UNIQUE_EOF_9c341059-25a0-4725-9489-1789e255e381 chmod 700 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/exec_host_{{ .Chart.Version }}.sh while true; do - chroot {{ .Values.conf.chroot_mnt_path | quote }} /tmp/exec_host_{{ .Chart.Version }}.sh + nsenter -t 1 -m -u -n -i -p /tmp/exec_host_{{ .Chart.Version }}.sh sleep 2 echo 'INFO Putting the daemon to sleep.' sleep {{ $exec_loop_sleep_interval }} diff --git a/setup.cfg b/setup.cfg index af8b6e5..2204231 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = Divingbell -description-file = README.md +description-file = README.rst author = The Airship Authors author-email = airship-discuss@lists.airshipit.org home-page = https://airship-divingbell.readthedocs.io/ diff --git a/tools/helm_install.sh b/tools/helm_install.sh index e561655..4bd1851 100755 --- a/tools/helm_install.sh +++ b/tools/helm_install.sh @@ -17,7 +17,7 @@ set -x HELM=$1 -HELM_ARTIFACT_URL=${HELM_ARTIFACT_URL:-"https://storage.googleapis.com/kubernetes-helm/helm-v2.10.0-linux-amd64.tar.gz"} +HELM_ARTIFACT_URL=${HELM_ARTIFACT_URL:-"https://storage.googleapis.com/kubernetes-helm/helm-v2.13.0-linux-amd64.tar.gz"} function install_helm_binary {