Comment 3 for bug 1799246

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/rocky)

Reviewed: https://review.openstack.org/617297
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=74ed2fe69f15d86252b1c7779c916cb93ffc252d
Submitter: Zuul
Branch: stable/rocky

commit 74ed2fe69f15d86252b1c7779c916cb93ffc252d
Author: Sean Mooney <email address hidden>
Date: Fri Oct 12 14:26:14 2018 +0100

    Harden placement init under wsgi

    - This change tries to address an edge case discovered
      when running placement under mod_wsgi where
      if the placement wsgi application is re-initialize the db_api
      configure method attempts to reconfigure a started transaction
      factory.

    - This since oslo.db transaction factories do not support
      reconfiguration at runtime this result in an exception being
      raised preventing reloading of the Placement API without
      restarting apache to force mod_wsgi to recreate the
      python interpreter.

    - This change introduces a run once decorator to allow annotating
      functions that should only be executed once for the lifetime fo
      an interpreter.

    - This change applies the run_once decorator to the db_api configure
      method, to suppress the attempt to reconfigure the current
      TransactionFactory on application reload.

    NOTE(lyarwood): Simple positional conflict due to
    Ie7bf5d012e2ccbcd63c262ddaf739782afcdaf56 and
    I81d13418d75b46fbdb9f6d44889a207528c8d6de not being present in
    stable/rocky.

    Conflicts:
            nova/utils.py

    Co-Authored-By: Balazs Gibizer <email address hidden>
    Closes-Bug: #1799246
    Related-Bug: #1784155
    Change-Id: I704196711d30c1124e713ac31111a8ea6fa2f1ba
    (cherry picked from commit 00d08a3288f61268f8a823991fadf0d83c36c04d)