Skip to content
Snippets Groups Projects
Commit 525f0f98 authored by Christos Stavrakakis's avatar Christos Stavrakakis Committed by Guido Trotter
Browse files

Fix type of 'node_whitelist' request parameter


If opportunistic_locking is used, then 'node_whitelist' parameter passed
to the allocator is set to the LU's owned node locks. However, LU owned_locks
has type of 'set' while IReqInstanceAlloc expects type of
'ht.TMaybeListOf(ht.TNonEmptyString)'.

Signed-off-by: default avatarChristos Stavrakakis <cstavr@grnet.gr>
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 347fa0f1
No related branches found
No related tags found
No related merge requests found
......@@ -10297,7 +10297,7 @@ class LUInstanceCreate(LogicalUnit):
"""
if self.op.opportunistic_locking:
# Only consider nodes for which a lock is held
node_whitelist = self.owned_locks(locking.LEVEL_NODE)
node_whitelist = list(self.owned_locks(locking.LEVEL_NODE))
else:
node_whitelist = None
 
......@@ -11241,7 +11241,7 @@ class LUInstanceMultiAlloc(NoHooksLU):
 
if self.op.opportunistic_locking:
# Only consider nodes for which a lock is held
node_whitelist = self.owned_locks(locking.LEVEL_NODE)
node_whitelist = list(self.owned_locks(locking.LEVEL_NODE))
else:
node_whitelist = None
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment