From f9ee6d595c7120fbde8227d5bfb986b25c462e46 Mon Sep 17 00:00:00 2001 From: Harry Rybacki Date: Mon, 29 Aug 2016 13:30:43 -0400 Subject: [PATCH] Revert "Move unique socket generation into quickstart.sh" Moving socket creation to quickstart.sh results in unique socket generation per call to quickstart.sh This breaks jobs in CI requiring multiple calls to quickstart e.g. periodic scale jobs This reverts commit 542addffbd746a04abe3222465176d0aacaadcc6. Change-Id: I0590f437a6a9ac7074c8de7bf3659d28dbe9c898 Closes-Bug: 1616479 --- ci-scripts/basic.sh | 6 ++++++ ci-scripts/collect-logs.sh | 6 ++++++ ci-scripts/devmode_tempest.sh | 6 ++++++ ci-scripts/feature-scale-deploy.sh | 6 ++++++ ci-scripts/full-deploy.sh | 6 ++++++ ci-scripts/images.sh | 6 ++++++ ci-scripts/roles-deploy.sh | 6 ++++++ ci-scripts/upgrade.sh | 6 ++++++ quickstart.sh | 6 ------ 9 files changed, 48 insertions(+), 6 deletions(-) diff --git a/ci-scripts/basic.sh b/ci-scripts/basic.sh index a6a07a41d..6024094e3 100644 --- a/ci-scripts/basic.sh +++ b/ci-scripts/basic.sh @@ -11,6 +11,12 @@ BUILD_SYS=$2 CONFIG=$3 JOB_TYPE=$4 +# (trown) This is so that we ensure separate ssh sockets for +# concurrent jobs. Without this, two jobs running in parallel +# would try to use the same undercloud-stack socket. +socketdir=$(mktemp -d /tmp/sockXXXXXX) +export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r + bash $WORKSPACE/tripleo-quickstart/quickstart.sh \ --working-dir $WORKSPACE/ \ --no-clone \ diff --git a/ci-scripts/collect-logs.sh b/ci-scripts/collect-logs.sh index 637ce5aec..c7fd1cfc7 100644 --- a/ci-scripts/collect-logs.sh +++ b/ci-scripts/collect-logs.sh @@ -8,6 +8,12 @@ export ANSIBLE_CONFIG=$WORKSPACE/tripleo-quickstart/ansible.cfg export SSH_CONFIG=$WORKSPACE/ssh.config.ansible export ANSIBLE_SSH_ARGS="-F ${SSH_CONFIG}" +# (trown) This is so that we ensure separate ssh sockets for +# concurrent jobs. Without this, two jobs running in parallel +# would try to use the same undercloud-stack socket. +socketdir=$(mktemp -d /tmp/sockXXXXXX) +export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r + bash $WORKSPACE/tripleo-quickstart/quickstart.sh \ --working-dir $WORKSPACE/ \ --no-clone \ diff --git a/ci-scripts/devmode_tempest.sh b/ci-scripts/devmode_tempest.sh index 68f56186f..3e45c0004 100644 --- a/ci-scripts/devmode_tempest.sh +++ b/ci-scripts/devmode_tempest.sh @@ -8,6 +8,12 @@ BUILD_SYS=$2 CONFIG=$3 JOB_TYPE=$4 +# (trown) This is so that we ensure separate ssh sockets for +# concurrent jobs. Without this, two jobs running in parallel +# would try to use the same undercloud-stack socket. +socketdir=$(mktemp -d /tmp/sockXXXXXX) +export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r + pushd $WORKSPACE/tripleo-quickstart bash $WORKSPACE/tripleo-quickstart/quickstart.sh \ diff --git a/ci-scripts/feature-scale-deploy.sh b/ci-scripts/feature-scale-deploy.sh index 90288e5a1..f8d65711c 100644 --- a/ci-scripts/feature-scale-deploy.sh +++ b/ci-scripts/feature-scale-deploy.sh @@ -18,6 +18,12 @@ else exit 1 fi +# (trown) This is so that we ensure separate ssh sockets for +# concurrent jobs. Without this, two jobs running in parallel +# would try to use the same undercloud-stack socket. +socketdir=$(mktemp -d /tmp/sockXXXXXX) +export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r + pushd $WORKSPACE/tripleo-quickstart # run scale phase 1 against the gate job: Scale new compute node -> Delete original compute node diff --git a/ci-scripts/full-deploy.sh b/ci-scripts/full-deploy.sh index 06443bb60..faf5ea2ce 100644 --- a/ci-scripts/full-deploy.sh +++ b/ci-scripts/full-deploy.sh @@ -19,6 +19,12 @@ else exit 1 fi +# (trown) This is so that we ensure separate ssh sockets for +# concurrent jobs. Without this, two jobs running in parallel +# would try to use the same undercloud-stack socket. +socketdir=$(mktemp -d /tmp/sockXXXXXX) +export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r + pushd $WORKSPACE/tripleo-quickstart bash quickstart.sh \ --tags all \ diff --git a/ci-scripts/images.sh b/ci-scripts/images.sh index 214985c0a..9fc03f59b 100644 --- a/ci-scripts/images.sh +++ b/ci-scripts/images.sh @@ -25,6 +25,12 @@ else exit 1 fi +# (trown) This is so that we ensure separate ssh sockets for +# concurrent jobs. Without this, two jobs running in parallel +# would try to use the same undercloud-stack socket. +socketdir=$(mktemp -d /tmp/sockXXXXXX) +export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r + bash $WORKSPACE/tripleo-quickstart/quickstart.sh \ --tags all \ --config $WORKSPACE/config/general_config/$CONFIG.yml \ diff --git a/ci-scripts/roles-deploy.sh b/ci-scripts/roles-deploy.sh index 86769f8fb..2f86048c6 100644 --- a/ci-scripts/roles-deploy.sh +++ b/ci-scripts/roles-deploy.sh @@ -19,6 +19,12 @@ else exit 1 fi +# (trown) This is so that we ensure separate ssh sockets for +# concurrent jobs. Without this, two jobs running in parallel +# would try to use the same undercloud-stack socket. +socketdir=$(mktemp -d /tmp/sockXXXXXX) +export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r + if [ "$JOB_TYPE" = "gate" ]; then # set up the gated repos and modify the requirements file to use them bash $WORKSPACE/tripleo-quickstart/quickstart.sh \ diff --git a/ci-scripts/upgrade.sh b/ci-scripts/upgrade.sh index c12f898cb..1c77b4c76 100644 --- a/ci-scripts/upgrade.sh +++ b/ci-scripts/upgrade.sh @@ -24,6 +24,12 @@ else exit 1 fi +# (trown) This is so that we ensure separate ssh sockets for +# concurrent jobs. Without this, two jobs running in parallel +# would try to use the same undercloud-stack socket. +socketdir=$(mktemp -d /tmp/sockXXXXXX) +export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r + pushd $WORKSPACE/tripleo-quickstart bash quickstart.sh \ -e undercloud_image_url="http://artifacts.ci.centos.org/artifacts/rdo/images/$RELEASE/$BUILD_SYS/$LOCATION/undercloud.qcow2" \ diff --git a/quickstart.sh b/quickstart.sh index 5e17a121f..07b020e32 100755 --- a/quickstart.sh +++ b/quickstart.sh @@ -379,12 +379,6 @@ export ANSIBLE_INVENTORY=$OPT_WORKDIR/hosts #set the ansible ssh.config options if not already set. source $OOOQ_DIR/ansible_ssh_env.sh -# (trown) This is so that we ensure separate ssh sockets for -# concurrent jobs. Without this, two jobs running in parallel -# would try to use the same undercloud-stack socket. -socketdir=$(mktemp -d /tmp/sockXXXXXX) -export ANSIBLE_SSH_CONTROL_PATH=$socketdir/%%h-%%r - if [ "$OPT_RETAIN_INVENTORY_FILE" = 0 ]; then # Clear out inventory file to avoid tripping over data # from a previous invocation