From 9591e892c0b536305c9d3ffdbefd6e2af6dfd4fa Mon Sep 17 00:00:00 2001 From: Marek Aufart Date: Mon, 4 Dec 2017 15:55:19 +0100 Subject: [PATCH] Skip disabled tenants when connecting to OpenStack Attempts to connect with disabled tenants generated misleading error messages, skipping disabled tenants when obtaining connection to OpenStack. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1518625 --- .../providers/openstack/legacy/openstack_handle/handle.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/manageiq/providers/openstack/legacy/openstack_handle/handle.rb b/lib/manageiq/providers/openstack/legacy/openstack_handle/handle.rb index 59ab4de21..9a6dd4953 100644 --- a/lib/manageiq/providers/openstack/legacy/openstack_handle/handle.rb +++ b/lib/manageiq/providers/openstack/legacy/openstack_handle/handle.rb @@ -373,7 +373,8 @@ def accessible_tenants # the "services" tenant is a special tenant in openstack reserved # specifically for the various services next if t.name == "services" - tenant_accessible?(t.name) + # disabled and non-accessible tenants are skipped + t.enabled && tenant_accessible?(t.name) end end