From cf192249f33cca226cd791fca308a62d3d9afbf6 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Tue, 5 May 2009 12:29:10 +0200 Subject: [PATCH] ganeti-noded: add bind address option This allows ganeti-noded to bind only on one interface rather than all the ones on the machine. The default behaviour doesn't change. Signed-off-by: Guido Trotter <ultrotter@google.com> --- daemons/ganeti-noded | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/daemons/ganeti-noded b/daemons/ganeti-noded index 3a2b4a092..9600e30ec 100755 --- a/daemons/ganeti-noded +++ b/daemons/ganeti-noded @@ -721,7 +721,7 @@ def ParseOptions(): """ parser = OptionParser(description="Ganeti node daemon", - usage="%prog [-f] [-d]", + usage="%prog [-f] [-d] [-b ADDRESS]", version="%%prog (ganeti) %s" % constants.RELEASE_VERSION) @@ -731,6 +731,10 @@ def ParseOptions(): parser.add_option("-d", "--debug", dest="debug", help="Enable some debug messages", default=False, action="store_true") + parser.add_option("-b", "--bind", dest="bind_address", + help="Bind address", + default="", metavar="ADDRESS") + options, args = parser.parse_args() return options, args @@ -781,7 +785,7 @@ def main(): queue_lock = jstore.InitAndVerifyQueue(must_lock=False) mainloop = daemon.Mainloop() - server = NodeHttpServer(mainloop, "", port, + server = NodeHttpServer(mainloop, options.bind_address, port, ssl_params=ssl_params, ssl_verify_peer=True) server.Start() try: -- GitLab