CORS not enabled despite correct configuration

Bug #2051691 reported by Joshua Cornutt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Takashi Kajinami

Bug Description

I've submitted a patch here: https://review.opendev.org/c/openstack/manila/+/907012

Description
===========

The [cors] configuration section is completely ignored and CORS is left disabled.

Steps to reproduce
==================

* Set the [cors] section in the configuration file
* start the API service, and attempt to connect from an external frontend application

The config used is below and is what works on all other OpenStack services.

[cors]
allowed_origin = *

Expected result
===============

CORS is enabled and responds with the appropriate headers.

Actual result
=============

CORS is not enabled and external frontend applications fail to connect.

Environment
===========

kolla-ansible deployed 2023.2 and master.

Tags: cors
Changed in manila:
status: New → In Progress
Revision history for this message
Takashi Kajinami (kajinamit) wrote :

OK I thought this issue is very specific to standalone manila-api but in fact it also affects the wsgi app.

description: updated
description: updated
Revision history for this message
Takashi Kajinami (kajinamit) wrote (last edit ):

The problem is that set_lib_defaults is not called. this means that even the default policy file override is not applied...

EDIT: Ignore this. Seems we have a different set_override which is taking effect.

Vida Haririan (vhariria)
Changed in manila:
status: In Progress → New
Changed in manila:
milestone: none → caracal-3
assignee: nobody → Takashi Kajinami (kajinamit)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.opendev.org/c/openstack/manila/+/907012
Committed: https://opendev.org/openstack/manila/commit/5d48410d0ab72c5eba80c4034f19f3ae20a76de3
Submitter: "Zuul (22348)"
Branch: master

commit 5d48410d0ab72c5eba80c4034f19f3ae20a76de3
Author: Joshua Cornutt <email address hidden>
Date: Sun Jan 28 17:12:44 2024 +0100

    Fixing skipped default override for CORS options

    Some of the cores middleware options should have overridden default
    values but the override method was not actually called so the library
    defaults are still used.

    Closes-Bug: #2051691
    Change-Id: I8dac03c787bf729c60c2e0ecc9c03b7ba9a5b5a5

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/2023.2)

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/manila/+/907271

Revision history for this message
Vida Haririan (vhariria) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 18.0.0.0rc1

This issue was fixed in the openstack/manila 18.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/manila/+/907271
Committed: https://opendev.org/openstack/manila/commit/2a72a003542e60d5d1b1c590fa461b948b95ed05
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 2a72a003542e60d5d1b1c590fa461b948b95ed05
Author: Joshua Cornutt <email address hidden>
Date: Sun Jan 28 17:12:44 2024 +0100

    Fixing skipped default override for CORS options

    Some of the cores middleware options should have overridden default
    values but the override method was not actually called so the library
    defaults are still used.

    Closes-Bug: #2051691
    Change-Id: I8dac03c787bf729c60c2e0ecc9c03b7ba9a5b5a5
    (cherry picked from commit 5d48410d0ab72c5eba80c4034f19f3ae20a76de3)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.