Commit decc7ec9 authored by Guido Trotter's avatar Guido Trotter
Browse files

Fix unclear error when replacing a nic's ip



The current error message ends up saying something like
'192.168.5.5' != 'network1', which is sort of non-intuitive (yes, of
course they are different). Fix this by explaining better what the
erroneous condition actually is.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarThomas Thrainer <thomasth@google.com>
parent f38270c6
......@@ -16940,7 +16940,8 @@ def _CheckForConflictingIp(lu, ip, node):
"""
(conf_net, _) = lu.cfg.CheckIPInNodeGroup(ip, node)
if conf_net is not None:
raise errors.OpPrereqError(("Conflicting IP address found: '%s' != '%s'" %
raise errors.OpPrereqError(("The requested IP address (%s) belongs to"
" network %s, but the target NIC does not." %
(ip, conf_net)),
errors.ECODE_STATE)
 
......
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