[Secure RBAC] Cleaning shared networks fails with new RBAC policies

Bug #2004016 reported by Slawek Kaplonski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Slawek Kaplonski

Bug Description

Failed test: tearDownClass (neutron_tempest_plugin.api.admin.test_shared_network_extension.RBACSharedNetworksTest)

Error:

ft7.1: tearDownClass (neutron_tempest_plugin.api.admin.test_shared_network_extension.RBACSharedNetworksTest)testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/opt/stack/tempest/tempest/test.py", line 220, in tearDownClass
    raise value.with_traceback(trace)
  File "/opt/stack/tempest/tempest/test.py", line 192, in tearDownClass
    teardown()
  File "/opt/stack/tempest/.tox/tempest/lib/python3.8/site-packages/neutron_tempest_plugin/api/base.py", line 228, in resource_cleanup
    cls._try_delete_resource(cls.delete_network, network)
  File "/opt/stack/tempest/.tox/tempest/lib/python3.8/site-packages/neutron_tempest_plugin/api/base.py", line 310, in _try_delete_resource
    delete_callable(*args, **kwargs)
  File "/opt/stack/tempest/.tox/tempest/lib/python3.8/site-packages/neutron_tempest_plugin/api/base.py", line 403, in delete_network
    client.delete_network(network['id'])
  File "/opt/stack/tempest/.tox/tempest/lib/python3.8/site-packages/neutron_tempest_plugin/services/network/json/network_client.py", line 112, in _delete
    resp, body = self.delete(uri)
  File "/opt/stack/tempest/tempest/lib/common/rest_client.py", line 330, in delete
    return self.request('DELETE', url, extra_headers, headers, body)
  File "/opt/stack/tempest/tempest/lib/common/rest_client.py", line 720, in request
    self._error_checker(resp, resp_body)
  File "/opt/stack/tempest/tempest/lib/common/rest_client.py", line 841, in _error_checker
    raise exceptions.Conflict(resp_body, resp=resp)
tempest.lib.exceptions.Conflict: Conflict with state of target resource
Details: {'type': 'NetworkInUse', 'message': 'Unable to complete operation on network fa38e116-dfce-49a1-9e68-5575db2ac936. There are one or more ports still in use on the network, id for these ports is: f88933d0-9a03-447f-a1b4-d0cf6715d128.', 'detail': ''}

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
Slawek Kaplonski (slaweq) wrote :
Changed in neutron:
assignee: nobody → Slawek Kaplonski (slaweq)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/872280
Committed: https://opendev.org/openstack/neutron/commit/17be2505d145d404967b30d9794b9d027b83ac6b
Submitter: "Zuul (22348)"
Branch: master

commit 17be2505d145d404967b30d9794b9d027b83ac6b
Author: Slawek Kaplonski <email address hidden>
Date: Tue Jan 31 15:14:50 2023 +0100

    [Secure RBAC] Allow network owner to delete ports plugged to the network

    Network owner should be able to delete ports plugged to the owner's
    network, even if port belongs to some other project.

    Closes-Bug: #2004012
    Closes-Bug: #2004016
    Change-Id: I6d5418762b48ff382ca95b1a445a6edc7d72b424

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

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/neutron/+/875607

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/875607
Committed: https://opendev.org/openstack/neutron/commit/f2ba02d90da6b00e2213f66fb2f0b19ed2ea30af
Submitter: "Zuul (22348)"
Branch: stable/zed

commit f2ba02d90da6b00e2213f66fb2f0b19ed2ea30af
Author: Slawek Kaplonski <email address hidden>
Date: Tue Jan 31 15:14:50 2023 +0100

    [Secure RBAC] Allow network owner to delete ports plugged to the network

    Network owner should be able to delete ports plugged to the owner's
    network, even if port belongs to some other project.

    Closes-Bug: #2004012
    Closes-Bug: #2004016
    Change-Id: I6d5418762b48ff382ca95b1a445a6edc7d72b424
    (cherry picked from commit 17be2505d145d404967b30d9794b9d027b83ac6b)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 22.0.0.0rc1

This issue was fixed in the openstack/neutron 22.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 21.1.0

This issue was fixed in the openstack/neutron 21.1.0 release.

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.