Work around gate breakage
This is merged from three cherry-picked patches, all needed in order to pass gate testing. Make neutron-grenade non-voting in gate because dropping it there would be complicated. Use packaged uwsgi on Fedora and Ubuntu Building uwsgi from source was a workaround that was introduced a long time ago, it doesn't seem like it is needed anymore and will actually fail for Ubuntu 20.04. Also it doesn't match what will happen for most real-world installations, so let's try to get back to using distro packages. We'll still use the source install for RHEL/Centos, it remains to be tested whether we can get back to using distro versions there, too. Use uwsgi binary from path All these uwsgi invocations assume that the uwsgi binary is in the same directory as their project binaries are installed into (probably /usr/bin). That may not be correct -- for example if using a packaged uwsgi on Fedora the binary will live in /usr/sbin/uwsgi (not /usr/bin where the project files from pip are). Switch invocations to just find it in the path. Related-Bug: 1883468 Change-Id: I82f539bfa533349293dd5a8ce309c9cc0ffb0393 (cherry picked from commit2d903568ed
) (cherry picked from commit84737ebd96
) (cherry picked from commit312517d510
)
This commit is contained in:
parent
ab86ced64c
commit
5c07f3b1b5
21
.zuul.yaml
21
.zuul.yaml
|
@ -614,7 +614,8 @@
|
|||
check:
|
||||
jobs:
|
||||
- devstack
|
||||
- devstack-xenial
|
||||
- devstack-xenial:
|
||||
voting: false
|
||||
- devstack-ipv6:
|
||||
voting: false
|
||||
- devstack-platform-centos-7
|
||||
|
@ -622,7 +623,8 @@
|
|||
- devstack-platform-fedora-latest
|
||||
- devstack-platform-xenial
|
||||
- devstack-multinode
|
||||
- devstack-multinode-xenial
|
||||
- devstack-multinode-xenial:
|
||||
voting: false
|
||||
- devstack-unit-tests
|
||||
- openstack-tox-bashate
|
||||
- ironic-tempest-ipa-wholedisk-bios-agent_ipmitool-tinyipa:
|
||||
|
@ -633,10 +635,12 @@
|
|||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
- neutron-grenade:
|
||||
voting: false
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
- neutron-grenade-multinode:
|
||||
voting: false
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
|
@ -652,20 +656,21 @@
|
|||
gate:
|
||||
jobs:
|
||||
- devstack
|
||||
- devstack-xenial
|
||||
# - devstack-xenial
|
||||
- devstack-multinode
|
||||
- devstack-multinode-xenial
|
||||
# - devstack-multinode-xenial
|
||||
- devstack-unit-tests
|
||||
- openstack-tox-bashate
|
||||
- neutron-grenade-multinode:
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
# - neutron-grenade-multinode:
|
||||
# irrelevant-files:
|
||||
# - ^.*\.rst$
|
||||
# - ^doc/.*$
|
||||
- neutron-tempest-linuxbridge:
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
- neutron-grenade:
|
||||
voting: false
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
|
|
66
lib/apache
66
lib/apache
|
@ -82,26 +82,52 @@ function install_apache_uwsgi {
|
|||
apxs="apxs"
|
||||
fi
|
||||
|
||||
# Ubuntu xenial is back level on uwsgi so the proxy doesn't
|
||||
# actually work. Hence we have to build from source for now.
|
||||
# This varies based on packaged/installed. If we've
|
||||
# pip_installed, then the pip setup will only build a "python"
|
||||
# module that will be either python2 or python3 depending on what
|
||||
# it was built with.
|
||||
#
|
||||
# Centos 7 actually has the module in epel, but there was a big
|
||||
# push to disable epel by default. As such, compile from source
|
||||
# there as well.
|
||||
# For package installs, the distro ships both plugins and you need
|
||||
# to select the right one ... it will not be autodetected.
|
||||
if python3_enabled; then
|
||||
UWSGI_PYTHON_PLUGIN=python3
|
||||
else
|
||||
UWSGI_PYTHON_PLUGIN=python
|
||||
fi
|
||||
|
||||
local dir
|
||||
dir=$(mktemp -d)
|
||||
pushd $dir
|
||||
pip_install uwsgi
|
||||
pip download uwsgi -c $REQUIREMENTS_DIR/upper-constraints.txt
|
||||
local uwsgi
|
||||
uwsgi=$(ls uwsgi*)
|
||||
tar xvf $uwsgi
|
||||
cd uwsgi*/apache2
|
||||
sudo $apxs -i -c mod_proxy_uwsgi.c
|
||||
popd
|
||||
# delete the temp directory
|
||||
sudo rm -rf $dir
|
||||
if is_ubuntu; then
|
||||
install_package uwsgi \
|
||||
uwsgi-plugin-python \
|
||||
uwsgi-plugin-python3 \
|
||||
libapache2-mod-proxy-uwsgi
|
||||
elif [[ $os_VENDOR == "Fedora" ]]; then
|
||||
# Note httpd comes with mod_proxy_uwsgi and it is loaded by
|
||||
# default; the mod_proxy_uwsgi package actually conflicts now.
|
||||
# See:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1574335
|
||||
#
|
||||
# Thus there is nothing else to do after this install
|
||||
install_package uwsgi \
|
||||
uwsgi-plugin-python3
|
||||
else
|
||||
# Centos actually has the module in epel, but there was a big
|
||||
# push to disable epel by default. As such, compile from source
|
||||
# there.
|
||||
local dir
|
||||
dir=$(mktemp -d)
|
||||
pushd $dir
|
||||
pip_install uwsgi
|
||||
pip download uwsgi -c $REQUIREMENTS_DIR/upper-constraints.txt
|
||||
local uwsgi
|
||||
uwsgi=$(ls uwsgi*)
|
||||
tar xvf $uwsgi
|
||||
cd uwsgi*/apache2
|
||||
sudo $apxs -i -c mod_proxy_uwsgi.c
|
||||
popd
|
||||
# delete the temp directory
|
||||
sudo rm -rf $dir
|
||||
UWSGI_PYTHON_PLUGIN=python
|
||||
fi
|
||||
|
||||
if is_ubuntu || is_suse ; then
|
||||
# we've got to enable proxy and proxy_uwsgi for this to work
|
||||
|
@ -265,7 +291,7 @@ function write_uwsgi_config {
|
|||
# configured after graceful shutdown
|
||||
iniset "$file" uwsgi worker-reload-mercy $WORKER_TIMEOUT
|
||||
iniset "$file" uwsgi enable-threads true
|
||||
iniset "$file" uwsgi plugins python
|
||||
iniset "$file" uwsgi plugins http,${UWSGI_PYTHON_PLUGIN}
|
||||
# uwsgi recommends this to prevent thundering herd on accept.
|
||||
iniset "$file" uwsgi thunder-lock true
|
||||
# Set hook to trigger graceful shutdown on SIGTERM
|
||||
|
@ -318,7 +344,7 @@ function write_local_uwsgi_http_config {
|
|||
iniset "$file" uwsgi die-on-term true
|
||||
iniset "$file" uwsgi exit-on-reload false
|
||||
iniset "$file" uwsgi enable-threads true
|
||||
iniset "$file" uwsgi plugins python
|
||||
iniset "$file" uwsgi plugins http,${UWSGI_PYTHON_PLUGIN}
|
||||
# uwsgi recommends this to prevent thundering herd on accept.
|
||||
iniset "$file" uwsgi thunder-lock true
|
||||
# Set hook to trigger graceful shutdown on SIGTERM
|
||||
|
|
|
@ -507,7 +507,7 @@ function start_cinder {
|
|||
start_tls_proxy cinder '*' $CINDER_SERVICE_PORT $CINDER_SERVICE_HOST $CINDER_SERVICE_PORT_INT
|
||||
fi
|
||||
else
|
||||
run_process "c-api" "$CINDER_BIN_DIR/uwsgi --procname-prefix cinder-api --ini $CINDER_UWSGI_CONF"
|
||||
run_process "c-api" "$(which uwsgi) --procname-prefix cinder-api --ini $CINDER_UWSGI_CONF"
|
||||
cinder_url=$service_protocol://$SERVICE_HOST/volume/v3
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -343,7 +343,7 @@ function start_glance {
|
|||
|
||||
run_process g-reg "$GLANCE_BIN_DIR/glance-registry --config-file=$GLANCE_CONF_DIR/glance-registry.conf"
|
||||
if [[ "$WSGI_MODE" == "uwsgi" ]]; then
|
||||
run_process g-api "$GLANCE_BIN_DIR/uwsgi --procname-prefix glance-api --ini $GLANCE_UWSGI_CONF"
|
||||
run_process g-api "$(which uwsgi) --procname-prefix glance-api --ini $GLANCE_UWSGI_CONF"
|
||||
else
|
||||
run_process g-api "$GLANCE_BIN_DIR/glance-api --config-dir=$GLANCE_CONF_DIR"
|
||||
fi
|
||||
|
|
|
@ -518,7 +518,7 @@ function start_keystone {
|
|||
enable_apache_site keystone
|
||||
restart_apache_server
|
||||
else # uwsgi
|
||||
run_process keystone "$KEYSTONE_BIN_DIR/uwsgi --procname-prefix keystone --ini $KEYSTONE_PUBLIC_UWSGI_CONF" ""
|
||||
run_process keystone "$(which uwsgi) --procname-prefix keystone --ini $KEYSTONE_PUBLIC_UWSGI_CONF" ""
|
||||
fi
|
||||
|
||||
echo "Waiting for keystone to start..."
|
||||
|
|
|
@ -460,7 +460,7 @@ function start_neutron_api {
|
|||
done
|
||||
|
||||
if [ "$NEUTRON_DEPLOY_MOD_WSGI" == "True" ]; then
|
||||
run_process neutron-api "$NEUTRON_BIN_DIR/uwsgi --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
|
||||
run_process neutron-api "$(which uwsgi) --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
|
||||
neutron_url=$service_protocol://$NEUTRON_SERVICE_HOST/networking/
|
||||
enable_service neutron-rpc-server
|
||||
run_process neutron-rpc-server "$NEUTRON_BIN_DIR/neutron-rpc-server $opts"
|
||||
|
|
|
@ -486,7 +486,7 @@ function start_neutron_service_and_check {
|
|||
# Start the Neutron service
|
||||
if [ "$NEUTRON_DEPLOY_MOD_WSGI" == "True" ]; then
|
||||
enable_service neutron-api
|
||||
run_process neutron-api "$NEUTRON_BIN_DIR/uwsgi --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
|
||||
run_process neutron-api "$(which uwsgi) --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
|
||||
neutron_url=$Q_PROTOCOL://$Q_HOST/networking/
|
||||
enable_service neutron-rpc-server
|
||||
run_process neutron-rpc-server "$NEUTRON_BIN_DIR/neutron-rpc-server $cfg_file_options"
|
||||
|
|
4
lib/nova
4
lib/nova
|
@ -904,7 +904,7 @@ function start_nova_api {
|
|||
start_tls_proxy nova '*' $NOVA_SERVICE_PORT $NOVA_SERVICE_HOST $NOVA_SERVICE_PORT_INT
|
||||
fi
|
||||
else
|
||||
run_process "n-api" "$NOVA_BIN_DIR/uwsgi --procname-prefix nova-api --ini $NOVA_UWSGI_CONF"
|
||||
run_process "n-api" "$(which uwsgi) --procname-prefix nova-api --ini $NOVA_UWSGI_CONF"
|
||||
nova_url=$service_protocol://$SERVICE_HOST/compute/v2.1/
|
||||
fi
|
||||
|
||||
|
@ -1020,7 +1020,7 @@ function start_nova_rest {
|
|||
if [ "$NOVA_USE_MOD_WSGI" == "False" ]; then
|
||||
run_process n-api-meta "$NOVA_BIN_DIR/nova-api-metadata --config-file $compute_cell_conf"
|
||||
else
|
||||
run_process n-api-meta "$NOVA_BIN_DIR/uwsgi --procname-prefix nova-api-meta --ini $NOVA_METADATA_UWSGI_CONF"
|
||||
run_process n-api-meta "$(which uwsgi) --procname-prefix nova-api-meta --ini $NOVA_METADATA_UWSGI_CONF"
|
||||
fi
|
||||
|
||||
# nova-consoleauth always runs globally
|
||||
|
|
|
@ -154,7 +154,7 @@ function install_placement {
|
|||
# start_placement_api() - Start the API processes ahead of other things
|
||||
function start_placement_api {
|
||||
if [[ "$WSGI_MODE" == "uwsgi" ]]; then
|
||||
run_process "placement-api" "$PLACEMENT_BIN_DIR/uwsgi --procname-prefix placement --ini $PLACEMENT_UWSGI_CONF"
|
||||
run_process "placement-api" "$(which uwsgi) --procname-prefix placement --ini $PLACEMENT_UWSGI_CONF"
|
||||
else
|
||||
enable_apache_site placement-api
|
||||
restart_apache_server
|
||||
|
|
Loading…
Reference in New Issue