Bug 1920318
Summary: | Network creation fails when enable_security_group = False with error "Unknown quota resources ['security_group_rule' | |||
---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Sadique Puthen <sputhenp> | |
Component: | openstack-neutron | Assignee: | Slawek Kaplonski <skaplons> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Alex Katz <akatz> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 16.1 (Train) | CC: | akatz, apevec, chrisw, dcha, lhh, majopela, ralonsoh, scohen, skaplons | |
Target Milestone: | --- | Keywords: | TestOnly, Triaged | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | openstack-neutron-15.2.1-1.20201114025048.el8ost | Doc Type: | No Doc Update | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1926145 (view as bug list) | Environment: | ||
Last Closed: | 2021-07-12 10:32:36 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1926145 |
Description
Sadique Puthen
2021-01-26 03:32:12 UTC
Hi, Sadique. Thanks for creating a report on behalf of me. For the workaround that I provided above, it is not exactly a kind of a workaround as in solution because the default security group is bound its project(tenant). So whenever there is new project created, the same issue will happen, and switching on/off the flag by restarting service to fill the database would not be practical way of workaround. If you have OSP deployed already, you can reproduce the issue by this step - create a new project - make sure there is no default security group rule - disable the port security on ml2 ini file (enable_security_group = False) - create a network (tenant network is fine for this testing) - error -> RESP BODY: {"NeutronError": {"type": "QuotaResourceUnknown", "message": "Unknown quota resources ['security_group_rule'].", "detail": ""}} Thx for the bug report. I was able to reproduce it with ML2/OVN backend. There is no such issue when e.g. OVS is used. Small correction: the same issue is for ml2/ovs also Hi Slawek. Yes, this issue is effective for both ovs and ovn as far as I can see on the Neutron server logic. I just had a quick view on the middleware logic of Neutron, hope the note below can be helpful. So the train version Neutron is relying on its own custom callback library, neutron_lib.callbacks When the neutron pecan app is instantiated, list of hooks will be included to its makeapp call. pecan_wsgi/app.py hooks.UserFilterHook(), # priority 90 hooks.ContextHook(), # priority 95 hooks.ExceptionTranslationHook(), # priority 100 hooks.BodyValidationHook(), # priority 120 hooks.OwnershipValidationHook(), # priority 125 hooks.QuotaEnforcementHook(), # priority 130 hooks.NotifierHook(), # priority 135 hooks.QueryParametersHook(), # priority 139 hooks.PolicyHook(), # priority 140 and the NotifierHook above has registry.publish on one of its function "def after", where the message for callback is registered by neutron_lib.callbacks's method, registry.publish. So whenever there is api request on the resource of network(create) or port(create, update), the handler function will be called in the background as callback, by registry.receives, and that is when is why function ensure_default_security_group_handler is called every time on the creation of the network. Currently enable_security_group is only used by neutron agent on its rpc call, IMO, probably we can load this config on neutron server side, and add one more flag to the handler to skip default sg creation. According to our records, this should be resolved by openstack-neutron-15.2.1-1.20210409073445.40d217c.el8ost. This build is available now. |