sec_group rule quota usage unreliable

Bug #1499339 reported by Salvatore Orlando
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Salvatore Orlando

Bug Description

Security group rules are now being deleted with query.delete
while efficient, this prevents sqlalchemy events from being fired (see http://docs.openstack.org/developer/neutron/devref/quota.html#exceptions-and-caveats)

It might be worth to have this fixed before releasing RC-1; even if impact of this bug is not really serious.
After a delete the quota tracker is not marked as dirty, and therefore it reports an incorrect, but higher usage data.
As a result a tenant might not be allowed to use all of its quota (but just total - 1). This will however be fixed by the next get operation.

Changed in neutron:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/227281

Changed in neutron:
status: New → In Progress
Kyle Mestery (mestery)
tags: added: liberty-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/227320

Kyle Mestery (mestery)
tags: added: liberty-rc-potential
removed: liberty-backport-potential
Changed in neutron:
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/227281
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=851b1b4bbbaa965f190bfacab03fd6ece80ad0ec
Submitter: Jenkins
Branch: master

commit 851b1b4bbbaa965f190bfacab03fd6ece80ad0ec
Author: Salvatore Orlando <email address hidden>
Date: Thu Sep 24 05:45:40 2015 -0700

    Fix quota usage tracker for security group rules

    This simple patch ensures usage for security group rules is
    marked as dirty when a security group rule is deleted.
    To this aim, the security group rule is deleted using ORM
    in order to ensure the sqlalchemy even if fired.

    Closes-Bug: #1499339

    Change-Id: I1e81fe03fed14ec438cea5d7675f66caeb91afd8

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

Reviewed: https://review.openstack.org/227320
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0782a0b38172d37267b9400246b2d5b54c3cf67c
Submitter: Jenkins
Branch: stable/liberty

commit 0782a0b38172d37267b9400246b2d5b54c3cf67c
Author: Salvatore Orlando <email address hidden>
Date: Thu Sep 24 05:45:40 2015 -0700

    Fix quota usage tracker for security group rules

    This simple patch ensures usage for security group rules is
    marked as dirty when a security group rule is deleted.
    To this aim, the security group rule is deleted using ORM
    in order to ensure the sqlalchemy even if fired.

    Closes-Bug: #1499339

    Change-Id: I1e81fe03fed14ec438cea5d7675f66caeb91afd8
    (cherry picked from commit 851b1b4bbbaa965f190bfacab03fd6ece80ad0ec)

tags: added: in-stable-liberty
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
tags: removed: liberty-rc-potential
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-rc1 → 7.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/235300

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)
Download full text (16.6 KiB)

Reviewed: https://review.openstack.org/235300
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=140ccc36d172bead2605968b3d61b36cca8a0040
Submitter: Jenkins
Branch: master

commit 6dcfe3a9362ae5fcf18e5cfb59663e43446cd59c
Author: Kevin Benton <email address hidden>
Date: Tue Oct 6 19:28:47 2015 -0700

    Mock oslo policy HTTPCheck instead of urllib

    We were mocking internal behavior of oslo policy by
    patching urllib. This will break with the upcoming oslo
    release that switches to requests.

    This patch changes the mock to the HTTPCheck level and we
    can leave implementation details testing up to oslo_policy.

    Change-Id: I07957f01307e25f1547197c720eea6e3e7f0ef5a
    Closes-Bug: #1503890
    (cherry picked from commit a0f1d9d6de1560be91d3001c8ac9f880a7a5a7e0)

    Add testresources used by oslo.db fixture

    If we use oslo.db fixtures, we'll need the package or
    the next version of oslo.db release will break us.

    Closes-Bug: #1503501
    Change-Id: I7dfbf240333095d91a414ba15a439bdc4804eb25
    (cherry picked from commit 86ad967e40c2c6752ec0fb46cfd3098ede0c7178)

    Fix functional test_server tests

    Now oslo.service 0.10.0 no longer sends SIGHUP to parent and
    children services.

    This was a chance introduced by 286a6ea, and since it invalidated
    the very logic under test, this must be revised.

    (cherry picked from commit 090fe713592c2b6398d999bfa03b80cbb2054609)

    Change-Id: I18a11283925369bc918002477774f196010a1bc3
    Closes-bug: #1505438
    (cherry picked from commit 090fe713592c2b6398d999bfa03b80cbb2054609)

    Make test_server work with older versions of oslo.service

    Change I18a11283925369bc918002477774f196010a1bc3 fixed the test for
    oslo.service >= 0.10.0, but it also broke it for older versions of
    oslo.service. Since the library has minimal version of >= 0.7.0 in
    requirements.txt, test should pass for those versions too.

    Now, instead of validating that either reset() or restart() of workers
    are triggered on SIGHUP, just validate that .start() is triggered the
    expected number of times (either way, no matter how oslo.service decide
    to clean up the children, they exit and then are respawned).

    Change-Id: I41f9d3af780b3178b075bc1e7084f417a2bd1378
    Closes-Bug: #1505645
    (cherry picked from commit 7bb40921660cf29beb68e338e205499efd6ffa36)

    Fixed multiple py34 gate issues

    1. Scope mock of 'open' to module

    By mocking 'open' at the module level, we can avoid affecting
    'open' calls from other modules.

    2. Stop using LOG.exception in contexts with no sys.exc_info set

    Python 3.4 logger fills in record.exc_info with sys.exc_info() result
    [1], and then it uses it to determine the current exception [2] to
    append to the log message. Since there is no exception, exc_info[1] is
    None, and we get AttributeError inside traceback module.

    It's actually a bug in Python interpreter that it attempt to access the
    attribute when there is no exception. It turns out that it's fixed in
    latest master of cPython [3] (...

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b1

This issue was fixed in the openstack/neutron 8.0.0.0b1 development milestone.

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.