brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <>
Subject [GitHub] incubator-brooklyn pull request: Fixes issue where port was not be...
Date Thu, 25 Jun 2015 12:48:27 GMT
Github user neykov commented on a diff in the pull request:
    --- Diff: software/base/src/main/java/brooklyn/entity/basic/ ---
    @@ -456,6 +456,9 @@ protected final void callStartHooks() {}
                     Object value = getConfig(k);
                     if (value instanceof Integer){
    +                } else if (PortRange.class.isAssignableFrom(value.getClass())) {
    +                    PortRange p = (PortRange)value;
    +                    if (p != null && !p.isEmpty()) ports.add(p.iterator().next());
    --- End diff --
    This won't work if there's a port collision, which will cause the corresponding port attribute
to be incremented until a free port is found. In that case the entity will use the free port,
but the firewall will open the initial port instead. Mostly a problem for `SameServerEntity`,
`localhost` location. As you've copied the existing logic I am fine with keeping it as is,
but worth adding a comment.
    There's identical logic in `SameServerDriverLifecycleEffectorTasks` so better update it
there as well.

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 or file a JIRA ticket
with INFRA.

View raw message