summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Birley <pete@port.direct>2019-03-11 17:26:06 -0500
committerAnderson, Craig (ca846m) <craig.anderson@att.com>2019-03-11 19:32:48 -0700
commit85534b7796d7e4d849662cafaa1173787047e88c (patch)
tree42c121f70bcc30935f2d063859678941c452d9f0
parentecade10b2d8135d7a83a43e8eed8e39f9ba8f912 (diff)
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 <pete@port.direct>
Notes
Notes (review): Code-Review+2: Craig Anderson <craig.anderson@att.com> Workflow+1: Craig Anderson <craig.anderson@att.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 12 Mar 2019 03:26:47 +0000 Reviewed-on: https://review.openstack.org/642588 Project: openstack/airship-divingbell Branch: refs/heads/master
-rw-r--r--divingbell/templates/bin/_exec.sh.tpl2
-rw-r--r--setup.cfg2
-rwxr-xr-xtools/helm_install.sh2
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
217chmod 700 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/exec_host_{{ .Chart.Version }}.sh 217chmod 700 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/exec_host_{{ .Chart.Version }}.sh
218 218
219while true; do 219while true; do
220 chroot {{ .Values.conf.chroot_mnt_path | quote }} /tmp/exec_host_{{ .Chart.Version }}.sh 220 nsenter -t 1 -m -u -n -i -p /tmp/exec_host_{{ .Chart.Version }}.sh
221 sleep 2 221 sleep 2
222 echo 'INFO Putting the daemon to sleep.' 222 echo 'INFO Putting the daemon to sleep.'
223 sleep {{ $exec_loop_sleep_interval }} 223 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 @@
1[metadata] 1[metadata]
2name = Divingbell 2name = Divingbell
3description-file = README.md 3description-file = README.rst
4author = The Airship Authors 4author = The Airship Authors
5author-email = airship-discuss@lists.airshipit.org 5author-email = airship-discuss@lists.airshipit.org
6home-page = https://airship-divingbell.readthedocs.io/ 6home-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 @@
17set -x 17set -x
18 18
19HELM=$1 19HELM=$1
20HELM_ARTIFACT_URL=${HELM_ARTIFACT_URL:-"https://storage.googleapis.com/kubernetes-helm/helm-v2.10.0-linux-amd64.tar.gz"} 20HELM_ARTIFACT_URL=${HELM_ARTIFACT_URL:-"https://storage.googleapis.com/kubernetes-helm/helm-v2.13.0-linux-amd64.tar.gz"}
21 21
22 22
23function install_helm_binary { 23function install_helm_binary {