Revision 0623d351 daemons/ganeti-noded
b/daemons/ganeti-noded | ||
---|---|---|
93 | 93 |
raise http.HttpNotFound() |
94 | 94 |
|
95 | 95 |
try: |
96 |
try: |
|
97 |
return method(req.request_body) |
|
98 |
except backend.RPCFail, err: |
|
99 |
# our custom failure exception; str(err) works fine if the |
|
100 |
# exception was constructed with a single argument, and in |
|
101 |
# this case, err.message == err.args[0] == str(err) |
|
102 |
return (False, str(err)) |
|
103 |
except: |
|
104 |
logging.exception("Error in RPC call") |
|
105 |
raise |
|
96 |
return method(req.request_body) |
|
97 |
except backend.RPCFail, err: |
|
98 |
# our custom failure exception; str(err) works fine if the |
|
99 |
# exception was constructed with a single argument, and in |
|
100 |
# this case, err.message == err.args[0] == str(err) |
|
101 |
return (False, str(err)) |
|
106 | 102 |
except errors.QuitGanetiException, err: |
107 | 103 |
# Tell parent to quit |
104 |
logging.info("Shutting down the node daemon, arguments: %s", |
|
105 |
str(err.args)) |
|
108 | 106 |
os.kill(self.noded_pid, signal.SIGTERM) |
107 |
# And return the error's arguments, which must be already in |
|
108 |
# correct tuple format |
|
109 |
return err.args |
|
110 |
except: |
|
111 |
logging.exception("Error in RPC call") |
|
112 |
raise |
|
109 | 113 |
|
110 | 114 |
# the new block devices -------------------------- |
111 | 115 |
|
Also available in: Unified diff