[ 
https://issues.apache.org/jira/browse/WHIRR-604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Bayer updated WHIRR-604:
-------------------------------

    Attachment: WHIRR-604.patch

So this is a very admittedly hackish way to handle this, on some level, but 
here's a patch. I add two properties to ClusterSpec - 
whirr.auto-hostname-prefix and whirr.auto-hostname-suffix, along with some 
logic to set those automatically if the provider is one of a known list 
(cloudservers and rackspace-cloudservers currently). Then 
configure_hostnames.sh looks for AUTO_HOSTNAME_SUFFIX (and 
AUTO_HOSTNAME_PREFIX, but that's not set to anything but "" for 
cloudservers/rackspace-cloudservers - we need it here at Cloudera for our 
internal cloud, though) and if it's set, uses that to set the hostname.

This meant I had to add configure_hostnames to a bunch of beforeConfigure 
methods (since it really should be using public IP, not private IP, which isn't 
set 'til we have the instance). That may be something we can work around, 
though. I also made a few other minor tweaks (like having HadoopProxy use an IP 
for SSH'ing, rather than a hostname, because...well, I've been bit by IPs not 
resolving often enough now that I want this). I've tested it with our internal 
cloud successfully and am running cloudservers-us tests shortly. 
                
> Non-resolvable hostnames should be reset to something resolvable
> ----------------------------------------------------------------
>
>                 Key: WHIRR-604
>                 URL: https://issues.apache.org/jira/browse/WHIRR-604
>             Project: Whirr
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.7.1
>            Reporter: Andrew Bayer
>            Assignee: Adrian Cole
>             Fix For: 0.8.0
>
>         Attachments: WHIRR-604.patch
>
>
> So we currently have a hack in 
> core/src/main/resources/functions/configure_hostnames.sh to reset the 
> instance hostname on Rackspace to a-b-c-d.static.cloud-ips.com, since the 
> hostname on the instance that Rackspace uses either isn't resolvable at all 
> or isn't resolvable externally (not 100% sure which is the case there - I 
> think they're just not resolvable). This logic should be generalized, since 
> there are other providers where this is the case, and it's also an issue 
> with, say, something like a private Cloudstack install.
> What seems to make sense is to add a property - something like 
> whirr.ip-hostname-domain - and to add a check if we can actually resolve the 
> instance's hostname from anywhere but that particular instance (since the 
> very fact of it being in /etc/hostname means it'll be resolvable locally). If 
> not, set the hostname to a-b-c-d.${whirr.ip-hostname-domain}, with logic in 
> Java somewhere to have a mapping of known provider->ip hostname domains for 
> cases like Rackspace, so that whirr.ip-hostname-domain doesn't need to be set 
> explicitly in those cases.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to