On Tue, Sep 23, 2014 at 12:00:11PM +0200, 'Klaus Aehlig' via ganeti-devel wrote:
When raising an OpPrereqError, an error code always has to be provided,
even if we raise the exception indirectly via result.Raise.
Signed-off-by: Klaus Aehlig <[email protected]>
---
lib/cmdlib/node.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/cmdlib/node.py b/lib/cmdlib/node.py
index e99f728..275785b 100644
--- a/lib/cmdlib/node.py
+++ b/lib/cmdlib/node.py
@@ -293,7 +293,7 @@ class LUNodeAdd(LogicalUnit):
rpcrunner = rpc.DnsOnlyRunner()
result = rpcrunner.call_version([node_name])[node_name]
result.Raise("Can't get version information from node %s" % node_name,
- prereq=True)
+ prereq=True, ecode=errors.ECODE_ENVIRON)
if constants.PROTOCOL_VERSION == result.payload:
logging.info("Communication to node %s fine, sw version %s match",
node_name, result.payload)
--
2.1.0.rc2.206.gedb03e5
LGTM