Alex Heneveld created BROOKLYN-139:
--------------------------------------

             Summary: policy which sets up /etc/hosts on a group of servers
                 Key: BROOKLYN-139
                 URL: https://issues.apache.org/jira/browse/BROOKLYN-139
             Project: Brooklyn
          Issue Type: New Feature
            Reporter: Alex Heneveld


we could have a policy which we attach to an entity to collect all (or 
filtered) descendants which are SshMachineLocations and set up their /etc/hosts 
to have entries for each other

this would solve issues where we don't have a working dns but we require 
machines to be contactable to each other and hostnames (not IPs) must be used 
(e.g. spark) or where it would be easier to have a canonical set of hostnames 
we can use, rather than figuring out which IP address should be used

---

one suggestion on how to do this:

enum NetworkAddressMode with values:
* NONE (to leave out)
* SUBNET (to use subnet/private address)  [the default]
* PUBLIC (to use public address)

then config keys for the policy:

* NetworkAddressMode ADDRESS_FOR_PUBLIC_HOSTNAME - which address to register 
for the PUBLIC_HOSTNAME sensor value (if not a numeric IP address)
* NetworkAddressMode ADDRESS_FOR_SUBNET_HOSTNAME - which address to register 
for the SUBNET_HOSTNAME sensor value (if not a numeric IP address)
* NetworkAddressMode ADDRESS_FOR_ONBOX_SHORT_HOSTNAME - which address to 
register for the short hostname (result of running `hostname` at the host; run 
skipped if set to NONE)
* NetworkAddressMode ADDRESS_FOR_ONBOX_FULL_HOSTNAME - which address to 
register for the FQDN hostname (result of running `hostname -f` at the host; 
run skipped if set to NONE)

and:

- Boolean INCLUDE_SELF - for each machine, whether to include it in the updates 
made to /etc/hosts; default false, to only include other machines when updating 
a given machine, on the basis that the local hostname should already resolve 
and may want special treatment

---

however i'd also like to find a better way to manage multiple addresses which a 
machine might have, rather than just hostname and subnet.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to