[stable-only]: Switch to uWSGI module

For some reason (pbr, setuptools, upper-constraints, devstack itself)
devstack can't find /opt/stack/data/venv/bin/magnum-api-wsgi

It's a partial cherry-pick of If8a155a3cebf8cd6a6d22ed7617f2777fbfac11f

buster-slim got moved to debian/eol
marking flannel jobs as non-voting for now

Change-Id: I331ef443c626c8f8936e75ac20b76a464092fbf1
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
This commit is contained in:
Michal Nasiadka
2025-08-22 17:16:21 +02:00
parent 29707e9bf1
commit c73ef055b1
4 changed files with 31 additions and 5 deletions

View File

@@ -145,9 +145,11 @@
jobs:
- magnum-tempest-plugin-tests-api
- magnum-tempest-plugin-tests-api-jammy
- magnum-tempest-plugin-tests-cluster-k8s_fcos_v1-1.27-flannel
- magnum-tempest-plugin-tests-cluster-k8s_fcos_v1-1.27-flannel:
voting: false
- magnum-tempest-plugin-tests-cluster-k8s_fcos_v1-1.27-calico
- magnum-tempest-plugin-tests-cluster-k8s_fcos_v1-1.28-flannel
- magnum-tempest-plugin-tests-cluster-k8s_fcos_v1-1.28-flannel:
voting: false
- magnum-tempest-plugin-tests-cluster-k8s_fcos_v1-1.28-calico
- magnum-container-build
gate:

View File

@@ -49,7 +49,7 @@ MAGNUM_API_PASTE=$MAGNUM_CONF_DIR/api-paste.ini
MAGNUM_K8S_KEYSTONE_AUTH_DEFAULT_POLICY=$MAGNUM_CONF_DIR/k8s_keystone_auth_default_policy.json
MAGNUM_POLICY=$MAGNUM_CONF_DIR/policy.yaml
MAGNUM_UWSGI=$MAGNUM_BIN_DIR/magnum-api-wsgi
MAGNUM_UWSGI=magnum.wsgi.api:application
MAGNUM_UWSGI_CONF=$MAGNUM_CONF_DIR/magnum-api-uwsgi.ini
# Public facing bits
@@ -242,7 +242,7 @@ function create_magnum_conf {
iniset $MAGNUM_CONF kubernetes keystone_auth_default_policy $MAGNUM_K8S_KEYSTONE_AUTH_DEFAULT_POLICY
write_uwsgi_config "$MAGNUM_UWSGI_CONF" "$MAGNUM_UWSGI" "/container-infra"
write_uwsgi_config "$MAGNUM_UWSGI_CONF" "$MAGNUM_UWSGI" "/container-infra" "" "magnum-api"
}
function create_api_paste_conf {

View File

@@ -1,5 +1,5 @@
ARG HELM_VERSION=v3.2.0
FROM debian:buster-slim
FROM debian/eol:buster-slim
ARG HELM_VERSION

24
magnum/wsgi/api.py Normal file
View File

@@ -0,0 +1,24 @@
# -*- mode: python -*-
#
# Copyright 2017 SUSE Linux GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import sys
from magnum.api import app as api_app
from magnum.common import service
service.prepare_service(sys.argv)
application = api_app.load_app()