Fix uwsgi config for grenade jobs

Openstack moved from using wsgi scripts to directly calling the wsgi module
due to changes in setuptools that stops the pbr wsgi_scripts from working.

This patch adds an upgrade script that reconfigures uwsgi when updating
to Flamingo.

Change-Id: I24609499e96cfcaed866a40fd59146cded26479b
This commit is contained in:
Michael Johnson
2025-05-27 16:01:20 +00:00
committed by Omer
parent c2f1473909
commit 8222a36742

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Openstack moved from using wsgi scripts to directly calling the wsgi module
# due to changes in setuptools that stops the pbr wsgi_scripts from working.
# This script will reconfigure uwsgi on upgrade to point to the module instead
# of the wsgi script that is no longer present in designate.
function configure_designate_upgrade {
source $GRENADE_DIR/functions
source ${TARGET_DEVSTACK_DIR}/lib/apache
write_uwsgi_config "$DESIGNATE_UWSGI_CONF" "$DESIGNATE_UWSGI" "/dns" "" "designate-api-wsgi"
# Note: We must use HTTP transport here due to bug:
# https://github.com/unbit/uwsgi/issues/2368
wsgi_conf=$(apache_site_config_for designate-api-wsgi)
echo 'ProxyPass "/dns" "http://127.0.0.1:60053" retry=0' | sudo tee $wsgi_conf
iniset $DESIGNATE_UWSGI_CONF uwsgi http-socket 127.0.0.1:60053
}