Run watcher-db-manage in grenade testing from venv

grenade install and run everything from virtual env

- https://review.opendev.org/c/openstack/grenade/+/930507

watcher-db-manage in watcher grenade job needs to be run accordingly
and not from system level. Otherwise it will fail with below error
- https://zuul.opendev.org/t/openstack/build/02c3bd4814ea4d0580f7dfd346416425/log/controller/logs/grenade.sh_log.txt

Depends-On: https://review.opendev.org/c/openstack/watcher/+/933062

Change-Id: I73e94222c89c6a12a6006d42637cd194a09005ac
This commit is contained in:
Ghanshyam Mann
2024-10-22 11:45:57 -07:00
committed by Ghanshyam
parent 0f96f99404
commit 38288dd9c8
2 changed files with 4 additions and 1 deletions

View File

@@ -275,6 +275,9 @@ function install_watcherclient {
git_clone_by_name "python-watcherclient"
setup_dev_lib "python-watcherclient"
fi
if [[ "$GLOBAL_VENV" == "True" ]]; then
sudo ln -sf /opt/stack/data/venv/bin/watcher /usr/local/bin
fi
}
# install_watcher() - Collect source and prepare

View File

@@ -70,7 +70,7 @@ then write_uwsgi_config "$WATCHER_UWSGI_CONF" "$WATCHER_UWSGI" "/infra-optim"
fi
# Migrate the database
watcher-db-manage upgrade || die $LINO "DB migration error"
$WATCHER_BIN_DIR/watcher-db-manage upgrade || die $LINO "DB migration error"
start_watcher