Multiple SQL backend check fails

Bug #1410850 reported by Bogun Dmitriy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Henry Nash

Bug Description

In multi domain setup keystone support only one SQL backend. Method that check how many SQL backends are requested contain error. It's result depends from domain's config load order. It will not detect multiple SQL backends if domain's config loaded in order like this: SQL -> not SQL -> SQL

Splitting this bug into two...this one will be the actual issue reported...that the logic in assert_one_sql_driver is wrong. The second bug will be related to a re-refactor of the whole way the lazy loading is done (see: #1438827) and cover the following:

And there is more potential issues with this limit on number of SQL backends.
First - if someone will call .setup_domain_drivers(...) multiple times(perhaps we should add self.crear() in this method or raise exception on second call of this method).
Second - .reload_domain_driver don't take in a count ._any_sql attribute. So if domain config will change backend type and it become SQL or become not SQL... we will have a problems.

Changed in keystone:
assignee: nobody → Bogun Dmitriy (dbogun)
status: New → In Progress
Revision history for this message
Dolph Mathews (dolph) wrote :

Why do you need multiple SQL backends?

Changed in keystone:
status: In Progress → Incomplete
Changed in keystone:
status: Incomplete → In Progress
Revision history for this message
David Stanek (dstanek) wrote :

The patch submitted for this bug only addresses the bug in how we check for multiple SQL backends. Do you plan on submitting patches to fix the other issues? I think the other issues are a design flaw in how the DomainConfigs object is designed. There are cleaner ways to make sure that the lazy setup is only done once. I'd be happy to take a crack at this if you don't have the time.

https://review.openstack.org/#/c/138113/

Changed in keystone:
importance: Undecided → Medium
Revision history for this message
Bogun Dmitriy (dbogun) wrote :

You can grab it, if you want. I have found a problem, and just want to highlight it. But, it look like there is no one who interested in it.

Henry Nash (henry-nash)
Changed in keystone:
assignee: Bogun Dmitriy (dbogun) → Henry Nash (henry-nash)
milestone: none → kilo-rc1
description: updated
Changed in keystone:
importance: Medium → High
Henry Nash (henry-nash)
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/138113
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=fdc150fe98be693bdc7a61b87efc492ccc693210
Submitter: Jenkins
Branch: master

commit fdc150fe98be693bdc7a61b87efc492ccc693210
Author: Dmitriy Bogun <email address hidden>
Date: Mon Dec 1 17:12:19 2014 +0200

    Expose multiple SQL backend usage validation error

    File-based domain-specific configuration supports only one SQL backend.
    The method that checked how many SQL backends are enabled was not correct,
    and depending on the order of domains examined, may give the wrong
    result. A follow-on patch will fix this error.

    Co-Authored-By: Henry Nash <email address hidden>

    Partial-Bug: #1410850
    Change-Id: Idfc03ba5314acc7ebc8ed99f078b6a08130cc1dd

Changed in keystone:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/170022
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=102f5058515460b1c8331f78a9845722c75e6e3c
Submitter: Jenkins
Branch: master

commit 102f5058515460b1c8331f78a9845722c75e6e3c
Author: Henry Nash <email address hidden>
Date: Thu Apr 2 07:54:29 2015 +0100

    Fix multiple SQL backend usage validation error

    This patch fixes an error in the file-based domain-specific
    configuration support where the method to spot multiple SQL
    drivers would fail to remember previous instances of this. The
    fix is simply to OR the previous cumulative memory of SQL drivers
    with the state of the one being requested.

    Change-Id: I87314a5806a5652695ef17f74f70165b8e3347c2
    Closes-Bug: #1410850

Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: kilo-rc1 → 2015.1.0
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.