diff --git a/nodepool/elements/cache-bindep/install.d/40-install-bindep b/nodepool/elements/cache-bindep/install.d/40-install-bindep index 2c1b9401ad..a19ae97185 100755 --- a/nodepool/elements/cache-bindep/install.d/40-install-bindep +++ b/nodepool/elements/cache-bindep/install.d/40-install-bindep @@ -1,4 +1,4 @@ -#!/bin/bash -xe +#!/bin/bash # Copyright (C) 2015 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,5 +16,11 @@ # This is in /usr instead of /usr/local due to this bug on precise: # https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/839588 +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -e + sudo -H virtualenv /usr/bindep-env sudo -H /usr/bindep-env/bin/pip install bindep diff --git a/nodepool/elements/cache-bindep/install.d/50-cache-pkgs b/nodepool/elements/cache-bindep/install.d/50-cache-pkgs index cf6d12ad46..e7e8b1787b 100755 --- a/nodepool/elements/cache-bindep/install.d/50-cache-pkgs +++ b/nodepool/elements/cache-bindep/install.d/50-cache-pkgs @@ -1,4 +1,4 @@ -#!/bin/bash -xe +#!/bin/bash # Copyright (C) 2011-2015 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +15,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -e + if [[ ${YUM:-yum} == "dnf" ]]; then echo "*** caching disabled for dnf" echo "*** see https://etherpad.openstack.org/p/infra-f22" diff --git a/nodepool/elements/cache-devstack/extra-data.d/50-early-source-repo b/nodepool/elements/cache-devstack/extra-data.d/50-early-source-repo index fef1b80186..f9c574369b 100755 --- a/nodepool/elements/cache-devstack/extra-data.d/50-early-source-repo +++ b/nodepool/elements/cache-devstack/extra-data.d/50-early-source-repo @@ -26,6 +26,10 @@ # Most of it should be removed when we can source and call the # functions directly +# dib-lint: disable=setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi set -eu GIT_BASE=${GIT_BASE:-git://git.openstack.org} diff --git a/nodepool/elements/cache-devstack/extra-data.d/60-rm-early-source-repo b/nodepool/elements/cache-devstack/extra-data.d/60-rm-early-source-repo index c757bc3c80..71b529f837 100755 --- a/nodepool/elements/cache-devstack/extra-data.d/60-rm-early-source-repo +++ b/nodepool/elements/cache-devstack/extra-data.d/60-rm-early-source-repo @@ -20,6 +20,10 @@ # cache data so that the later cloning of all of the OpenStack repos # won't bomb out +# dib-lint: disable=setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi set -eu sudo rm -rf $TMP_MOUNT_PATH/opt/git/openstack-dev/devstack diff --git a/nodepool/elements/cache-devstack/install.d/50-download-pkgs b/nodepool/elements/cache-devstack/install.d/50-download-pkgs index 0e62f8b7d0..c20074047f 100755 --- a/nodepool/elements/cache-devstack/install.d/50-download-pkgs +++ b/nodepool/elements/cache-devstack/install.d/50-download-pkgs @@ -15,6 +15,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi set -e if [[ ${YUM:-yum} == "dnf" ]]; then diff --git a/nodepool/elements/cache-devstack/install.d/99-cache-testrepository-db b/nodepool/elements/cache-devstack/install.d/99-cache-testrepository-db index 8b636086a9..3657eb35c3 100755 --- a/nodepool/elements/cache-devstack/install.d/99-cache-testrepository-db +++ b/nodepool/elements/cache-devstack/install.d/99-cache-testrepository-db @@ -15,7 +15,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -eux +# dib-lint: disable=setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -eu TEMPEST_DIR=/opt/git/openstack/tempest diff --git a/nodepool/elements/node-devstack/element-deps b/nodepool/elements/node-devstack/element-deps index fd1e362315..4ad866a5bc 100644 --- a/nodepool/elements/node-devstack/element-deps +++ b/nodepool/elements/node-devstack/element-deps @@ -1,3 +1,3 @@ -puppet cache-devstack nodepool-base +puppet diff --git a/nodepool/elements/node-devstack/install.d/20-prepare-node b/nodepool/elements/node-devstack/install.d/20-prepare-node index ab7d5f7851..e89803cfdf 100755 --- a/nodepool/elements/node-devstack/install.d/20-prepare-node +++ b/nodepool/elements/node-devstack/install.d/20-prepare-node @@ -15,6 +15,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi set -e export SUDO='true' diff --git a/nodepool/elements/nodepool-base/finalise.d/99-nodepool-dir b/nodepool/elements/nodepool-base/finalise.d/99-nodepool-dir index 7e36a2de6a..f5567d094b 100755 --- a/nodepool/elements/nodepool-base/finalise.d/99-nodepool-dir +++ b/nodepool/elements/nodepool-base/finalise.d/99-nodepool-dir @@ -15,7 +15,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -set -ex +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -e # Nodepool expects this dir to exist when it boots slaves. # Nodepool writes environment info to this dir. We set the mode diff --git a/nodepool/elements/nodepool-base/finalise.d/99-restrict-memory b/nodepool/elements/nodepool-base/finalise.d/99-restrict-memory index a143b57efe..0f4befb7b1 100755 --- a/nodepool/elements/nodepool-base/finalise.d/99-restrict-memory +++ b/nodepool/elements/nodepool-base/finalise.d/99-restrict-memory @@ -19,6 +19,10 @@ # for properly handling grub. All we need to do here is get our values # in to the files. +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi set -e # Limit all test slaves to 8GB of memory so that larger flavors with more diff --git a/nodepool/elements/nodepool-base/finalise.d/99-unbound b/nodepool/elements/nodepool-base/finalise.d/99-unbound index 559c445684..e1c34c266e 100755 --- a/nodepool/elements/nodepool-base/finalise.d/99-unbound +++ b/nodepool/elements/nodepool-base/finalise.d/99-unbound @@ -15,6 +15,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# dib-lint: disable=set setu setpipefail indent +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi set -e NODEPOOL_STATIC_NAMESERVER=${NODEPOOL_STATIC_NAMESERVER:-8.8.8.8} diff --git a/nodepool/elements/nodepool-base/install.d/05-record-details b/nodepool/elements/nodepool-base/install.d/05-record-details index 534399c29d..65aa3e51be 100755 --- a/nodepool/elements/nodepool-base/install.d/05-record-details +++ b/nodepool/elements/nodepool-base/install.d/05-record-details @@ -1,4 +1,4 @@ -#!/bin/bash -xe +#!/bin/bash # Copyright (C) 2014 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,4 +15,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -e + echo $DIB_IMAGE_NAME > /etc/image-hostname.txt diff --git a/nodepool/elements/nodepool-base/install.d/50-disable-metadata-cloudinit b/nodepool/elements/nodepool-base/install.d/50-disable-metadata-cloudinit index f584ba2bbe..376f2f461f 100755 --- a/nodepool/elements/nodepool-base/install.d/50-disable-metadata-cloudinit +++ b/nodepool/elements/nodepool-base/install.d/50-disable-metadata-cloudinit @@ -1,4 +1,4 @@ -#!/bin/bash -xe +#!/bin/bash # Copyright (C) 2015 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +12,12 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -e + # Make all cloud-init data sources match rackspace- only attempt to look # at ConfigDrive, not at metadata service. This is not needed if there # is no cloud-init diff --git a/nodepool/elements/nodepool-base/install.d/90-venv-swift-logs b/nodepool/elements/nodepool-base/install.d/90-venv-swift-logs index 9f14372328..aade8d76ff 100755 --- a/nodepool/elements/nodepool-base/install.d/90-venv-swift-logs +++ b/nodepool/elements/nodepool-base/install.d/90-venv-swift-logs @@ -1,4 +1,4 @@ -#!/bin/bash -xe +#!/bin/bash # Copyright (C) 2015 Rackspace Australia # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +12,12 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -e + # Create a virtualenv for zuul-swift-logs # This is in /usr instead of /usr/local due to this bug on precise: # https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/839588 diff --git a/nodepool/elements/nodepool-base/install.d/91-venv-os-testr b/nodepool/elements/nodepool-base/install.d/91-venv-os-testr index 31b2d77858..098ac83a55 100755 --- a/nodepool/elements/nodepool-base/install.d/91-venv-os-testr +++ b/nodepool/elements/nodepool-base/install.d/91-venv-os-testr @@ -1,4 +1,4 @@ -#!/bin/bash -xe +#!/bin/bash # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +12,12 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -e + # Create a virtualenv for os-testr (which contains subunit2html) # This is in /usr instead of /usr/local due to this bug on precise: # https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/839588 diff --git a/nodepool/elements/nodepool-base/install.d/99-install-zuul b/nodepool/elements/nodepool-base/install.d/99-install-zuul index f372fa7d1a..2aa52f12d2 100755 --- a/nodepool/elements/nodepool-base/install.d/99-install-zuul +++ b/nodepool/elements/nodepool-base/install.d/99-install-zuul @@ -1,4 +1,4 @@ -#!/bin/bash -xe +#!/bin/bash # Copyright (C) 2014 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,6 +16,12 @@ # This is in /usr instead of /usr/local due to this bug on precise: # https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/839588 +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi +set -e + git clone /opt/git/openstack-infra/zuul /tmp/zuul sudo virtualenv /usr/zuul-env sudo -H /usr/zuul-env/bin/pip install /tmp/zuul diff --git a/nodepool/elements/openstack-repos/install.d/95-chown-jenkins b/nodepool/elements/openstack-repos/install.d/95-chown-jenkins index 5037b591a2..eb657e95c7 100755 --- a/nodepool/elements/openstack-repos/install.d/95-chown-jenkins +++ b/nodepool/elements/openstack-repos/install.d/95-chown-jenkins @@ -15,6 +15,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi set -e chown -R jenkins:jenkins /home/jenkins diff --git a/nodepool/elements/puppet/bin/prepare-node b/nodepool/elements/puppet/bin/prepare-node old mode 100644 new mode 100755 index 01b7893f49..e62e373849 --- a/nodepool/elements/puppet/bin/prepare-node +++ b/nodepool/elements/puppet/bin/prepare-node @@ -15,6 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# dib-lint: disable=setu setpipefail dibdebugtrace indent set -e SUDO=${SUDO:-true} diff --git a/nodepool/elements/puppet/element-deps b/nodepool/elements/puppet/element-deps index 95746ba5ab..ebedd2a7ef 100644 --- a/nodepool/elements/puppet/element-deps +++ b/nodepool/elements/puppet/element-deps @@ -1,3 +1,3 @@ -source-repositories cache-url openstack-repos +source-repositories diff --git a/nodepool/elements/puppet/install.d/05-puppet b/nodepool/elements/puppet/install.d/05-puppet index 493163e88d..cfbd247a1f 100755 --- a/nodepool/elements/puppet/install.d/05-puppet +++ b/nodepool/elements/puppet/install.d/05-puppet @@ -15,6 +15,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi set -e # Unset the download cache for this invocation to prevent bleed from build host diff --git a/nodepool/elements/puppet/install.d/95-clean-repos b/nodepool/elements/puppet/install.d/95-clean-repos index 613e5d1866..15a1390b49 100755 --- a/nodepool/elements/puppet/install.d/95-clean-repos +++ b/nodepool/elements/puppet/install.d/95-clean-repos @@ -20,6 +20,10 @@ # does an apt-get update to hit those servers which may not have the uptime # of our local mirrors. +# dib-lint: disable=sete setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi set -e OS_FAMILY=$(facter osfamily) diff --git a/nodepool/elements/puppet/install.d/96-clean-cron b/nodepool/elements/puppet/install.d/96-clean-cron index 4c8e54f721..2e931be798 100755 --- a/nodepool/elements/puppet/install.d/96-clean-cron +++ b/nodepool/elements/puppet/install.d/96-clean-cron @@ -20,4 +20,10 @@ # need to do things like update the locatedb or the mandb or rotate logs # or really any of those things. We only want code running here that we want # here. + +# dib-lint: disable=sete setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi + rm -f /etc/cron.{monthly,weekly,daily,hourly,d}/* diff --git a/nodepool/elements/puppet/pre-install.d/10-preseed b/nodepool/elements/puppet/pre-install.d/10-preseed index 71d623d011..7116b437ab 100755 --- a/nodepool/elements/puppet/pre-install.d/10-preseed +++ b/nodepool/elements/puppet/pre-install.d/10-preseed @@ -20,6 +20,10 @@ # in a chroot, we're actually not running the right kernel for its assumptions # to work. +# dib-lint: disable=setu setpipefail +if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then + set -x +fi set -e # If lsb_release is missing, just do nothing.