From f27b65295628625e2ccf91d58a6ce1ddfabcd251 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Tue, 31 Jan 2017 16:26:10 +0000 Subject: [PATCH] Add options for nova cell_v2 This patch adds the cell_v2 nova_cell0 database as part of the test-install-nova.yml playbook. The var is required in test-vars for this reason. Additionally, we need to add permissions for the nova_api database user to access the nova_cell0 database. This means we need to append permissions for that user using the create-grant-db play. This defaults to "omit" so is only used when "db_append_privs" is passed to the include. A work around is required for a bug in upstream nova - this should be removed once https://review.openstack.org/#/c/428120/ merges. Finally a fix was added to ensure the api_database is setup using the appropriate address (although in this case it has no impact). Change-Id: I082f37bb3ce61a900e06a58f21c7882f83671355 --- create-grant-db.yml | 1 + test-install-nova.yml | 7 ++++++- test-vars.yml | 8 +++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/create-grant-db.yml b/create-grant-db.yml index e6cf9cf7..64e89bc5 100644 --- a/create-grant-db.yml +++ b/create-grant-db.yml @@ -31,6 +31,7 @@ host: "{{ item }}" state: "present" priv: "{{ db_name }}.*:ALL" + append_privs: "{{ db_append_privs | default(omit) }}" with_items: - "localhost" - "%" diff --git a/test-install-nova.yml b/test-install-nova.yml index bad13b78..beaeac2d 100644 --- a/test-install-nova.yml +++ b/test-install-nova.yml @@ -55,10 +55,15 @@ db_password: "{{ nova_container_mysql_password }}" - include: create-grant-db.yml db_name: "{{ nova_api_galera_database }}" - db_password: "{{ nova_container_mysql_password }}" + db_password: "{{ nova_api_container_mysql_password }}" - include: create-grant-db.yml db_name: "{{ nova_placement_galera_database }}" db_password: "{{ nova_placement_container_mysql_password }}" + - include: create-grant-db.yml + db_name: "{{ nova_cell0_database }}" + db_password: "{{ nova_api_container_mysql_password }}" + db_user: "{{ nova_api_galera_user }}" + db_append_privs: "yes" roles: - role: "{{ nova_rolename | default('os_nova') }}" vars_files: diff --git a/test-vars.yml b/test-vars.yml index 51cfa7f7..ec808ce9 100644 --- a/test-vars.yml +++ b/test-vars.yml @@ -155,6 +155,7 @@ nova_api_galera_database: nova_api nova_api_galera_user: nova_api nova_glance_api_servers: "{{ glance_api_servers }}" nova_container_mysql_password: "SuperSecrete" +nova_api_container_mysql_password: "SuperSecrete" nova_developer_mode: true nova_galera_address: "{{ test_galera_host }}" nova_galera_database: nova @@ -204,7 +205,7 @@ nova_placement_service_adminuri: "http://{{ test_nova_api_placement_host }}:8780 nova_placement_service_adminurl: "{{ nova_placement_service_adminuri }}/placement" nova_placement_service_internaluri: "http://{{ test_nova_api_placement_host }}:8780" nova_placement_service_internalurl: "{{ nova_placement_service_internaluri }}/placement" - +nova_cell0_database: "nova_cell0" # Neutron specific settings neutron_container_mysql_password: SuperSecrete @@ -463,3 +464,8 @@ pip_get_pip_force: no # Test install options install_test_packages: True + +# TODO: (andymccr) +# This is to work around a bug: https://bugs.launchpad.net/nova/+bug/1661243 +# Current fix needs to merge: https://review.openstack.org/#/c/428120/ +nova_reserved_host_disk_mb: 0