From e22af31d85ac6dbda3e321498e868b6771d5eaff Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Thu, 20 May 2010 11:20:25 +0100 Subject: [PATCH] Remove errors.ConfdFatalError This exception is caught, but never thrown. It became useless when we moved confd from on/off to enabled/disabled, but always running on all nodes. Removing its definition and the code catching it can do no harm. Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- daemons/ganeti-confd | 6 ------ lib/errors.py | 9 --------- 2 files changed, 15 deletions(-) diff --git a/daemons/ganeti-confd b/daemons/ganeti-confd index 290f61887..9d321eba6 100755 --- a/daemons/ganeti-confd +++ b/daemons/ganeti-confd @@ -147,9 +147,6 @@ class ConfdInotifyEventHandler(pyinotify.ProcessEvent): # new watch. This is not a race condition, though, since we're anyway # going to realod the file after setting up the new watch. self.callback(False) - except errors.ConfdFatalError, err: - logging.critical("Critical error, shutting down: %s", err) - sys.exit(constants.EXIT_FAILURE) except: # we need to catch any exception here, log it, but proceed, because even # if we failed handling a single request, we still want the confd to @@ -165,9 +162,6 @@ class ConfdInotifyEventHandler(pyinotify.ProcessEvent): try: self.callback(True) - except errors.ConfdFatalError, err: - logging.critical("Critical error, shutting down: %s", err) - sys.exit(constants.EXIT_FAILURE) except: # we need to catch any exception here, log it, but proceed, because even # if we failed handling a single request, we still want the confd to diff --git a/lib/errors.py b/lib/errors.py index a50b03760..17a02371d 100644 --- a/lib/errors.py +++ b/lib/errors.py @@ -305,15 +305,6 @@ class JobQueueFull(JobQueueError): """ -class ConfdFatalError(GenericError): - """A fatal failure in Ganeti confd. - - Events that compromise the ability of confd to proceed further. - (for example: inability to load the config file) - - """ - - class ConfdRequestError(GenericError): """A request error in Ganeti confd. -- GitLab