From b366634af80a3d400adf6e7bb9d2dded64e10d75 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Wed, 17 Jul 2019 16:50:32 +0200 Subject: [PATCH] Fix placement operations in multi-region deployments Change-Id: Ifc25d8a902d8183266277586e45697052c46b550 Closes-Bug: #1836917 --- blazar/utils/openstack/placement.py | 2 ++ .../notes/region-in-placement-client-dfbd0bcd09f81aac.yaml | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 releasenotes/notes/region-in-placement-client-dfbd0bcd09f81aac.yaml diff --git a/blazar/utils/openstack/placement.py b/blazar/utils/openstack/placement.py index b0ab4849..ef20b1a9 100644 --- a/blazar/utils/openstack/placement.py +++ b/blazar/utils/openstack/placement.py @@ -56,6 +56,7 @@ class BlazarPlacementClient(object): project_domain_name = kwargs.pop('project_domain_name', CONF.os_admin_project_domain_name) auth_url = kwargs.pop('auth_url', None) + region_name = kwargs.pop('region_name', CONF.os_region_name) if auth_url is None: auth_url = "%s://%s:%s/%s/%s" % (CONF.os_auth_protocol, @@ -77,6 +78,7 @@ class BlazarPlacementClient(object): client = adapter.Adapter(session=sess, service_type='placement', interface='public', + region_name=region_name, additional_headers=headers) return client diff --git a/releasenotes/notes/region-in-placement-client-dfbd0bcd09f81aac.yaml b/releasenotes/notes/region-in-placement-client-dfbd0bcd09f81aac.yaml new file mode 100644 index 00000000..e2c40689 --- /dev/null +++ b/releasenotes/notes/region-in-placement-client-dfbd0bcd09f81aac.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Fixes placement operations in multi-region deployments.