Use sync_on_startup in placement-perfload job

Use the [placement_database]/sync_on_startup config setting to
have the database schema synchronized during web-service startup
rather than through a separate call to placement-manage.

This is done for two reasons:

* It provides a reaonable test that it works, which is not present
  in other integration tests.
* Until Id9bc515cee71d629b605da015de39d1c9b0f8fc4 merges it will
  demonstrate the bug described in the story linked below.

Couple of things to note:

* The tempest job will continue to exercise placement-manage, as it
  has always done.
* The bug (in the story) doesn't impact the behavior of the API, it
  merely impacts what is or is not logged. In the
  logs/placement-api.log generated in the perfload job for this change
  there will be an initial burst of DEBUG and INFO logging, but then
  only request logging. This should be corrected by
  Id9bc515cee71d629b605da015de39d1c9b0f8fc4

Change-Id: Ib7f5cdfa3b314af7681d594dccb553bddb764224
Story: 2005187
This commit is contained in:
Chris Dent 2019-03-09 12:24:22 +00:00
parent 6d42fc4baf
commit 65da83aece
1 changed files with 1 additions and 2 deletions

View File

@ -32,10 +32,9 @@
export OS_PLACEMENT_DATABASE__CONNECTION=mysql+pymysql://root:secret@127.0.0.1/placement?charset=utf8
export OS_PLACEMENT_DATABASE__MAX_POOL_SIZE=25
export OS_PLACEMENT_DATABASE__MAX_OVERFLOW=100
export OS_PLACEMENT_DATABASE__SYNC_ON_STARTUP=True
export OS_DEFAULT__DEBUG=True
export OS_API__AUTH_STRATEGY=noauth2
# sync tables
placement-manage db sync
uwsgi --http :8000 --wsgi-file .placement/bin/placement-api --daemonize {{ ansible_user_dir }}/logs/placement-api.log --processes 5 --threads 25
- name: placement performance
args: