StarlingX NFVI Orchestration
Go to file
Alex Figueiredo 381ada9b07 Enable nova proxy conf without keystone middleware
The keystone midleware is the one responsible for adding the headers
HTTP_X_USER and HTTP_X_TENANT to the "environ" dict while handling
requests in the nova-api-proxy [1]. Currently, some log statements
inside the APIController class of the nova-api-proxy is accessing the
"environ" dict keys directly, without using environ.get(key, val).
Because of this, a KeyError exception is launched and nova requests fail
when the nova-api-proxy pipeline is configured without using the
keystone middleware.

Since Nova requests will be authenticated at the final nova endpoints,
the usage of keystone middleware in the request handling pipeline of
nova-api-proxy should not be mandatory. Actually, the user is already
allowed to setup the pipeline without keystone middleware by applying a
custom user override to the nova-api-proxy chart at
"conf.paste.pipeline:nova-api-proxy.pipeline". Although this scenario
wasn't being explored so far, it's now required by [2] to fix an issue
related to intermittent failures on Nova actions.

To enable the setup of nova-api-proxy paste pipeline without the
keystone middleware, the access to HTTP_X_USER and HTTP_X_TENANT keys
of the "environ" dict was changed to use environ.get(key, val) with
"val=UNDEFINED".

Since Nova requests will be authenticated at the final nova endpoints,
the usage of keystone middleware in the request handling pipeline of
nova-api-proxy should not be mandatory.

[1] https://docs.openstack.org/keystonemiddleware/latest/api/keystonemiddleware.auth_token.html
[2] https://review.opendev.org/c/starlingx/openstack-armada-app/+/932607

Test Plan:

nova-api-proxy setup using the keystone middleware:
- PASS: Build and upload nova-api-proxy image to a duplex system
- PASS: Override the openstack app to use the custom image and apply it
- PASS: Use openstack CLI to perform instance actions (suspend/resume)

nova-api-proxy setup without the keystone middleware:
- PASS: Override the nova-api-proxy chart to remove keystone middleware
- PASS: Re-apply the app and send instance actions (suspend/resume)

Related-Bug: #2083934
Related-Bug: #2083608

Change-Id: Iec3b92fc5fd85b594b6c3eac3fd97b045e7c8e0c
Signed-off-by: Alex Figueiredo <alex.fernandesfigueiredo@windriver.com>
Co-authored-by: José Pires <joseclaudio.paespires@windriver.com>
Co-authored-by: Romulo Leite <romulo.leite@windriver.com>
2024-10-18 09:30:44 -03:00
api-ref/source sw-patch strategy orchestration removal. 2024-07-19 15:29:35 +00:00
devstack Followup opendev cleanup and test jobs 2019-04-21 14:21:35 -05:00
doc Fix tox-docs failing sphinx 2022-06-03 15:20:56 -03:00
mtce-guest Remove CentOS/OpenSUSE build support 2024-04-26 14:15:40 -04:00
nfv Patch rollback enabled and sw-deploy delete made not host specific 2024-10-15 18:06:15 +00:00
nova-api-proxy Enable nova proxy conf without keystone middleware 2024-10-18 09:30:44 -03:00
releasenotes Switch to newer openstackdocstheme and reno versions 2020-06-04 14:34:31 +02:00
.gitignore [Doc] OpenStack API Reference Guide 2018-09-25 14:01:33 -07:00
.gitreview OpenDev Migration Patch 2019-04-19 19:52:26 +00:00
.yamllint Cleanup tox.ini and zuul files from older releases 2023-01-19 15:42:06 +00:00
.zuul.yaml Zuul: Change nova-api-proxy-tox-pep8 nodeset 2024-08-22 14:50:46 +00:00
CONTRIBUTORS.wrs StarlingX open source release updates 2018-05-31 07:36:51 -07:00
debian_build_layer.cfg Add debian_build_layer.cfg file 2021-10-05 14:10:32 -04:00
debian_iso_image.inc Deactivate guest related services 2023-01-10 17:26:09 -03:00
debian_pkg_dirs Deactivate guest related services 2023-01-10 17:26:09 -03:00
debian_stable_docker_images.inc Port stx-nova-api-proxy image to stx-debian 2023-01-26 07:39:17 -03:00
debian_stable_wheels.inc Port stx-nova-api-proxy image to stx-debian 2023-01-26 07:39:17 -03:00
LICENSE StarlingX open source release updates 2018-05-31 07:36:51 -07:00
README.rst Followup opendev cleanup and test jobs 2019-04-21 14:21:35 -05:00
requirements.txt Adding py27 for nfv 2018-07-10 10:18:28 -05:00
test-requirements.txt Not require recreate of tox env when running tox 2021-04-06 09:48:36 -05:00
tox.ini Convert yaml.load to yaml.safe_load 2023-01-19 19:57:23 +00:00

nfv

StarlingX NFVI Orchestration