Use one wsgi app for service but one dbengine per worker

Bug #1089916 reported by Therese McHale
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Therese McHale
Grizzly
Fix Released
Medium
Therese McHale

Bug Description

In Bug 1036193 multiple workers were broken (both api and registry) . This was because glance was using 1 dbengine per worker process and this was causing garbled database sessions. The fix which was implemented in late folsom changed from using 1 wsgi app for each service to using one wsgi app per worker process (and therefore we got 1 dbengine per worker). With one wsgi app per worker this causes the environment to be printed for each worker. An alternative approach is go back to one wsgi app but change to using a separate dbengine for each worker by creating the engine later. (This is what nova does also.) Including a patch for this.

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

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

Changed in glance:
assignee: nobody → Therese McHale (therese-mchale)
status: New → In Progress
Revision history for this message
Therese McHale (therese-mchale) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/18037
Committed: http://github.com/openstack/glance/commit/0e9111ca59ee5e487f23f5db91c6f8c33036410b
Submitter: Jenkins
Branch: master

commit 0e9111ca59ee5e487f23f5db91c6f8c33036410b
Author: Therese McHale <email address hidden>
Date: Thu Dec 13 13:34:19 2012 +0000

    Use one wsgi app, one dbengine worker.

    Return to using one wsgi application but use one database engine
    per worker process.

    Fixes Bug #1089916

    Change-Id: Iea4b1b925208317c3c6ee3c9461b6723f3168405

Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
Daniel Berrange (berrange) wrote :

This fix causes 'glance image-create' to hang on Fedora 17, both in devstack & when run manually. Only way to recover is to restart both glance-api & glance-registry services which appear hung. Reverting this change makes it work again for me

Thierry Carrez (ttx)
Changed in glance:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Changed in glance:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

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

Reviewed: https://review.openstack.org/25192
Committed: http://github.com/openstack/glance/commit/ba7c059c9e0971ff7be6dd2f2fc3861140ae8011
Submitter: Jenkins
Branch: master

commit ba7c059c9e0971ff7be6dd2f2fc3861140ae8011
Author: Mark J. Washenberger <email address hidden>
Date: Fri Mar 22 15:14:11 2013 -0700

    Fix domain database initialization

    To fix bug 1089916, calls to db_api.configure_db() were changed to
    setup_db_env(). However, the gateway domain initialization didn't get
    the memo. This patch makes sure setup_db_env() is called in all the
    relevant places.

    Fixes bug 1131705.

    Change-Id: Ieec141192b8a5a045dadba6d70abaa25748b85b2

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/25636

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (milestone-proposed)

Reviewed: https://review.openstack.org/25636
Committed: http://github.com/openstack/glance/commit/eb21c4ec9f262043f49c18e48fc6ad728e1f6189
Submitter: Jenkins
Branch: milestone-proposed

commit eb21c4ec9f262043f49c18e48fc6ad728e1f6189
Author: Mark J. Washenberger <email address hidden>
Date: Fri Mar 22 15:14:11 2013 -0700

    Fix domain database initialization

    To fix bug 1089916, calls to db_api.configure_db() were changed to
    setup_db_env(). However, the gateway domain initialization didn't get
    the memo. This patch makes sure setup_db_env() is called in all the
    relevant places.

    Fixes bug 1131705.

    Change-Id: Ieec141192b8a5a045dadba6d70abaa25748b85b2

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.