From 8222a367424053572f9bd962ddac289d7f0908ef Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Tue, 27 May 2025 16:01:20 +0000 Subject: [PATCH] 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 --- .../upgrade/from-2025.1/upgrade-designate | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 devstack/upgrade/from-2025.1/upgrade-designate diff --git a/devstack/upgrade/from-2025.1/upgrade-designate b/devstack/upgrade/from-2025.1/upgrade-designate new file mode 100644 index 000000000..47bdf753a --- /dev/null +++ b/devstack/upgrade/from-2025.1/upgrade-designate @@ -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 + +}