nova/nova/tests/unit/api/openstack/placement
Sean Mooney 00d08a3288 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.

Co-Authored-By: Balazs Gibizer <balazs.gibizer@ericsson.com>
Closes-Bug: #1799246
Related-Bug: #1784155
Change-Id: I704196711d30c1124e713ac31111a8ea6fa2f1ba
2018-11-08 12:25:46 +00:00
..
handlers Do not use nova.test in placement.handlers.test_aggregate 2018-06-07 05:44:36 +08:00
objects Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
__init__.py Add initial framing of placement API 2016-07-29 10:31:36 +00:00
test_context.py Implement granular policy rules for placement 2018-05-17 11:12:16 -04:00
test_db_api.py Harden placement init under wsgi 2018-11-08 12:25:46 +00:00
test_deploy.py Set policy_opt defaults in placement deploy unit test 2018-08-21 16:56:43 +01:00
test_fault_wrap.py Do not use nova.test in placement.test_fault_wrap 2018-06-07 05:44:36 +08:00
test_handler.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_microversion.py [placement] Add /reshaper handler for POST 2018-08-23 00:36:17 +00:00
test_policy.py Implement granular policy rules for placement 2018-05-17 11:12:16 -04:00
test_requestlog.py Do not use nova.test in placement.test_requestlog 2018-06-07 05:44:36 +08:00
test_util.py Add request_spec.RequestGroup versioned object 2018-11-05 17:47:06 -05:00