Skip to content

Commit

Permalink
kayobe-env: Unstick KOLLA_SOURCE_PATH and KOLLA_VENV_PATH
Browse files Browse the repository at this point in the history
The kayobe-env script does not update the KOLLA_SOURCE_PATH and
KOLLA_VENV_PATH variables if they are already set.  This can lead to
dangerous and difficult to diagnose issues where Kayobe uses a different
version of Kolla Ansible than expected.

This change updates these variables each time the kayobe-env script is
sourced.

Change-Id: I3b4b0b611750b9c7846ff5f74554aee2f14939e4
Closes-Bug: #2036711
  • Loading branch information
markgoddard authored and mnasiadka committed Sep 21, 2023
1 parent 3adf46c commit 651b8be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kayobe-env
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export KOLLA_CONFIG_PATH=$KAYOBE_CONFIG_ROOT/etc/kolla
# kayobe/
# kolla-ansible/
base_path=$(realpath $KAYOBE_CONFIG_ROOT/../../)
export KOLLA_SOURCE_PATH=${KOLLA_SOURCE_PATH:-${base_path}/src/kolla-ansible}
export KOLLA_VENV_PATH=${KOLLA_VENV_PATH:-${base_path}/venvs/kolla-ansible}
export KOLLA_SOURCE_PATH=${base_path}/src/kolla-ansible
export KOLLA_VENV_PATH=${base_path}/venvs/kolla-ansible

function check_and_export_env {
# Look for existing Kayobe environments
Expand Down

0 comments on commit 651b8be

Please sign in to comment.