Comment 7 for bug 1992161

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/864765
Committed: https://opendev.org/openstack/neutron/commit/90865c06afe9780ac3116be9e527da9a75944c96
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 90865c06afe9780ac3116be9e527da9a75944c96
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Mon Nov 14 17:43:27 2022 +0000

    [stable-only] Do not fail making reservation when creating a SG

    Do not fail during the creation of a security group when trying to
    make a quota reservation for the security group rules. This feature
    was added in [1], in order to prevent the rule quota excess during
    the security group creation.

    However, as reported in LP#1992161, this method can be called from
    the RPC worker. If this RPC worker is spawned alone (not with the API
    workers), the extensions are not loaded and the security group rule
    quota resources are not created. That means the quota engine does not
    have the security group rules as managed resources (in this worker).

    When a new network (and the first subnet) is created, the DHCP agent
    (or agents) handling this network will try to create the DHCP port.
    If, as commented in the LP bug, the default security group is not
    created, the RPC worker will try to create it. In this case this
    patch skips the quota check.

    This patch is for stable releases only. Since Xena, this check is
    done using a new method called "quota_limit_check" [2]. This method
    does not fail in the related case.

    [1]https://review.opendev.org/q/I0a9b91b09d6260ff96fdba2f0a455de53bbc1f00
    [2]https://review.opendev.org/q/Id73368576a948f78a043d7cf0be16661a65626a9

    Conflicts:
          neutron/db/securitygroups_db.py

    Closes-Bug: #1992161
    Related-Bug: #1858680
    Change-Id: I0f20b17c1b13c3cf56de70588fca4a6956d276df
    (cherry picked from commit 02bdd0470246dd768227affa2d6a8dd8328d3463)