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 2017/07/25 16:32:08 UTC

[GitHub] brooklyn-server pull request #778: Adds ���deploymentUid���

GitHub user aledsage opened a pull request:

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

    Adds ‘deploymentUid’

    As discussed on the mailing list: https://lists.apache.org/thread.html/8eb58818d3ba50cfa5d5111363258cfe8529a76d17d45dc01823e0ba@%3Cdev.brooklyn.apache.org%3E
    
    This PR adds support for deploying YAML apps via the rest api, to include `&deploymentUid=...`. This gets turned into a config key named `org.apache.brooklyn.deploymentUid` set on the app being deployed.
    
    If there is already an app in existence with that deploymentUid, then the deployment fails (*before* creating the entity).
    
    ---
    An alternative (simpler) implementation would be to allow the internal entity-id to be specified via such a query parameter. There is already code to fail-fast if an entity with a given id already exists.
    
    However, we removed (the deprecated) support for supplying the entity id in the `EntitySpec`. We'd presumably have to add that back in (perhaps as "internal", somehow, rather than on the main `EntitySpec` class).

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

    $ git pull https://github.com/aledsage/brooklyn-server adds-deploymentUid

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

    https://github.com/apache/brooklyn-server/pull/778.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 #778
    
----
commit 7a32e94edaddf3ba6c8616d4af8cb6b2930797ab
Author: Aled Sage <al...@gmail.com>
Date:   2017-07-25T16:25:31Z

    Adds ‘deploymentUid’

----


---
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 #778: [WIP] Adds ���deploymentUid���

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

    https://github.com/apache/brooklyn-server/pull/778
  
    Replaced by https://github.com/apache/brooklyn-server/pull/782


---
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 #778: [WIP] Adds ���deploymentUid���

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

    https://github.com/apache/brooklyn-server/pull/778
  
    Note the test failures are real, e.g.:
    ```
    java.lang.UnsupportedOperationException: Call to 'config[]' not permitted on read-only entity Application[41jsve4k]
    	at org.apache.brooklyn.core.objs.proxy.EntityProxyImpl.invoke(EntityProxyImpl.java:198)
    	at com.sun.proxy.$Proxy18.config(Unknown Source)
    	at org.apache.brooklyn.core.mgmt.internal.LocalEntityManager.tryGetDeploymentUid(LocalEntityManager.java:899)
    	at org.apache.brooklyn.core.mgmt.internal.LocalEntityManager.unmanage(LocalEntityManager.java:449)
    	at org.apache.brooklyn.core.mgmt.internal.LocalEntityManager.unmanage(LocalEntityManager.java:443)
    	at org.apache.brooklyn.core.mgmt.ha.HighAvailabilityManagerImpl.clearManagedItems(HighAvailabilityManagerImpl.java:923)
    	at org.apache.brooklyn.core.mgmt.ha.HighAvailabilityManagerImpl.setInternalNodeState(HighAvailabilityManagerImpl.java:529)
    	at org.apache.brooklyn.core.mgmt.ha.HighAvailabilityManagerImpl.stop(HighAvailabilityManagerImpl.java:489)
    	at org.apache.brooklyn.core.mgmt.ha.HighAvailabilityManagerImpl.stop(HighAvailabilityManagerImpl.java:482)
    	at org.apache.brooklyn.core.mgmt.ha.HotStandbyTest$HaMgmtNode.tearDownThisOnly(HotStandbyTest.java:116)
    	at org.apache.brooklyn.core.mgmt.ha.HotStandbyTest$HaMgmtNode.tearDownAll(HotStandbyTest.java:122)
    	at org.apache.brooklyn.core.mgmt.ha.HotStandbyTest.tearDown(HotStandbyTest.java:154)
    ```
    It is now trying to look up the "deploymentUid" config-key on a standby node, which is failing.
    
    If folk think this PR is the right direction, then I'll fix those.
    
    But if people think `&appId=...` is the simpler (and better) way to go, then I'll be closing this PR!


---
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 #778: [WIP] Adds ���deploymentUid���

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

    https://github.com/apache/brooklyn-server/pull/778
  
    Closing this PR - consensus on the mailing list is that we'll instead support setting the app-id. I'll work on that and submit a new PR.


---
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 #778: [WIP] Adds ���deploymentUid���

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

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


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