whirr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Heneveld <alex.henev...@cloudsoftcorp.com>
Subject Re: getting the internal FQDN of a host from the whirr client
Date Thu, 04 Oct 2012 21:23:24 GMT


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:


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.  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.  Otherwise you end up hacking different 
things for different target clouds.

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 ?


On 04/10/2012 19:11, Steve Loughran wrote:
> I have a need to get the in-cluster FQDN of a node, in the Java code that
> runs whirr-side so that I can generate some files there.
>     - I've seen the WHIRR-602 discussion on private hostnames, but they
>     appear to be about having a private hostname in the installation scripts.
>     - Instance.getPrivateAddress().getCanonicalHostName() returns the short
>     hostname, at least for the EC2 instances I've created.
> Any suggestions?

View raw message