Fix HV/OS parameter validation on non-vm nodes
authorIustin Pop <iustin@google.com>
Thu, 17 Feb 2011 16:06:59 +0000 (17:06 +0100)
committerIustin Pop <iustin@google.com>
Thu, 17 Feb 2011 17:25:00 +0000 (18:25 +0100)
commit9c24736cae9056e7e38bf2f92eea496225d8d158
tree8d6385b4f4529ef3551ad83ca43ae8266aefb1d3
parenteffab4ca477ae296058f1aead364debef629da20
Fix HV/OS parameter validation on non-vm nodes

Currently, there is at least one LU that does wrong validation of HV
parameters (against all nodes, LUClusterSetParams). It's possible to
fix this case, but I went and modified the base functions to filter
out non-vm_capable nodes so all callers are protected.

Note: the _CheckOSParams function is never called with all nodes list,
so modifying it shouldn't be needed. However, I think it's safe to do
so (and it shouldn't hurt as an instance's node shouldn't ever lack
the vm_capable bit).

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
lib/cmdlib.py