Browse Source

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>
changes/88/642588/6
Pete Birley 2 months ago
parent
commit
85534b7796
3 changed files with 3 additions and 3 deletions
  1. 1
    1
      divingbell/templates/bin/_exec.sh.tpl
  2. 1
    1
      setup.cfg
  3. 1
    1
      tools/helm_install.sh

+ 1
- 1
divingbell/templates/bin/_exec.sh.tpl View File

@@ -217,7 +217,7 @@ UNIQUE_EOF_9c341059-25a0-4725-9489-1789e255e381
217 217
 chmod 700 {{ .Values.conf.chroot_mnt_path | quote }}/tmp/exec_host_{{ .Chart.Version }}.sh
218 218
 
219 219
 while 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 221
   sleep 2
222 222
   echo 'INFO Putting the daemon to sleep.'
223 223
   sleep {{ $exec_loop_sleep_interval }}

+ 1
- 1
setup.cfg View File

@@ -1,6 +1,6 @@
1 1
 [metadata]
2 2
 name = Divingbell
3
-description-file = README.md
3
+description-file = README.rst
4 4
 author = The Airship Authors
5 5
 author-email = airship-discuss@lists.airshipit.org
6 6
 home-page = https://airship-divingbell.readthedocs.io/

+ 1
- 1
tools/helm_install.sh View File

@@ -17,7 +17,7 @@
17 17
 set -x
18 18
 
19 19
 HELM=$1
20
-HELM_ARTIFACT_URL=${HELM_ARTIFACT_URL:-"https://storage.googleapis.com/kubernetes-helm/helm-v2.10.0-linux-amd64.tar.gz"}
20
+HELM_ARTIFACT_URL=${HELM_ARTIFACT_URL:-"https://storage.googleapis.com/kubernetes-helm/helm-v2.13.0-linux-amd64.tar.gz"}
21 21
 
22 22
 
23 23
 function install_helm_binary {

Loading…
Cancel
Save