From 44a302d7d239bfbe1950e36df533e1ccedd4233d Mon Sep 17 00:00:00 2001 From: yuchengde Date: Wed, 30 Oct 2019 13:57:34 +0800 Subject: [PATCH] Allow nova to delete volume with cinder auth If "reclaim_instance_interval" has been set in nova conf, attched volume may not be delete while instacne deleted. Adding cinder auth in nova conf can solve the problem. Change-Id: I9eb3a74c2f6976043cc35a94915f1fcecb9ef601 Closes-Bug: 1850279 --- ansible/group_vars/all.yml | 1 + ansible/roles/cinder/defaults/main.yml | 2 -- ansible/roles/nova/templates/nova.conf.j2 | 7 +++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index d456d0a122..d5daa6ea3f 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -687,6 +687,7 @@ neutron_keystone_user: "neutron" nova_keystone_user: "nova" placement_keystone_user: "placement" murano_keystone_user: "murano" +cinder_keystone_user: "cinder" # Nova fake driver and the number of fake driver per compute node enable_nova_fake: "no" diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index c049593ff1..9ac0cb8d31 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -173,8 +173,6 @@ cinder_v3_public_endpoint: "{{ public_protocol }}://{{ cinder_external_fqdn | pu cinder_logging_debug: "{{ openstack_logging_debug }}" -cinder_keystone_user: "cinder" - openstack_cinder_auth: "{{ openstack_auth }}" diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2 index f4a268fca1..0e71d5193a 100644 --- a/ansible/roles/nova/templates/nova.conf.j2 +++ b/ansible/roles/nova/templates/nova.conf.j2 @@ -66,6 +66,13 @@ num_retries = {{ groups['glance-api'] | length }} [cinder] catalog_info = volumev3:cinderv3:internalURL os_region_name = {{ openstack_region_name }} +auth_url = {{ keystone_admin_url }} +auth_type = password +project_domain_name = {{ default_project_domain_name }} +user_domain_id = {{ default_user_domain_id }} +project_name = service +username = {{ cinder_keystone_user }} +password = {{ cinder_keystone_password }} {% endif %} [neutron]