You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by ahgittin <gi...@git.apache.org> on 2016/08/25 22:11:06 UTC

[GitHub] brooklyn-library pull request #62: BIND DNS improvements

GitHub user ahgittin opened a pull request:

    https://github.com/apache/brooklyn-library/pull/62

    BIND DNS improvements

    support configurable source sensor for the IP address (so we can do private or public), plus some misc fixes for greater OS portability

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ahgittin/brooklyn-library bind-dns-improvements

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-library/pull/62.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #62
    
----
commit 911ba559866e9b2ff0925648a550b647cbdf903b
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Date:   2016-08-24T14:36:41Z

    listen on all interfaces
    
    needed if in a cloud where public ip is off-box

commit 54db83d593deaad756df154d037e232110c7fa64
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Date:   2016-08-24T14:37:10Z

    some versions of bind require serial < 2^32 so use _seconds_ since epoch

commit bbdda166fdb4debdd83abf5c6a4fce9e95a6d5b2
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Date:   2016-08-25T15:44:02Z

    support configurable addresses

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-library pull request #62: BIND DNS improvements

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/brooklyn-library/pull/62#discussion_r76401931
  
    --- Diff: software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.conf ---
    @@ -20,14 +20,15 @@
     // Generated by Brooklyn on ${.now?string.short}
     //
     options {
    -    listen-on port ${entity.dnsPort} { 127.0.0.1; ${driver.address}; };
    +    // listen-on default is all interfaces
    +    // listen-on port ${entity.dnsPort} { 127.0.0.1; ${driver.address}; ${driver.subnetAddress}; };
    --- End diff --
    
    would prefer `listen-on port ${entity.dnsPort} { any; };` to be explicit, and allow changing port number, then. same for IPV6 as `listen-on-v6 port ${entity.dnsPort} { any; };`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-library issue #62: BIND DNS improvements

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the issue:

    https://github.com/apache/brooklyn-library/pull/62
  
    LGTM, can be merged once the `listen-on port` lines are fixed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-library issue #62: BIND DNS improvements

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the issue:

    https://github.com/apache/brooklyn-library/pull/62
  
    good suggestions, but as discussed given the testing time required, low priority of ipv6, and reality that we should rewrite much of this in yaml, i've marked the (very nice) ipv6 change as `TODO` in the conf file


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-library pull request #62: BIND DNS improvements

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/brooklyn-library/pull/62#discussion_r76403145
  
    --- Diff: software/network/src/main/resources/org/apache/brooklyn/entity/network/bind/named.conf ---
    @@ -20,14 +20,15 @@
     // Generated by Brooklyn on ${.now?string.short}
     //
     options {
    -    listen-on port ${entity.dnsPort} { 127.0.0.1; ${driver.address}; };
    +    // listen-on default is all interfaces
    +    // listen-on port ${entity.dnsPort} { 127.0.0.1; ${driver.address}; ${driver.subnetAddress}; };
    --- End diff --
    
    Actually, use the following for both:
    ```
    // This will cause named to listen on all IPv4 and IPv6 configured interfaces.
    listen-on-v6 ${entity.dnsPort} { any; };
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-library pull request #62: BIND DNS improvements

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/brooklyn-library/pull/62


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-library pull request #62: BIND DNS improvements

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/brooklyn-library/pull/62#discussion_r76402034
  
    --- Diff: software/network/src/main/java/org/apache/brooklyn/entity/network/bind/BindDnsServerImpl.java ---
    @@ -222,17 +227,35 @@ public void update() {
                 Multimap<String, String> aRecordToCnames = MultimapBuilder.hashKeys().hashSetValues().build();
                 Multimap<String, String> ipToAllNames = MultimapBuilder.hashKeys().hashSetValues().build();
     
    -            for (Map.Entry<String, Entity> e : hostnameToEntity.entries()) {
    -                String domainName = e.getKey();
    -                Maybe<SshMachineLocation> location = Machines.findUniqueMachineLocation(e.getValue().getLocations(), SshMachineLocation.class);
    -                if (!location.isPresent()) {
    -                    LOG.debug("Member {} of {} does not have an SSH location so will not be configured", e.getValue(), this);
    -                    continue;
    -                } else if (ipToARecord.inverse().containsKey(domainName)) {
    +            for (Map.Entry<String, Entity> entry : hostnameToEntity.entries()) {
    +                String domainName = entry.getKey();
    +                Entity entity = entry.getValue();
    +                
    +                String address = null;
    +                
    +                AttributeSensor<String> addressSensor = getConfig(ADDRESS_SENSOR);
    +                if (addressSensor!=null) {
    +                    address = entity.getAttribute(addressSensor);
    +                    
    --- End diff --
    
    Remove blank line


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---