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

[GitHub] brooklyn-server pull request #444: BROOKLYN-396: test and fix

GitHub user aledsage opened a pull request:

    https://github.com/apache/brooklyn-server/pull/444

    BROOKLYN-396: test and fix

    When rebinding a location, if a config flag corresponds to a field
    with `@SetFromFlag` then just set the field, and don\u2019t leave the 
    key-value inside `config().getBag()`.
    
    Some classes use fields to store internal state, which should not be
    passed to child locations (e.g. `LocalhostMachineProvisioningLocation.origConfigs`).

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

    $ git pull https://github.com/aledsage/brooklyn-server BROOKLYN-396

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

    https://github.com/apache/brooklyn-server/pull/444.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 #444
    
----
commit 3563d4794064b2c2eecf516d7fb96c7e1556e478
Author: Aled Sage <al...@gmail.com>
Date:   2016-11-18T16:07:53Z

    BROOKLYN-396: test and fix
    
    When rebinding a location, if a config flag corresponds to a field
    with \u201c@SetFromFlag\u201d then just set the field, and don\u2019t leave the 
    key-value inside \u201cconfig().getBag()\u201d.
    
    Some classes use fields to store internal state, which should not be
    passed to child locations
    (e.g. `LocalhostMachineProvisioningLocation.origConfigs`).

----


---
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-server pull request #444: BROOKLYN-396: test and fix

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

    https://github.com/apache/brooklyn-server/pull/444


---
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-server issue #444: BROOKLYN-396: test and fix

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

    https://github.com/apache/brooklyn-server/pull/444
  
    It's concerning that the implementation of `BasicLocationRebindSupport.addConfig()` is very different from `BasicEntityRebindSupport` and `BasicPolicyRebindSupport`.
    
    But I don't want to try changing that stuff now. It's one to mull over, and change in the future (possibly next time we're doing major work on rebind).


---
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-server issue #444: BROOKLYN-396: test and fix

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

    https://github.com/apache/brooklyn-server/pull/444
  
    Merging now.


---
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-server issue #444: BROOKLYN-396: test and fix

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

    https://github.com/apache/brooklyn-server/pull/444
  
    @aledsage the fix looks good. The blueprint I gave in 396 resizes correctly after rebind. 
    
    In the comments on the issue you wrote that "I presume the solution will be to improve what we store in the `origConfigs` (e.g. so that the sub-machines don't inherit it)." Is `origConfigs` doing the right thing? Or have we side-stepped it?


---
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-server issue #444: BROOKLYN-396: test and fix

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

    https://github.com/apache/brooklyn-server/pull/444
  
    @sjcorbett this change ensures the `origConfigs` has the right thing.
    
    The intent of `origConfigs` is to remember the state of the location from before we returned it, so if a BYON gets it back and then gives it out again, it can reset the config to what it was originally. This means that `origConfigs` is a map from `MachineLocation` instance to its config map.
    



---
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.
---