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

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