Fix exports query with failed RPCs
authorIustin Pop <iustin@google.com>
Thu, 21 Feb 2013 16:41:34 +0000 (17:41 +0100)
committerIustin Pop <iustin@google.com>
Mon, 25 Feb 2013 09:37:04 +0000 (10:37 +0100)
When the RPC to a node has failed (for whatever reason), we currently
return _FS_UNAVAIL, which means "this node doesn't support
exports". However, that is misleading: all nodes support exports, but
we failed to list them at the moment, so _FS_NODATA (temporary
failure) is more appropriate here.

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

lib/query.py

index a9e0274..37bf114 100644 (file)
@@ -1,7 +1,7 @@
 #
 #
 
-# Copyright (C) 2010, 2011, 2012 Google Inc.
+# Copyright (C) 2010, 2011, 2012, 2013 Google Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -2428,7 +2428,7 @@ def _GetExportName(_, (node_name, expname)): # pylint: disable=W0613
 
   """
   if expname is None:
-    return _FS_UNAVAIL
+    return _FS_NODATA
   else:
     return expname