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 DF0CA200C25 for ; Fri, 24 Feb 2017 13:19:53 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DD9B4160B69; Fri, 24 Feb 2017 12:19:53 +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 33E20160B5C for ; Fri, 24 Feb 2017 13:19:53 +0100 (CET) Received: (qmail 14347 invoked by uid 500); 24 Feb 2017 12:19:52 -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 14327 invoked by uid 99); 24 Feb 2017 12:19:51 -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 12:19:51 +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 40E9BC8819 for ; Fri, 24 Feb 2017 12:19:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.379 X-Spam-Level: X-Spam-Status: No, score=0.379 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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, 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-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id yETVmKlqbA7g for ; Fri, 24 Feb 2017 12:19:49 +0000 (UTC) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 94C275F24C for ; Fri, 24 Feb 2017 12:19:48 +0000 (UTC) Received: by mail-wm0-f49.google.com with SMTP id v186so13200854wmd.0 for ; Fri, 24 Feb 2017 04:19:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudsoftcorp.com; s=google; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=6ZKHlsMMzl9wtlHuXEud17L42+TNvlvYVGF3+gqhc1I=; b=J/pOqL4aJawfJl2T+6TcprHwjO0J+AsTdL5HCJaiUw/uDOFJbqFIdALqsSF1her+sX ZSZn0N3vb26Ykzke+a6pdGbViOhhvzc10bVe0p0XMxiSP/NH7wadxSQt3iXBt+ccF/2m bUC9LPUdQLKG8DeR3mUiAx+7l/XTRcXBjO14g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=6ZKHlsMMzl9wtlHuXEud17L42+TNvlvYVGF3+gqhc1I=; b=uneYqGYfSXNLZOyWfUMbHVuLWnuZv+/2N/4AMrDiirkmMF9dMQDjw+I8i3n4sb5fY0 b30SUrYor8l2jd21kd6WDnX7sKgm+oy9cb/HCDIgoV8f//5ZM+kkgSDOT1/QNvwOXqQ9 yqU5xKVThvxpp1Eb5O1TPgDnJau6tOLZsSwaURES/e9nK3hSfZOlsQIlt3bzdhjZkj3l 9turIwXwJXvwJFLRzVVdMcmuBZBK4qakYag07bkDHhXSQdsFyt4oseC9qXAGCYnqE073 jKuBRDfmPNOMZQV9IbiCnt77htQggYrwgGh76JvGCCUy+VRLADvHAKzr2w3wxaGmNrZI Y6RQ== X-Gm-Message-State: AMke39mWz7gwUX00ZYd6y5FC9i8LZfgccjiF8ZJHV5dUxCsub0iWK7FQL+WdYNq25kNZevX6nx2iYyDfyj2O+BAnPtktf3GEj/ljtiiKCQvO3z6EJb2DZxC5yZYDEysfqoxRiw== X-Received: by 10.28.148.76 with SMTP id w73mr2420213wmd.74.1487938787868; Fri, 24 Feb 2017 04:19:47 -0800 (PST) Received: from [192.168.0.101] (77-85-249-133.ip.btc-net.bg. [77.85.249.133]) by smtp.gmail.com with ESMTPSA id x14sm10149225wrb.1.2017.02.24.04.19.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Feb 2017 04:19:46 -0800 (PST) From: Svetoslav Neykov Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: [BROOKLYN-436] - Thoughts on making the URL an HA member is available at available Message-Id: <56835424-B600-4133-9A06-17F9357309CB@cloudsoftcorp.com> Date: Fri, 24 Feb 2017 14:19:45 +0200 To: dev@brooklyn.apache.org X-Mailer: Apple Mail (2.3259) 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 12:19:54 -0000 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.