From eb73ba58b594782958a94f36c7bf1e767b50f252 Mon Sep 17 00:00:00 2001 From: Scott Hussey Date: Tue, 15 May 2018 12:18:13 -0500 Subject: [PATCH] [Fix] Fix empty bootaction tar files - When a bootaction returns a tarfile with nothing in it, the curtin script fails and causes a failed deployment. This fix supports empty tar files. - Pin to a old helm-toolkit commit to avoid breaking changes Change-Id: I68c1f0ab3247b901e0dc9041c86ddf4d63e036ff --- charts/maas/templates/etc/_curtin_userdata.tpl | 4 ++-- tools/helm_tk.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/maas/templates/etc/_curtin_userdata.tpl b/charts/maas/templates/etc/_curtin_userdata.tpl index 420b7dc..9f65185 100644 --- a/charts/maas/templates/etc/_curtin_userdata.tpl +++ b/charts/maas/templates/etc/_curtin_userdata.tpl @@ -42,8 +42,8 @@ def find_ba_key(n): drydock_02: ["curtin", "in-target", "--", "wget", "--no-proxy", "--header=X-Bootaction-Key: {{ "{{" }}ba_key{{ "}}" }}", "{{ "{{" }}ba_files_url{{ "}}" }}", "-O", "/tmp/bootaction-files.tar.gz"] drydock_03: ["curtin", "in-target", "--", "sh", "-c", "tar --owner=root -xPzvf /tmp/bootaction-units.tar.gz > /tmp/bootaction-unit-names.txt"] drydock_04: ["curtin", "in-target", "--", "sh", "-c", "tar --owner=root -xPzvf /tmp/bootaction-files.tar.gz > /tmp/bootaction-file-names.txt"] - drydock_05: ["curtin", "in-target", "--", "sh", "-c", "xargs -a /tmp/bootaction-unit-names.txt -n 1 basename > /tmp/bootaction-unit-basenames.txt"] - drydock_06: ["curtin", "in-target", "--", "sh", "-c", "xargs -a /tmp/bootaction-unit-basenames.txt -n 1 systemctl enable"] + drydock_05: ["curtin", "in-target", "--", "sh", "-c", "xargs -a /tmp/bootaction-unit-names.txt -n 1 basename > /tmp/bootaction-unit-basenames.txt || echo 'Did not run basenames on units'"] + drydock_06: ["curtin", "in-target", "--", "sh", "-c", "xargs -a /tmp/bootaction-unit-basenames.txt -n 1 systemctl enable || echo 'Did not enable SystemD units'"] drydock_07: ["sh", "-c", "echo Following SystemD units installed and enabled:"] drydock_08: ["curtin", "in-target", "--", "cat", "/tmp/bootaction-unit-basenames.txt"] drydock_09: ["sh", "-c", "echo Following files installed on deployed node:"] diff --git a/tools/helm_tk.sh b/tools/helm_tk.sh index 6caf555..893015f 100755 --- a/tools/helm_tk.sh +++ b/tools/helm_tk.sh @@ -20,6 +20,7 @@ HTK_REPO=${HTK_REPO:-"https://github.com/openstack/openstack-helm"} HTK_PATH=${HTK_PATH:-""} HTK_STABLE_COMMIT=${HTK_COMMIT:-"f902cd14fac7de4c4c9f7d019191268a6b4e9601"} DEP_UP_LIST=${DEP_UP_LIST:-"maas"} +HTK_STABLE_COMMIT="f902cd14fac7de4c4c9f7d019191268a6b4e9601" if [[ ! -z $(echo $http_proxy) ]] then