commit c27b06d6f0652225a7b183fb3df5685dc0d3f381
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Tue Apr 7 16:54:48 2015 +0200
SlavePool: fix interface parameter matching
Interface compatibility check in matching algorithm compares the value
of parameter only if it's also present in slavemachine definition inside
pool. If it's not in the pool, the check is finally evaluated as matched.
So, if the first interface that we compare to does not have the requested
param and second one has it, it is the first one that is evaluated as
matched and not the second one as a user would expect.
Since we __require__ that the machine has all the requirements we define
under <params> tag in recipe the condition had to be changed.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Controller/SlavePool.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Controller/SlavePool.py b/lnst/Controller/SlavePool.py
index 82737a4..2602f23 100644
--- a/lnst/Controller/SlavePool.py
+++ b/lnst/Controller/SlavePool.py
@@ -595,7 +595,7 @@ class SetupMapper(object):
req_label != req_if["network"]:
return False
for param, value in req_if["params"].iteritems():
- if param in pool_if["params"] and\
+ if param not in pool_if["params"] or\
value != pool_if["params"][param]:
return False
return True
Show replies by date