I saw it, but it seemed very much centered on hostname-on-remote-host
issues; I was trying to get it on the local box. A property seems to work
well enough.

On 5 October 2012 19:44, Adrian Cole <[email protected]> wrote:

> Hi, Steve.
>
> You probably missed this chat a couple months ago.  Hopefully, at
> least the context is helpful:
>
> https://gist.github.com/3202856
>
> -A
>
> On Fri, Oct 5, 2012 at 3:56 AM, Steve Loughran <[email protected]>
> wrote:
> > On 4 October 2012 22:23, Alex Heneveld <[email protected]
> >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
> > infrastructures
> >
> >
> >>  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
>

Reply via email to