whirr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@hortonworks.com>
Subject Re: getting the internal FQDN of a host from the whirr client
Date Fri, 05 Oct 2012 10:56:01 GMT
On 4 October 2012 22:23, Alex Heneveld <alex.heneveld@cloudsoftcorp.com>wrote:

> Steve-
> He he I have scars from all the times I've banged my head against this.
>  I've come to the conclusion you should pretty much always use:
> cluster.getInstanceMatching(**RolePredicates.role("cmserver"**
> )).getPublicHostname()
> which is the *public* hostname admittedly -- but should normally resolve
> within a private subnet to the private IP if the public IP is not
> accessible.

it does. but net traffic to it gets billed at the external rate on many

>  In a good network anyway.  Failing that you should just be able to use
> the private IP.  If you're feeling ambitious, fix /etc/hosts / DNS for the
> boxes you manage so that public hostnames do work everywhere in your
> universe.

oh, that's both devious and wrong. I'll think about using it though.

> Otherwise you end up hacking different things for different target clouds.

do you have those per-target hacks anywhere? a whirr-contrib module perhaps?

> I think private hostname is a nebulous concept ... good that
> Instance.getPrivateHostname is deprecated.  (Private to whom? -- localhost
> is quite a reliable private hostname but probably not what you are after!)
> So can you somehow use public hostname or private IP ?

I was thinking maybe I could run something on one of the hosts I bring up
to do the mapping for me -give it the list of IPs, get back the locally
rDNS'd list. I don't see anything in whirr right now, and the way
statements get executed as async batches, it maybe tricky. I could imagine
a new statement to do that.

for now I'm just going to add an extra property for the domain, suffix that
to the (known) hostname -and let the users sort it out

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message