Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E03172009F4 for ; Thu, 26 May 2016 20:35:55 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DEEDE160A2B; Thu, 26 May 2016 18:35:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 39637160A18 for ; Thu, 26 May 2016 20:35:55 +0200 (CEST) Received: (qmail 85382 invoked by uid 500); 26 May 2016 18:35:54 -0000 Mailing-List: contact commits-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.apache.org Delivered-To: mailing list commits@aurora.apache.org Received: (qmail 85373 invoked by uid 99); 26 May 2016 18:35:54 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 May 2016 18:35:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 17D25DFC6F; Thu, 26 May 2016 18:35:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jcohen@apache.org To: commits@aurora.apache.org Message-Id: <5283a616c8e14ea1b867e0fff5e2a2d0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: aurora git commit: Add -ip option to bind scheduler to a single IP Date: Thu, 26 May 2016 18:35:54 +0000 (UTC) archived-at: Thu, 26 May 2016 18:35:56 -0000 Repository: aurora Updated Branches: refs/heads/master 32a8a0772 -> b76e38f9a Add -ip option to bind scheduler to a single IP Add an -ip command line option which sets the IP that the Jetty server will listen on. Bugs closed: AURORA-572 Reviewed at https://reviews.apache.org/r/47697/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/b76e38f9 Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/b76e38f9 Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/b76e38f9 Branch: refs/heads/master Commit: b76e38f9a43b4847614685ea2f4933a748ef8c2a Parents: 32a8a07 Author: Chris Bannister Authored: Thu May 26 13:33:29 2016 -0500 Committer: Joshua Cohen Committed: Thu May 26 13:33:29 2016 -0500 ---------------------------------------------------------------------- RELEASE-NOTES.md | 2 ++ .../org/apache/aurora/scheduler/http/JettyServerModule.java | 8 ++++++++ 2 files changed, 10 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/b76e38f9/RELEASE-NOTES.md ---------------------------------------------------------------------- diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 4cbf92e..6e878c5 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -22,6 +22,8 @@ - Upgraded to pystachio 0.8.1 to pick up support for the new [Choice type](https://github.com/wickman/pystachio/blob/v0.8.1/README.md#choices). - The `container` property of a `Job` is now a Choice of either a `Container` holder, or a direct reference to either a `Docker` or `Mesos` container. +- New scheduler command line argument `-ip` to control what ip address to bind the schedulers http + server to. ### Deprecations and removals: http://git-wip-us.apache.org/repos/asf/aurora/blob/b76e38f9/src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java b/src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java index 60667fc..4faf53f 100644 --- a/src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java +++ b/src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java @@ -115,6 +115,10 @@ public class JettyServerModule extends AbstractModule { help = "The port to start an HTTP server on. Default value will choose a random port.") protected static final Arg HTTP_PORT = Arg.create(0); + @CmdLine(name = "ip", + help = "The ip address to listen. If not set, the scheduler will listen on all interfaces.") + protected static final Arg LISTEN_IP = Arg.create(); + public static final Map GUICE_CONTAINER_PARAMS = ImmutableMap.of( FEATURE_POJO_MAPPING, Boolean.TRUE.toString(), PROPERTY_CONTAINER_REQUEST_FILTERS, GZIPContentEncodingFilter.class.getName(), @@ -377,6 +381,10 @@ public class JettyServerModule extends AbstractModule { ServerConnector connector = new ServerConnector(server); connector.setPort(HTTP_PORT.get()); + if (LISTEN_IP.hasAppliedValue()) { + connector.setHost(LISTEN_IP.get()); + } + server.addConnector(connector); server.setHandler(getGzipHandler(getRewriteHandler(rootHandler)));