Commit 3e91897b authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix an error message in instance add

There is a mistake in the error message generated when we can't reach a
node for checking for available disk space. Without it, the error
message is:
Failure: prerequisites not met for this operation:
Cannot get current information from node '{u'gnte2.lab.k1024.org':
{'cpu_total': 1, 'memory_free': 480, 'vg_size': 131068, 'memory_total':
504, 'bootid': '2176dd3b-2f96-42f0-8b6e-2873ecaf5f9c', 'memory_dom0':
134, 'vg_free': 130172}, u'gnte1.lab.k1024.org': False}'

instead of the expected:
Failure: prerequisites not met for this operation:
Cannot get current information from node 'gnte2.lab.k1024.org'

Reviewed-by: imsnah
parent e70f1b7c
......@@ -3210,7 +3210,7 @@ class LUCreateInstance(LogicalUnit):
info = nodeinfo.get(node, None)
if not info:
raise errors.OpPrereqError("Cannot get current information"
" from node '%s'" % nodeinfo)
" from node '%s'" % node)
vg_free = info.get('vg_free', None)
if not isinstance(vg_free, int):
raise errors.OpPrereqError("Can't compute free disk space on"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment