When a new security group rule is created, logging is not properly configured
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| neutron |
Fix Released
|
Medium
|
Kyuyeong Lee | ||
Bug Description
OpenStack Version: 2024.1 (with OVN)
How to reproduce:
1. Create new security group in Project A
$ openstack security group create sg-test-01 --project project-a
2. Configure logging for that security group.
$ openstack network log create log-test-01 --event ALL --resource-type security_group --resource sg-test-01 --project project-a
3. Create a security group rule using a context where the project is set to Project A
$ openstack security group rule create sg-test-01 --ingress --protocol tcp --remote-ip 1.1.1.1/32 --dst-port 1111 --project project-a
4. Create a security group rule using a context where the project is set to Project B
$ openstack security group rule create sg-test-01 --ingress --protocol tcp --remote-ip 2.2.2.2/32 --dst-port 2222 --project project-a
5. Check the acl table in OVN NB DB.
$ ovn-nbctl list acl
Defaulted container "ovsdb" out of: ovsdb, init (init)
_uuid : f574dfbe-
action : allow-related
direction : to-lport
external_ids : {"neutron:
label : 867022203
log : true
match : "outport == @pg_0a6255a5_
meter : acl_log_meter
name : neutron-
options : {log-related=
priority : 1002
severity : info
_uuid : 3918f28c-
action : allow-related
direction : to-lport
external_ids : {"neutron:
label : 0
log : false
match : "outport == @pg_0a6255a5_
meter : []
name : []
options : {}
priority : 1002
severity : []
--
Expected :
In step 5, both ACLs created in steps 3 and 4 should have logging enabled.
Actual :
Only the ACL created in step 3 has logging enabled.
The ACL from step 4 does not have logging configured.
It appears that the issue is caused by a project ID filter applied during the logging update process when a new security group rule is created.
| Changed in neutron: | |
| assignee: | nobody → Kyuyeong Lee (kyu0) |
| description: | updated |
| Changed in neutron: | |
| importance: | Undecided → Medium |

Fix proposed to branch: master /review. opendev. org/c/openstack /neutron/ +/947324
Review: https:/