From d7ae9f2df17f6b4d675a433df3f9d716a8b3b078 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Tue, 5 Feb 2019 15:16:14 +0000 Subject: [PATCH] Don't cd to /tmp in environment-setup.sh This script is used by developers to activate the kayobe virtual environment and source the configuration's kayobe-env file. A cd to /tmp is an unexpected outcome of running the script. To test the location-independent installation, remove the chdir from the zuul job tasks that execute kayobe commands. Change-Id: I59194952901fa648382489f48dc7aafb03d3a682 Story: 2004252 Task: 29347 --- dev/functions | 4 ---- playbooks/kayobe-overcloud-base/run.yml | 3 +-- playbooks/kayobe-overcloud-upgrade-base/run.yml | 4 ++-- playbooks/kayobe-seed-base/run.yml | 3 +-- playbooks/kayobe-seed-upgrade-base/run.yml | 4 ++-- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/dev/functions b/dev/functions index aa57e791a..6c0bbe4e4 100644 --- a/dev/functions +++ b/dev/functions @@ -158,10 +158,6 @@ function environment_setup { # the rocky release. if [ ! -d "${KAYOBE_VENV_PATH}/share/kayobe/ansible" ]; then cd "${KAYOBE_SOURCE_PATH}" - else - # kayobe should still be able to function when the current working directory - # is not the source checkout - cd /tmp fi } diff --git a/playbooks/kayobe-overcloud-base/run.yml b/playbooks/kayobe-overcloud-base/run.yml index bea0b13c6..17adde26b 100644 --- a/playbooks/kayobe-overcloud-base/run.yml +++ b/playbooks/kayobe-overcloud-base/run.yml @@ -10,8 +10,7 @@ tasks: - name: Ensure overcloud is deployed shell: - cmd: dev/overcloud-deploy.sh > {{ logs_dir }}/ansible/overcloud-deploy - chdir: "{{ kayobe_src_dir }}" + cmd: "{{ kayobe_src_dir }}/dev/overcloud-deploy.sh > {{ logs_dir }}/ansible/overcloud-deploy" - name: Ensure test Tenks cluster is deployed shell: diff --git a/playbooks/kayobe-overcloud-upgrade-base/run.yml b/playbooks/kayobe-overcloud-upgrade-base/run.yml index 766942cb5..111f563e5 100644 --- a/playbooks/kayobe-overcloud-upgrade-base/run.yml +++ b/playbooks/kayobe-overcloud-upgrade-base/run.yml @@ -83,8 +83,7 @@ - name: Ensure overcloud is upgraded shell: - cmd: dev/overcloud-upgrade.sh > {{ logs_dir }}/ansible/overcloud-upgrade - chdir: "{{ kayobe_src_dir }}" + cmd: "{{ kayobe_src_dir }}/dev/overcloud-upgrade.sh > {{ logs_dir }}/ansible/overcloud-upgrade" # FIXME(mgoddard): The nova-compute service does not seem to be correctly # handling the SIGHUP after being upgraded, leading to "In shutdown, no new @@ -108,3 +107,4 @@ environment: KAYOBE_CONFIG_SOURCE_PATH: "{{ kayobe_config_src_dir }}" + KAYOBE_SOURCE_PATH: "{{ kayobe_src_dir }}" diff --git a/playbooks/kayobe-seed-base/run.yml b/playbooks/kayobe-seed-base/run.yml index 3693b6dfc..5f1077313 100644 --- a/playbooks/kayobe-seed-base/run.yml +++ b/playbooks/kayobe-seed-base/run.yml @@ -11,5 +11,4 @@ tasks: - name: Ensure seed is deployed shell: - cmd: dev/seed-deploy.sh > {{ logs_dir }}/ansible/seed-deploy - chdir: "{{ kayobe_src_dir }}" + cmd: "{{ kayobe_src_dir }}/dev/seed-deploy.sh > {{ logs_dir }}/ansible/seed-deploy" diff --git a/playbooks/kayobe-seed-upgrade-base/run.yml b/playbooks/kayobe-seed-upgrade-base/run.yml index d1d960f32..aae52b392 100644 --- a/playbooks/kayobe-seed-upgrade-base/run.yml +++ b/playbooks/kayobe-seed-upgrade-base/run.yml @@ -56,9 +56,9 @@ - name: Ensure seed is upgraded shell: - cmd: dev/seed-upgrade.sh > {{ logs_dir }}/ansible/seed-upgrade - chdir: "{{ kayobe_src_dir }}" + cmd: "{{ kayobe_src_dir }}/dev/seed-upgrade.sh > {{ logs_dir }}/ansible/seed-upgrade" # TODO(mgoddard): Perform a smoke test against the upgraded current release. environment: KAYOBE_CONFIG_SOURCE_PATH: "{{ kayobe_config_src_dir }}" + KAYOBE_SOURCE_PATH: "{{ kayobe_src_dir }}"