Blame SOURCES/bz1859932-fence_evacuate-support-private-flavors.patch

caacde
From 18ef1622475db947aef70042523f4a176c4155bd Mon Sep 17 00:00:00 2001
caacde
From: Luca Miccini <lmiccini@redhat.com>
caacde
Date: Thu, 23 Jul 2020 14:33:38 +0200
caacde
Subject: [PATCH] [fence_evacuate] Enable evacuation of instances using private
caacde
 flavors
caacde
caacde
This commit extends the flavor.list() api call in the fence_evacuate
caacde
agent to fetch private flavors that could be tagged with the 'evacuable'
caacde
attribute, allowing instance-ha to be enabled on a per tenant basis.
caacde
---
caacde
 agents/evacuate/fence_evacuate.py | 2 +-
caacde
 1 file changed, 1 insertion(+), 1 deletion(-)
caacde
caacde
diff --git a/agents/evacuate/fence_evacuate.py b/agents/evacuate/fence_evacuate.py
caacde
index 88837dd8..53d6fd15 100644
caacde
--- a/agents/evacuate/fence_evacuate.py
caacde
+++ b/agents/evacuate/fence_evacuate.py
caacde
@@ -87,7 +87,7 @@ def _is_server_evacuable(server, evac_flavors, evac_images):
caacde
 
caacde
 def _get_evacuable_flavors(connection):
caacde
 	result = []
caacde
-	flavors = connection.flavors.list()
caacde
+	flavors = connection.flavors.list(is_public=None)
caacde
 	# Since the detailed view for all flavors doesn't provide the extra specs,
caacde
 	# we need to call each of the flavor to get them.
caacde
 	for flavor in flavors: