Bug 1988793 - Security group log entry remains in the database after its security group is deleted
Summary: Security group log entry remains in the database after its security group is ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 17.0 (Wallaby)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Slawek Kaplonski
QA Contact: ayenachew molla
URL:
Whiteboard:
Depends On:
Blocks: 1619266 2029310
TreeView+ depends on / blocked
 
Reported: 2021-08-01 06:55 UTC by Alex Katz
Modified: 2022-09-21 12:16 UTC (History)
10 users (show)

Fixed In Version: openstack-neutron-18.1.2-0.20211115161911.01a3f8d.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2029310 (view as bug list)
Environment:
Last Closed: 2022-09-21 12:16:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1939558 0 None None None 2021-08-11 11:24:52 UTC
OpenStack gerrit 804237 0 None None None 2021-08-11 13:29:39 UTC
OpenStack gerrit 804238 0 None None None 2021-08-11 13:29:39 UTC
Red Hat Issue Tracker OSP-6688 0 None None None 2021-11-15 13:03:14 UTC
Red Hat Product Errata RHEA-2022:6543 0 None None None 2022-09-21 12:16:56 UTC

Description Alex Katz 2021-08-01 06:55:18 UTC
Description of problem:
After the security group is deleted its corresponding log entry is still presented in the database.


Version-Release number of selected component (if applicable):


How reproducible:
Reproduced in ml2/OVS and ml2/OVN setups


Steps to Reproduce:
# openstack security group create sg_1
# openstack network log create --resource-type security_group --resource sg_1 --event ALL test_log
# openstack security group delete sg_1
# openstack network log show test_log

Actual results:
there is sill entry for `test_log`

Expected results:
security group deletion should fail with the clear error message or the cascade deletion should happen


Additional info:

Comment 6 ayenachew molla 2022-05-10 07:49:03 UTC
verified version - RHOS-17.0-RHEL-9-20220414.n.1

There is an example of all the command output:

(overcloud) [stack@undercloud-0 ~]$ openstack security group create sg_1
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field           | Value                                                                                                                                                                           |
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| created_at      | 2022-05-10T07:25:51Z                                                                                                                                                            |
| description     | sg_1                                                                                                                                                                            |
| id              | 845ad072-2752-4a9a-9819-4d6c3127d3e8                                                                                                                                            |
| name            | sg_1                                                                                                                                                                            |
| project_id      | f8a8b202c8ec47ff96cb84ad090642d2                                                                                                                                                |
| revision_number | 1                                                                                                                                                                               |
| rules           | created_at='2022-05-10T07:25:51Z', direction='egress', ethertype='IPv4', id='686e2822-5cd0-45d9-89ff-972f2cac95d1', standard_attr_id='21668', updated_at='2022-05-10T07:25:51Z' |
|                 | created_at='2022-05-10T07:25:51Z', direction='egress', ethertype='IPv6', id='b913d2c3-052e-436d-8765-8980bfc8f0c3', standard_attr_id='21671', updated_at='2022-05-10T07:25:51Z' |
| stateful        | None                                                                                                                                                                            |
| tags            | []                                                                                                                                                                              |
| updated_at      | 2022-05-10T07:25:51Z                                                                                                                                                            |
+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ openstack network log create --resource-type security_group --resource sg_1 --event ALL test_log
+-----------------+--------------------------------------+
| Field           | Value                                |
+-----------------+--------------------------------------+
| Description     |                                      |
| Enabled         | True                                 |
| Event           | ALL                                  |
| ID              | 6234ed42-9a20-4926-8e71-978282d7bebc |
| Name            | test_log                             |
| Project         | f8a8b202c8ec47ff96cb84ad090642d2     |
| Resource        | 845ad072-2752-4a9a-9819-4d6c3127d3e8 |
| Target          | None                                 |
| Type            | security_group                       |
| created_at      | 2022-05-10T07:26:08Z                 |
| revision_number | 0                                    |
| tenant_id       | f8a8b202c8ec47ff96cb84ad090642d2     |
| updated_at      | 2022-05-10T07:26:08Z                 |
+-----------------+--------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ openstack network log list
+--------------------------------------+---------+----------+----------------+---------------------------------------------------------------+
| ID                                   | Enabled | Name     | Type           | Summary                                                       |
+--------------------------------------+---------+----------+----------------+---------------------------------------------------------------+
| 6234ed42-9a20-4926-8e71-978282d7bebc | True    | test_log | security_group | Event: ALL,                                                   |
|                                      |         |          |                | Logged: (security_group) 845ad072-2752-4a9a-9819-4d6c3127d3e8 |
+--------------------------------------+---------+----------+----------------+---------------------------------------------------------------+

(overcloud) [stack@undercloud-0 ~]$ openstack security group delete sg_1

(overcloud) [stack@undercloud-0 ~]$ openstack network log list

(overcloud) [stack@undercloud-0 ~]$ openstack network log show test_log
Unable to find log with name or id 'test_log'

Comment 10 errata-xmlrpc 2022-09-21 12:16:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:6543


Note You need to log in before you can comment on or make changes to this bug.