Skip to content

Commit 20e0409

Browse files
ianwGhanshyam Mann
authored andcommitted
Fix gate issues
This is a combination of 3 commits. This is the 1st commit message: Work around uwsgi breakage uwsgi broke installation from source with their latest release [0]. Since we want to move away from source installation anyway, make grenade based jobs non-voting for the moment so that we can backport [1] properly. [0] https://bugs.launchpad.net/bugs/1883468 [1] https://review.opendev.org/577955 This is the commit message openstack#2: 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. This is the commit message openstack#3: 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. While all this was happening, Zuul updated to Ansible 2.9 as well, so we require a fix for Ansible syntax in 736006 as well. Depends-On: https://review.opendev.org/735535 Depends-On: https://review.opendev.org/736006 Related-Bug: 1883468 Change-Id: I82f539bfa533349293dd5a8ce309c9cc0ffb0393 (cherry picked from commit 84737eb) (cherry picked from commit 2d90356) (cherry picked from commit 312517d)
1 parent b6f43a4 commit 20e0409

9 files changed

Lines changed: 75 additions & 37 deletions

File tree

‎.zuul.yaml‎

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -619,14 +619,16 @@
619619
check:
620620
jobs:
621621
- devstack
622-
- devstack-xenial
622+
- devstack-xenial:
623+
voting: false
623624
- devstack-ipv6
624625
- devstack-platform-centos-7
625626
- devstack-platform-opensuse-15
626627
- devstack-platform-fedora-29
627628
- devstack-platform-xenial
628629
- devstack-multinode
629-
- devstack-multinode-xenial
630+
- devstack-multinode-xenial:
631+
voting: false
630632
- devstack-unit-tests
631633
- openstack-tox-bashate
632634
- ironic-tempest-ipa-wholedisk-bios-agent_ipmitool-tinyipa:
@@ -640,7 +642,13 @@
640642
irrelevant-files:
641643
- ^.*\.rst$
642644
- ^doc/.*$
645+
- grenade:
646+
voting: false
647+
irrelevant-files:
648+
- ^.*\.rst$
649+
- ^doc/.*$
643650
- neutron-grenade-multinode:
651+
voting: false
644652
irrelevant-files:
645653
- ^.*\.rst$
646654
- ^doc/.*$
@@ -664,16 +672,16 @@
664672
gate:
665673
jobs:
666674
- devstack
667-
- devstack-xenial
675+
#- devstack-xenial
668676
- devstack-ipv6
669677
- devstack-multinode
670-
- devstack-multinode-xenial
678+
#- devstack-multinode-xenial
671679
- devstack-unit-tests
672680
- openstack-tox-bashate
673-
- neutron-grenade-multinode:
674-
irrelevant-files:
675-
- ^.*\.rst$
676-
- ^doc/.*$
681+
# - neutron-grenade-multinode:
682+
# irrelevant-files:
683+
# - ^.*\.rst$
684+
# - ^doc/.*$
677685
- neutron-tempest-linuxbridge:
678686
irrelevant-files:
679687
- ^.*\.rst$
@@ -682,6 +690,10 @@
682690
irrelevant-files:
683691
- ^.*\.rst$
684692
- ^doc/.*$
693+
# - grenade:
694+
# irrelevant-files:
695+
# - ^.*\.rst$
696+
# - ^doc/.*$
685697
- openstacksdk-functional-devstack:
686698
irrelevant-files:
687699
- ^.*\.rst$

‎lib/apache‎

Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -82,26 +82,52 @@ function install_apache_uwsgi {
8282
apxs="apxs"
8383
fi
8484

85-
# Ubuntu xenial is back level on uwsgi so the proxy doesn't
86-
# actually work. Hence we have to build from source for now.
85+
# This varies based on packaged/installed. If we've
86+
# pip_installed, then the pip setup will only build a "python"
87+
# module that will be either python2 or python3 depending on what
88+
# it was built with.
8789
#
88-
# Centos 7 actually has the module in epel, but there was a big
89-
# push to disable epel by default. As such, compile from source
90-
# there as well.
91-
92-
local dir
93-
dir=$(mktemp -d)
94-
pushd $dir
95-
pip_install uwsgi
96-
pip download uwsgi -c $REQUIREMENTS_DIR/upper-constraints.txt
97-
local uwsgi
98-
uwsgi=$(ls uwsgi*)
99-
tar xvf $uwsgi
100-
cd uwsgi*/apache2
101-
sudo $apxs -i -c mod_proxy_uwsgi.c
102-
popd
103-
# delete the temp directory
104-
sudo rm -rf $dir
90+
# For package installs, the distro ships both plugins and you need
91+
# to select the right one ... it will not be autodetected.
92+
if python3_enabled; then
93+
UWSGI_PYTHON_PLUGIN=python3
94+
else
95+
UWSGI_PYTHON_PLUGIN=python
96+
fi
97+
98+
if is_ubuntu; then
99+
install_package uwsgi \
100+
uwsgi-plugin-python \
101+
uwsgi-plugin-python3 \
102+
libapache2-mod-proxy-uwsgi
103+
elif [[ $os_VENDOR == "Fedora" ]]; then
104+
# Note httpd comes with mod_proxy_uwsgi and it is loaded by
105+
# default; the mod_proxy_uwsgi package actually conflicts now.
106+
# See:
107+
# https://bugzilla.redhat.com/show_bug.cgi?id=1574335
108+
#
109+
# Thus there is nothing else to do after this install
110+
install_package uwsgi \
111+
uwsgi-plugin-python3
112+
else
113+
# Centos actually has the module in epel, but there was a big
114+
# push to disable epel by default. As such, compile from source
115+
# there.
116+
local dir
117+
dir=$(mktemp -d)
118+
pushd $dir
119+
pip_install uwsgi
120+
pip download uwsgi -c $REQUIREMENTS_DIR/upper-constraints.txt
121+
local uwsgi
122+
uwsgi=$(ls uwsgi*)
123+
tar xvf $uwsgi
124+
cd uwsgi*/apache2
125+
sudo $apxs -i -c mod_proxy_uwsgi.c
126+
popd
127+
# delete the temp directory
128+
sudo rm -rf $dir
129+
UWSGI_PYTHON_PLUGIN=python
130+
fi
105131

106132
if is_ubuntu || is_suse ; then
107133
# we've got to enable proxy and proxy_uwsgi for this to work
@@ -265,7 +291,7 @@ function write_uwsgi_config {
265291
# configured after graceful shutdown
266292
iniset "$file" uwsgi worker-reload-mercy $WORKER_TIMEOUT
267293
iniset "$file" uwsgi enable-threads true
268-
iniset "$file" uwsgi plugins python
294+
iniset "$file" uwsgi plugins http,${UWSGI_PYTHON_PLUGIN}
269295
# uwsgi recommends this to prevent thundering herd on accept.
270296
iniset "$file" uwsgi thunder-lock true
271297
# Set hook to trigger graceful shutdown on SIGTERM
@@ -318,7 +344,7 @@ function write_local_uwsgi_http_config {
318344
iniset "$file" uwsgi die-on-term true
319345
iniset "$file" uwsgi exit-on-reload false
320346
iniset "$file" uwsgi enable-threads true
321-
iniset "$file" uwsgi plugins python
347+
iniset "$file" uwsgi plugins http,${UWSGI_PYTHON_PLUGIN}
322348
# uwsgi recommends this to prevent thundering herd on accept.
323349
iniset "$file" uwsgi thunder-lock true
324350
# Set hook to trigger graceful shutdown on SIGTERM

‎lib/cinder‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ function start_cinder {
492492
start_tls_proxy cinder '*' $CINDER_SERVICE_PORT $CINDER_SERVICE_HOST $CINDER_SERVICE_PORT_INT
493493
fi
494494
else
495-
run_process "c-api" "$CINDER_BIN_DIR/uwsgi --procname-prefix cinder-api --ini $CINDER_UWSGI_CONF"
495+
run_process "c-api" "$(which uwsgi) --procname-prefix cinder-api --ini $CINDER_UWSGI_CONF"
496496
cinder_url=$service_protocol://$SERVICE_HOST/volume/v3
497497
fi
498498
fi

‎lib/glance‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ function start_glance {
325325

326326
run_process g-reg "$GLANCE_BIN_DIR/glance-registry --config-file=$GLANCE_CONF_DIR/glance-registry.conf"
327327
if [[ "$WSGI_MODE" == "uwsgi" ]]; then
328-
run_process g-api "$GLANCE_BIN_DIR/uwsgi --procname-prefix glance-api --ini $GLANCE_UWSGI_CONF"
328+
run_process g-api "$(which uwsgi) --procname-prefix glance-api --ini $GLANCE_UWSGI_CONF"
329329
else
330330
run_process g-api "$GLANCE_BIN_DIR/glance-api --config-dir=$GLANCE_CONF_DIR"
331331
fi

‎lib/keystone‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ function start_keystone {
523523
enable_apache_site keystone
524524
restart_apache_server
525525
else # uwsgi
526-
run_process keystone "$KEYSTONE_BIN_DIR/uwsgi --procname-prefix keystone --ini $KEYSTONE_PUBLIC_UWSGI_CONF" ""
526+
run_process keystone "$(which uwsgi) --procname-prefix keystone --ini $KEYSTONE_PUBLIC_UWSGI_CONF" ""
527527
fi
528528

529529
echo "Waiting for keystone to start..."

‎lib/neutron‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ function start_neutron_api {
466466
done
467467

468468
if [ "$NEUTRON_DEPLOY_MOD_WSGI" == "True" ]; then
469-
run_process neutron-api "$NEUTRON_BIN_DIR/uwsgi --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
469+
run_process neutron-api "$(which uwsgi) --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
470470
neutron_url=$service_protocol://$NEUTRON_SERVICE_HOST/networking/
471471
enable_service neutron-rpc-server
472472
run_process neutron-rpc-server "$NEUTRON_BIN_DIR/neutron-rpc-server $opts"

‎lib/neutron-legacy‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ function start_neutron_service_and_check {
483483
# Start the Neutron service
484484
if [ "$NEUTRON_DEPLOY_MOD_WSGI" == "True" ]; then
485485
enable_service neutron-api
486-
run_process neutron-api "$NEUTRON_BIN_DIR/uwsgi --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
486+
run_process neutron-api "$(which uwsgi) --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
487487
neutron_url=$Q_PROTOCOL://$Q_HOST/networking/
488488
enable_service neutron-rpc-server
489489
run_process neutron-rpc-server "$NEUTRON_BIN_DIR/neutron-rpc-server $cfg_file_options"

‎lib/nova‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ function start_nova_api {
850850
start_tls_proxy nova '*' $NOVA_SERVICE_PORT $NOVA_SERVICE_HOST $NOVA_SERVICE_PORT_INT
851851
fi
852852
else
853-
run_process "n-api" "$NOVA_BIN_DIR/uwsgi --procname-prefix nova-api --ini $NOVA_UWSGI_CONF"
853+
run_process "n-api" "$(which uwsgi) --procname-prefix nova-api --ini $NOVA_UWSGI_CONF"
854854
nova_url=$service_protocol://$SERVICE_HOST/compute/v2.1/
855855
fi
856856

@@ -941,7 +941,7 @@ function start_nova_rest {
941941
if [ "$NOVA_USE_MOD_WSGI" == "False" ]; then
942942
run_process n-api-meta "$NOVA_BIN_DIR/nova-api-metadata --config-file $compute_cell_conf"
943943
else
944-
run_process n-api-meta "$NOVA_BIN_DIR/uwsgi --procname-prefix nova-api-meta --ini $NOVA_METADATA_UWSGI_CONF"
944+
run_process n-api-meta "$(which uwsgi) --procname-prefix nova-api-meta --ini $NOVA_METADATA_UWSGI_CONF"
945945
fi
946946

947947
export PATH=$old_path

‎lib/placement‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function install_placement {
144144
# start_placement_api() - Start the API processes ahead of other things
145145
function start_placement_api {
146146
if [[ "$WSGI_MODE" == "uwsgi" ]]; then
147-
run_process "placement-api" "$PLACEMENT_BIN_DIR/uwsgi --procname-prefix placement --ini $PLACEMENT_UWSGI_CONF"
147+
run_process "placement-api" "$(which uwsgi) --procname-prefix placement --ini $PLACEMENT_UWSGI_CONF"
148148
else
149149
enable_apache_site placement-api
150150
restart_apache_server

0 commit comments

Comments
 (0)