Refactor use of oslo.db.sqlalchemy.session.EngineFacade because it's deprecated

Bug #1490571 reported by Vivek Dhayaal
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Morgan Fainberg

Bug Description

OsloDBDeprecationWarning shows up in many gerrit patches' gate-keystone-python27 console logs.
<snip>
...
2015-08-31 11:12:43.194 | {2} keystone.tests.unit.backend.domain_config.test_sql.SqlDomainConfigModels.test_whitelisted_model [0.467583s] ... ok
2015-08-31 11:12:43.194 |
2015-08-31 11:12:43.194 | Captured stderr:
2015-08-31 11:12:43.194 | ~~~~~~~~~~~~~~~~
2015-08-31 11:12:43.194 | /home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:1015: OsloDBDeprecationWarning: EngineFacade is deprecated; please use oslo.db.sqlalchemy.enginefacade
2015-08-31 11:12:43.195 | expire_on_commit=expire_on_commit, _conf=conf)
2015-08-31 11:12:43.195 |
2015-08-31 11:12:43.195 | {2} keystone.tests.unit.backend.role.test_ldap.LdapIdentitySqlEverythingElseRole.test_list_roles [0.319631s] ... ok
...
</snip>

Few instances:
https://review.openstack.org/#/c/217340/
http://logs.openstack.org/40/217340/2/check/gate-keystone-python27/4cfcaaf/console.html

https://review.openstack.org/#/c/210456/
http://logs.openstack.org/56/210456/6/check/gate-keystone-python27/da1ad9f/console.html

https://review.openstack.org/#/c/209524/
http://logs.openstack.org/24/209524/13/check/gate-keystone-python27/8a97dbd/console.html

Tags: sql
Changed in keystone:
assignee: nobody → Tom Cocozzello (tjcocozz)
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/218983

Changed in keystone:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by Tom Cocozzello (<email address hidden>) on branch: master
Review: https://review.openstack.org/218983

Revision history for this message
Tom Cocozzello (tjcocozz-deactivatedaccount) wrote : Re: OsloDBDeprecationWarning in many patches' gate-keystone-python27 console logs

It looks like I bit off more than I could chew with this bug. What is happening is that oslo is making the use of the SQLAlchemy Engine more standardized.

Here is a link that goes more in depth about the change:
http://specs.openstack.org/openstack/oslo-specs/specs/kilo/make-enginefacade-a-facade.html

Here is a review from Ironic that is similar to what I think we need to do to make this change:
https://review.openstack.org/#/c/191801/

Changed in keystone:
assignee: Tom Cocozzello (tjcocozz) → nobody
status: In Progress → New
Changed in keystone:
status: New → Triaged
importance: Undecided → Medium
summary: - OsloDBDeprecationWarning in many patches' gate-keystone-python27 console
- logs
+ Remove use of oslo.db.sqlalchemy.session.EngineFacade because it's
+ deprecated
summary: - Remove use of oslo.db.sqlalchemy.session.EngineFacade because it's
+ Refactor use of oslo.db.sqlalchemy.session.EngineFacade because it's
deprecated
Grzegorz Grasza (xek)
Changed in keystone:
assignee: nobody → Grzegorz Grasza (xek)
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/257458

Changed in keystone:
status: Triaged → In Progress
Changed in keystone:
milestone: none → mitaka-3
Changed in keystone:
assignee: Grzegorz Grasza (xek) → Steve Martinelli (stevemar)
Changed in keystone:
assignee: Steve Martinelli (stevemar) → nobody
Revision history for this message
Steve Martinelli (stevemar) wrote :

confirmed with dims that this will not be removed in the M release, but we should prioritize this for N, setting priority to High.

Changed in keystone:
milestone: mitaka-3 → none
importance: Medium → High
status: In Progress → Triaged
tags: added: sql
Changed in keystone:
assignee: nobody → Morgan Fainberg (mdrnstm)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

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

commit 0e156737d0e5aabb86c0fdb326dc9c95d52b3e32
Author: Grzegorz Grasza <email address hidden>
Date: Mon Dec 14 17:07:46 2015 +0100

    Use the new enginefacade from oslo.db

    EngineFacade is deprecated. This partially switches keystone to
    use oslo.db.sqlalchemy.enginefacade. 'get_session' and 'get_engine'
    methods are still used in sql migrations and related tests.

    Change-Id: I221232d50821fe2adb9881f237f06714003ce79d
    Partial-Bug: #1490571

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/284516

Changed in keystone:
milestone: none → mitaka-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

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

commit 8f432e9b4492ff474c16fbcd48b33e8f5aa0e661
Author: Morgan Fainberg <email address hidden>
Date: Wed Feb 24 19:29:20 2016 -0800

    No more legacy engine facade in tests

    Do not use the legacy engine facade from oslo_db even in testing.

    Change-Id: I70d0724679a5fd5cd3ace54e4ae44957c2277daf
    Closes-Bug: #1490571

Changed in keystone:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to keystone (master)

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

commit e959badd7157fcc94abfa757e636b5f97ffaad09
Author: Morgan Fainberg <email address hidden>
Date: Wed Feb 24 19:48:25 2016 -0800

    Remove get_session and get_engine

    Remove the get_session and get_engine methods. These are not
    supported anymore as the get_session_for_read() and
    get_session_for_write() are now in place. This also prevents the use
    of the LegacyEngineFacade.

    Change-Id: Ie9eb824d07e641b713346a03a0aa15d8ab16c338
    Related-Bug: #1490571

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/keystone 9.0.0.0b3

This issue was fixed in the openstack/keystone 9.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.