← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1542815] Re: rbac-list response will report wrong object_type

 

Reviewed:  https://review.openstack.org/279030
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=957c21113fc5848925c13a3128a23243ee99fa30
Submitter: Jenkins
Branch:    master

commit 957c21113fc5848925c13a3128a23243ee99fa30
Author: Kevin Benton <kevin@xxxxxxxxxx>
Date:   Thu Feb 11 01:47:07 2016 -0800

    Get rid of UnionModel for RBAC
    
    The union model approach was completely broken because it
    didn't keep track of which model each result actually was.
    
    This patch just strips it out and replaces get_rbac_policies
    with queries to each model. This will mean pagination is broken
    once multiple rbac types are in place, but everything else should
    work fine.
    
    Co-Authored-By: Haim Daniel <hdaniel@xxxxxxxxxx>
    
    Closes-Bug: #1542815
    Change-Id: I1e91aa22d093d50e5a9d318f24d09bb65e072246


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1542815

Title:
  rbac-list response will report  wrong object_type

Status in neutron:
  Fix Released

Bug description:
  This will happen when a new rbac table shall be introduced. The cause is the usage of the CommonDbMixin._union_model_query(). The current code flow joins  SQL SELECT results from several rbac tables (per rbac object type). However, the resulting sqlalchemy union list from several  tables contains the db_model type of the first table plus the output rows from all the other tables, causing the REST response of 'rbac-list' to contain the wrong object type. 
  E.g: rbac-list on the following db_schema:

  networkrbacs table: {id=ID1, target_tenant=ID2, object_id=ID3, ...}
  qospolicyrbacs table: empty

  will result in REST response:
  {"target_tenant": ID2, "object_type": "qos_policy", "object_id": ID3}

  The issue hasn't appeared yeat, since there's only a single rbac type
  (network) at the moment.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1542815/+subscriptions


References