If we get an error result from a query, warn rather than try to send it
to the callback.

Signed-off-by: Guido Trotter <[email protected]>
---
 daemons/ganeti-nld |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/daemons/ganeti-nld b/daemons/ganeti-nld
index 51328f7..9ee0444 100755
--- a/daemons/ganeti-nld
+++ b/daemons/ganeti-nld
@@ -126,6 +126,11 @@ class NLDConfdCallback(object):
 
     """
     if up.type == confd.client.UPCALL_REPLY:
+      if up.server_reply.status != gnt_constants.CONFD_REPL_STATUS_OK:
+        logging.warning("Received error '%s' to confd request %s" %
+                        (up.server_reply.answer, up.orig_request))
+        return
+
       rtype = up.orig_request.type
       try:
         dispatcher = self.dispatch_table[rtype]
-- 
1.6.5

Reply via email to