Commit 3b3db8fd authored by Guido Trotter's avatar Guido Trotter
Browse files

ganeti-noded: serve not quite forever

Rather than calling httpd.serve_forever() in ganeti-noded we'll call
httpd.handle_request() but just while a global variable, which we'll
call _EXIT_GANETI_NODED, remains false.

Reviewed-by: iustinp
parent b0059682
......@@ -619,8 +619,12 @@ def main():
logger.SetupLogging(program="ganeti-noded", debug=options.debug)
global _EXIT_GANETI_NODED
_EXIT_GANETI_NODED = False
httpd = BaseHTTPServer.HTTPServer(('', port), ServerObject)
httpd.serve_forever()
while (not _EXIT_GANETI_NODED):
httpd.handle_request()
if __name__ == '__main__':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment