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 36672200C33 for ; Fri, 24 Feb 2017 14:45:54 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 35140160B5C; Fri, 24 Feb 2017 13:45:54 +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 624FD160B69 for ; Fri, 24 Feb 2017 14:45:53 +0100 (CET) Received: (qmail 82187 invoked by uid 500); 24 Feb 2017 13:45:48 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 82169 invoked by uid 99); 24 Feb 2017 13:45:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2017 13:45:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 9AE02C254D for ; Fri, 24 Feb 2017 13:45:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.102 X-Spam-Level: X-Spam-Status: No, score=-0.102 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=cloudsoftcorp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id hVkDvSXdgSjy for ; Fri, 24 Feb 2017 13:45:45 +0000 (UTC) Received: from mail-wr0-f178.google.com (mail-wr0-f178.google.com [209.85.128.178]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 00B335F647 for ; Fri, 24 Feb 2017 13:45:44 +0000 (UTC) Received: by mail-wr0-f178.google.com with SMTP id u47so13402579wrb.0 for ; Fri, 24 Feb 2017 05:45:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudsoftcorp.com; s=google; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=PYch4oGRiAHBqd3dBv4fTmXT0CqM0R0IVqE2USRLp+E=; b=B729tAcAUsla3mDnGsBnmDCukJI69fandiVHnKJgcimXsUhlJWOQFxcY27IAJ3zaTT R9IXMCBPVLQJVTL1yj2H8Hnr5C6U2UBta8UnrBhLSpjJZFTFuH88qOrxJfvNemKS70id OB8vS6DdnzSxbIpXxknWdaSWGd58suwiJouLQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=PYch4oGRiAHBqd3dBv4fTmXT0CqM0R0IVqE2USRLp+E=; b=tL3+3eY0zDvBGDPn+d5npQ/y6pRClpM8Gls8JPgwgg0Blt37s/8iXvZRnwWjALr61q qQXQsP7jrtq4yE2QbaNs7mLq55U5dhYeS/2hu7KFXzWY+8oah+xX4aON2rdVST4zXeJx I/YZ5Gco54yiKyUtB5sl9e/V+TzyO8JeHDGErWF9ANYQourFjaaXTzVsWzKtXYRg1zrs GYfUXUQ+M7f0/LFb9NgZW5OkpIyDK75XlcZsHZmiw1+8M0cl3/70Fs+kE7fX5zA2seVS HYE+91sq0406qjB7cS6hso+yFbwyxFsHgWjeXIYfWwgEqpiPXY6+6dGnC2Q+OuQ1dHId chMQ== X-Gm-Message-State: AMke39lpHWcZGPHAOHQcNL9bZe1AAb8UYgxk42/9d3FInQcvuT7YV/3Qleemc42k5MvW7tPohLrVkFPetCDPlak3CzKqKIpBiSckO71mXrjnd1GoR6ePxaucp0vJwWBo10OF1A== X-Received: by 10.223.171.17 with SMTP id q17mr2573040wrc.179.1487943937239; Fri, 24 Feb 2017 05:45:37 -0800 (PST) Received: from Alexs-MacBook-Pro-2.local (host86-187-167-87.range86-187.btcentralplus.com. [86.187.167.87]) by smtp.googlemail.com with ESMTPSA id e71sm2434364wma.8.2017.02.24.05.45.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Feb 2017 05:45:36 -0800 (PST) From: Alex Heneveld X-Google-Original-From: Alex Heneveld Subject: Re: [BROOKLYN-436] - Thoughts on making the URL an HA member is available at available To: dev@brooklyn.apache.org References: <56835424-B600-4133-9A06-17F9357309CB@cloudsoftcorp.com> Message-ID: Date: Fri, 24 Feb 2017 13:45:35 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <56835424-B600-4133-9A06-17F9357309CB@cloudsoftcorp.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Legal-Virus-Advice: Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by Cloudsoft Corporation Limited in this regard and the recipient should carry out such virus and other checks as it considers appropriate. X-Legal-Confidentiality: This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. Cloudsoft Corporation Limited does not accept responsibility for changes made to this message after it was sent. X-Legal-Company-Info: Cloudsoft Corporation Limited. Registered in Scotland. Number: SC349230. Registered Office: 13 Dryden Place, Edinburgh, EH9 1RP. archived-at: Fri, 24 Feb 2017 13:45:54 -0000 Svet- Why not just encourage people to use "publicAddress" and/or make sure the hostname is set sensibly ? Feels like any heuristic we use (whether hostname, most public locally-known IP or externally reported address) will be imperfect. Local hostname feels like the best strategy which is what your flowchart makes it sound like we do -- although you then say it's the "local address". (I'd be in favour of switching to the former if we're doing the latter so that the advice above works.) --A On 24/02/2017 12:19, Svetoslav Neykov wrote: > Summary of the issue: Each HA member node publishes a URL it's available at in the persisted state. For the Karaf build no value is set. > Available at: https://issues.apache.org/jira/browse/BROOKLYN-436 > > When fixing the issue I'm wondering whether we should stick to the existing behaviour for inferring the URL or change it a bit. TL;DR - should we use the public IP of the machines instead? > > Current steps for building the URL are: > * Get the hostname from "--publicAddress" command line option if set > * Get the hostname from "--bindAddress" command line option if set and not "0.0.0.0" > * Get the hostname of the local machine (can be overriden in config with "brooklyn.location.localhost.address" system property) > * Combine the above with the port the web server is configured to run at (and the protocol) > > The default behaviour from above is to set the URL to the local address of the machine. > > There are a couple of common uses of the value: > 1) Clients using the REST API will use it to find what's the MASTER of the cluster by going to any member. > 2) Users going to a non-master web UI will be offered the option to be redirected to the MASTER > > 1) Could need either the public or the private IP, depending on where the HA members are relative to the client using them. > 2) Most often need the public URL, but sometimes the local address might be preferred - for example when connecting by VPN to the member's network. > > By public IP here I mean what IP the machine is visible to the world with. The machine might not have a public IP assigned at all, and be NATted to the internet instead. > > Another use case could be to use the hostname from the URL to let the MASTER configure networking access for the standby servers. > > Given the above I don't think a one size fits all solution is possible. I think we should keep the existing URL using the local address and provide a second value with the public URL as well. This will let clients pick the one (they think) is appropriate. > > Svet. >