Jenkins build is back to normal : brooklyn-library-master #244

2017-04-11 Thread Apache Jenkins Server
See 



Jenkins build is back to stable : brooklyn-master-build #1027

2017-04-11 Thread Apache Jenkins Server
See 



[GitHub] brooklyn-server issue #616: Fixed BlobStoreContextFactoryImpl. It can now ha...

2017-04-11 Thread aledsage
Github user aledsage commented on the issue:

https://github.com/apache/brooklyn-server/pull/616
  
@sjcorbett oops, I didn't realise it was in use. In hindsight, it's 
understandable that power-users in downstream projects would implement this so 
they can get the exact (configuration of) `BlobStoreContext` that they need.

Other than the hassle of updating your impl, do the changes here make 
things particularly difficult for you?


---
I previously had in my head that we'd really only have two impls: the 
`BlobStoreContextFactoryImpl` and a stub test impl for unit testing (which 
isn't written yet).

That's how `ComputeServiceRegistry` is used, I believe (but who knows what 
folk have done in their downstream projects!).

I hope that `BlobStoreContextFactoryImpl` can become configurable enough 
that folk don't need to create their own implementations, but maybe that's 
unrealistic.


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


[GitHub] brooklyn-server pull request #631: Fix itest for running backgrounded

2017-04-11 Thread aledsage
GitHub user aledsage opened a pull request:

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

Fix itest for running backgrounded

Without this, if you run:
```
nohup mvn clean install ... < /dev/null &
```
then your background process is stopped (according to `jobs`). When you 
foreground the process again (via `fg %1`) then it reports the tests have 
failed with the errors below:
```
22:12:34.027 [main] DEBUG o.o.p.e.k.c.i.KarafTestContainer - Shutting down 
the test container (Pax Runner)
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1,175.983 
sec <<< FAILURE! - in org.apache.brooklyn.karaf.itests.FeatureInstallationTest
org.apache.brooklyn.karaf.itests.FeatureInstallationTest  Time elapsed: 
1,175.981 sec  <<< ERROR!
java.lang.RuntimeException: Cannot get the remote bundle context
at 
org.ops4j.pax.exam.rbc.client.intern.RemoteBundleContextClientImpl.getRemoteBundleContext(RemoteBundleContextClientImpl.java:255)
at 
org.ops4j.pax.exam.rbc.client.intern.RemoteBundleContextClientImpl.waitForState(RemoteBundleContextClientImpl.java:211)
at 
org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.waitForState(KarafTestContainer.java:580)
at 
org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.startKaraf(KarafTestContainer.java:230)
at 
org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.start(KarafTestContainer.java:180)
at 
org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.setUp(EagerSingleStagedReactor.java:86)
at 
org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.beforeClass(EagerSingleStagedReactor.java:136)
at 
org.ops4j.pax.exam.spi.reactors.ReactorManager.beforeClass(ReactorManager.java:448)
at 
org.ops4j.pax.exam.junit.impl.ProbeRunner.run(ProbeRunner.java:97)
at org.ops4j.pax.exam.junit.PaxExam.run(PaxExam.java:93)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.rmi.NotBoundException: f39a285c-00da-49bc-b968-111ec37756be
at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:209)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at 
sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:450)
at 
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
at 
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:379)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at 
org.ops4j.pax.exam.rbc.client.intern.RemoteBundleContextClientImpl.getRemoteBundleContext(RemoteBundleContextClientImpl.java:242)
at 
org.ops4j.pax.exam.rbc.client.intern.RemoteBundleContextClientImpl.waitForState(RemoteBundleContextClientImpl.java:211)
at 
org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.waitForState(KarafTestContainer.java:580)
at 
org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.startKaraf(KarafTestContainer.java:230)
at 

Jenkins build is back to stable : brooklyn-server-master #528

2017-04-11 Thread Apache Jenkins Server
See 




[GitHub] brooklyn-server pull request #629: Fix itests

2017-04-11 Thread asfgit
Github user asfgit closed the pull request at:

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


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


[GitHub] brooklyn-server issue #629: Fix itests

2017-04-11 Thread rdowner
Github user rdowner commented on the issue:

https://github.com/apache/brooklyn-server/pull/629
  
Code looks good and Jenkins says OK - proceeding to merge


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


[GitHub] brooklyn-library pull request #96: LICENSE updates

2017-04-11 Thread rdowner
GitHub user rdowner opened a pull request:

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

LICENSE updates



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

$ git pull https://github.com/rdowner/brooklyn-library license-update

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

https://github.com/apache/brooklyn-library/pull/96.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 #96


commit 753a6c6ab1e79025a22d6a521ae6f8cb7f3cd447
Author: Richard Downer 
Date:   2017-04-11T20:09:51Z

LICENSE updates




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


[GitHub] brooklyn-docs pull request #167: LICENSE updates

2017-04-11 Thread rdowner
GitHub user rdowner opened a pull request:

https://github.com/apache/brooklyn-docs/pull/167

LICENSE updates



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

$ git pull https://github.com/rdowner/brooklyn-docs license-update

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

https://github.com/apache/brooklyn-docs/pull/167.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 #167






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


[GitHub] brooklyn-dist pull request #90: LICENSE updates

2017-04-11 Thread rdowner
GitHub user rdowner opened a pull request:

https://github.com/apache/brooklyn-dist/pull/90

LICENSE updates



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

$ git pull https://github.com/rdowner/brooklyn-dist license-update

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

https://github.com/apache/brooklyn-dist/pull/90.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 #90


commit f89148a16ecb36080b1b71feb9d2c3115fd6ddc5
Author: Richard Downer 
Date:   2017-04-11T20:09:13Z

LICENSE updates




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


[GitHub] brooklyn pull request #10: LICENSE updates

2017-04-11 Thread rdowner
GitHub user rdowner opened a pull request:

https://github.com/apache/brooklyn/pull/10

LICENSE updates



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

$ git pull https://github.com/rdowner/brooklyn license-update

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

https://github.com/apache/brooklyn/pull/10.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 #10


commit cc6e8cfc13e98f0cbab05a806588b506b20a6d8c
Author: Richard Downer 
Date:   2017-04-11T20:10:27Z

LICENSE updates




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


[GitHub] brooklyn-server pull request #629: Fix itests

2017-04-11 Thread aledsage
GitHub user aledsage opened a pull request:

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

Fix itests

Without these fixes, it fails if the local .m2 doesn't already have the 
pre-built artifacts it needs.

For example, the command below fails if your local .m2 is empty. I think 
this is important for being able to build RCs cleanly, rather than it relying 
on finding existing artifacts on the file system.
```
mvn clean install 
-Dmaven.repo.local=/Users/aledsage/temp/mvn-repo-for-itest-testing
```
The failures were:
```
  FeatureInstallationTest.testBrooklynApiFeature » Multi Error
  FeatureInstallationTest.testBrooklynCoreFeature » Multi Error
  FeatureInstallationTest.testBrooklynLocationsJcloudsFeature » Multi Error
```
with errors like:
```
2017-04-11 19:53:22,005 | WARN  | pool-28-thread-1 | AetherBasedResolver
  | 7 - org.ops4j.pax.url.mvn - 2.5.2 | Error resolving artifact 
org.apache.brooklyn:brooklyn-api:jar:0.11
.0: [Could not find artifact org.apache.brooklyn:brooklyn-api:jar:0.11.0 in 
central (http://repo1.maven.org/maven2/), Could not find artifact 
org.apache.brooklyn:brooklyn-api:jar:0.11.0 in s
pring.ebr.release 
(http://repository.springsource.com/maven/bundles/release/), Could not find 
artifact org.apache.brooklyn:brooklyn-api:jar:0.11.0 in spring.ebr.external 
(http://repository.s
pringsource.com/maven/bundles/external/), Could not find artifact 
org.apache.brooklyn:brooklyn-api:jar:0.11.0 in gemini 
(http://zodiac.springsource.com/maven/bundles/release/), Could not fin
d artifact org.apache.brooklyn:brooklyn-api:jar:0.11.0 in local 
(file:/Users/aledsage/repos/apache/brooklyn/brooklyn-server/karaf/itests/target/features-repo@releases/)]
java.io.IOException: Error resolving artifact 
org.apache.brooklyn:brooklyn-api:jar:0.11.0: [Could not find artifact 
org.apache.brooklyn:brooklyn-api:jar:0.11.0 in central (http://repo1.maven
.org/maven2/), Could not find artifact 
org.apache.brooklyn:brooklyn-api:jar:0.11.0 in spring.ebr.release 
(http://repository.springsource.com/maven/bundles/release/), Could not find 
artifact 
org.apache.brooklyn:brooklyn-api:jar:0.11.0 in spring.ebr.external 
(http://repository.springsource.com/maven/bundles/external/), Could not find 
artifact org.apache.brooklyn:brooklyn-api:jar:
0.11.0 in gemini (http://zodiac.springsource.com/maven/bundles/release/), 
Could not find artifact org.apache.brooklyn:brooklyn-api:jar:0.11.0 in local 
(file:/Users/aledsage/repos/apache/broo
klyn/brooklyn-server/karaf/itests/target/features-repo@releases/)]
```

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

$ git pull https://github.com/aledsage/brooklyn-server fix-itests

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

https://github.com/apache/brooklyn-server/pull/629.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 #629


commit afcaa46287382ab46c5bfc997f71894bdd4c808e
Author: Aled Sage 
Date:   2017-04-11T19:30:18Z

Fix FeatureInstallationTest#testBrooklynLocationsJcloudsFeature

It needs to find `brooklyn-locations-jclouds` bundles, so make sure they 
are in the `target/features-repo`

commit f50256418d2f4c9d0a9e82048a6035afb50b3b1c
Author: Aled Sage 
Date:   2017-04-11T19:31:34Z

Fix FeatureInstallationTest’s features-repo

“@releases” is not a valid option - it creates an empty  directory with 
the suffix “@releases” if the artefacts can’t be found in the other 
repos (e.g. in ~/.m2/repository).




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


[GitHub] brooklyn-server issue #616: Fixed BlobStoreContextFactoryImpl. It can now ha...

2017-04-11 Thread sjcorbett
Github user sjcorbett commented on the issue:

https://github.com/apache/brooklyn-server/pull/616
  
@aledsage Why should `BlobStoreContextFactory` be regarded as an internal 
interface? It's already being used in a downstream project that this PR has 
broken. Should the project use something else?


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


Jenkins build became unstable: brooklyn-server-master #527

2017-04-11 Thread Apache Jenkins Server
See 




[GitHub] brooklyn-library pull request #76: Tweak to password change effector so that...

2017-04-11 Thread m4rkmckenna
Github user m4rkmckenna closed the pull request at:

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


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


ANNOUNCE: Release in progress - `master` version bumped to 0.12.0-SNAPSHOT

2017-04-11 Thread Richard Downer
All,

As suggested yesterday, a release has been started.

`master` has been bumped to 0.12.0-SNAPSHOT, where development can continue
as normal.

`0.11.x` is the release branch where 0.11.0 will be made. Please do not
make any commits to this branch without consulting the RM (me).

This applies to all repositories.

Expect artifacts for 0.11.0-rc1 to land tomorrow UK time!

Richard.


Build failed in Jenkins: brooklyn-library-master #243

2017-04-11 Thread Apache Jenkins Server
See 


Changes:

[richard] Bump version to 0.12.0-SNAPSHOT

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on qnode1 (ubuntu) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/brooklyn-library.git # timeout=10
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/brooklyn-library.git
 > git --version # timeout=10
 > git fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/brooklyn-library.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision 9da1317177ff6eb5f0bd2c7f46ed70144fc9a458 (origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 9da1317177ff6eb5f0bd2c7f46ed70144fc9a458
 > git rev-list 8dfcb5eafd78245e8d20c68b9e9d2f107f12cb54 # timeout=10
Parsing POMs
Failed to transfer Could not find metadata 
org.apache.brooklyn:brooklyn-parent:0.12.0-SNAPSHOT/maven-metadata.xml in Nexus 
(http://repository.apache.org/snapshots)
Failed to transfer Could not find artifact 
org.apache.brooklyn:brooklyn-parent:pom:0.12.0-SNAPSHOT in Nexus 
(http://repository.apache.org/snapshots)
ERROR: Failed to parse POMs
java.io.IOException: remote file operation failed: 
 at 
hudson.remoting.Channel@4ecaa398:qnode1: hudson.remoting.ProxyException: 
hudson.maven.MavenModuleSetBuild$MavenExecutionException: 
org.apache.maven.project.ProjectBuildingException: Some problems were 
encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact 
org.apache.brooklyn:brooklyn-parent:pom:0.12.0-SNAPSHOT in Nexus 
(http://repository.apache.org/snapshots) and 'parent.relativePath' points at 
wrong local POM @ line 24, column 13

at hudson.FilePath.act(FilePath.java:992)
at hudson.FilePath.act(FilePath.java:974)
at 
hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:980)
at 
hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:692)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: hudson.remoting.ProxyException: 
hudson.maven.MavenModuleSetBuild$MavenExecutionException: 
org.apache.maven.project.ProjectBuildingException: Some problems were 
encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact 
org.apache.brooklyn:brooklyn-parent:pom:0.12.0-SNAPSHOT in Nexus 
(http://repository.apache.org/snapshots) and 'parent.relativePath' points at 
wrong local POM @ line 24, column 13

at 
hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1384)
at 
hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1118)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at ..remote call to qnode1(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:822)
at hudson.FilePath.act(FilePath.java:985)
... 8 more
Caused by: hudson.remoting.ProxyException: 
org.apache.maven.project.ProjectBuildingException: Some problems were 
encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact 
org.apache.brooklyn:brooklyn-parent:pom:0.12.0-SNAPSHOT in Nexus 
(http://repository.apache.org/snapshots) and 'parent.relativePath' points at 
wrong local POM @ line 24, column 13

at 
org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:364)
at 

[GitHub] brooklyn-server issue #617: Persist management plane ID

2017-04-11 Thread neykov
Github user neykov commented on the issue:

https://github.com/apache/brooklyn-server/pull/617
  
Thanks @aledsage addressed the comments.

> I'd be interested if this has highlighted any areas of Brooklyn that we 
should improve, 
There's definitely room for improvement around HA + persistence. One 
example is we could clean up  the code around that's responsible for starting 
persistence/HA in the various cases (ha, noha * persistence, no persistence 
matrix). It's something I had to replicate in the [test - see 
TODO](https://github.com/apache/brooklyn-server/pull/617/files#diff-37574fbba472cb8c35ca723a3118ed93R268).
 All interactions should go through `HighAvailabilityManager` enabled or not.




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


Build failed in Jenkins: brooklyn-client-master #43

2017-04-11 Thread Apache Jenkins Server
See 


Changes:

[richard] Bump version to 0.12.0-SNAPSHOT

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on H15 (ubuntu xenial) in workspace 

Cloning the remote Git repository
Cloning repository https://git-wip-us.apache.org/repos/asf/brooklyn-client.git
 > git init  # 
 > timeout=10
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/brooklyn-client.git
 > git --version # timeout=10
 > git fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/brooklyn-client.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/brooklyn-client.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/brooklyn-client.git # timeout=10
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/brooklyn-client.git
 > git fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/brooklyn-client.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision 3a45f81c2cf7f04535b65dd640464742933ca58f (origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 3a45f81c2cf7f04535b65dd640464742933ca58f
 > git rev-list df47be800589a8c091356cea5643783f745802e8 # timeout=10
Parsing POMs
Failed to transfer Could not find metadata 
org.apache.brooklyn:brooklyn-parent:0.12.0-SNAPSHOT/maven-metadata.xml in Nexus 
(http://repository.apache.org/snapshots)
Failed to transfer Could not find artifact 
org.apache.brooklyn:brooklyn-parent:pom:0.12.0-SNAPSHOT in Nexus 
(http://repository.apache.org/snapshots)
ERROR: Failed to parse POMs
java.io.IOException: remote file operation failed: 
 at 
hudson.remoting.Channel@1469940e:H15: hudson.remoting.ProxyException: 
hudson.maven.MavenModuleSetBuild$MavenExecutionException: 
org.apache.maven.project.ProjectBuildingException: Some problems were 
encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact 
org.apache.brooklyn:brooklyn-parent:pom:0.12.0-SNAPSHOT in Nexus 
(http://repository.apache.org/snapshots) and 'parent.relativePath' points at 
wrong local POM @ line 24, column 13

at hudson.FilePath.act(FilePath.java:992)
at hudson.FilePath.act(FilePath.java:974)
at 
hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:980)
at 
hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:692)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: hudson.remoting.ProxyException: 
hudson.maven.MavenModuleSetBuild$MavenExecutionException: 
org.apache.maven.project.ProjectBuildingException: Some problems were 
encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact 
org.apache.brooklyn:brooklyn-parent:pom:0.12.0-SNAPSHOT in Nexus 
(http://repository.apache.org/snapshots) and 'parent.relativePath' points at 
wrong local POM @ line 24, column 13

at 
hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1384)
at 
hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1118)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at ..remote call to H15(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:822)
at hudson.FilePath.act(FilePath.java:985)
... 8 more
Caused by: hudson.remoting.ProxyException: 

Build failed in Jenkins: brooklyn-dist-master #92

2017-04-11 Thread Apache Jenkins Server
See 


Changes:

[richard] Bump version to 0.12.0-SNAPSHOT

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on ubuntu-4 (ubuntu trusty) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/brooklyn-dist.git # timeout=10
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/brooklyn-dist.git
 > git --version # timeout=10
 > git fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/brooklyn-dist.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision dc5b609d8899d12b8547b732107ec323428f5789 (origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f dc5b609d8899d12b8547b732107ec323428f5789
 > git rev-list d2cd2df967bfa6b0f6b24ff1ee63c90e80168e68 # timeout=10
Parsing POMs
Failed to transfer Could not find metadata 
org.apache.brooklyn:brooklyn-parent:0.12.0-SNAPSHOT/maven-metadata.xml in Nexus 
(http://repository.apache.org/snapshots)
Failed to transfer Could not find artifact 
org.apache.brooklyn:brooklyn-parent:pom:0.12.0-SNAPSHOT in Nexus 
(http://repository.apache.org/snapshots)
ERROR: Failed to parse POMs
java.io.IOException: remote file operation failed: 
 at 
hudson.remoting.Channel@562a42bd:ubuntu-4: hudson.remoting.ProxyException: 
hudson.maven.MavenModuleSetBuild$MavenExecutionException: 
org.apache.maven.project.ProjectBuildingException: Some problems were 
encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact 
org.apache.brooklyn:brooklyn-parent:pom:0.12.0-SNAPSHOT in Nexus 
(http://repository.apache.org/snapshots) and 'parent.relativePath' points at 
wrong local POM @ line 24, column 13

at hudson.FilePath.act(FilePath.java:992)
at hudson.FilePath.act(FilePath.java:974)
at 
hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:980)
at 
hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:692)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1728)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: hudson.remoting.ProxyException: 
hudson.maven.MavenModuleSetBuild$MavenExecutionException: 
org.apache.maven.project.ProjectBuildingException: Some problems were 
encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact 
org.apache.brooklyn:brooklyn-parent:pom:0.12.0-SNAPSHOT in Nexus 
(http://repository.apache.org/snapshots) and 'parent.relativePath' points at 
wrong local POM @ line 24, column 13

at 
hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1384)
at 
hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1118)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731)
at hudson.remoting.UserRequest.perform(UserRequest.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:336)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at ..remote call to ubuntu-4(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
at hudson.remoting.Channel.call(Channel.java:822)
at hudson.FilePath.act(FilePath.java:985)
... 8 more
Caused by: hudson.remoting.ProxyException: 
org.apache.maven.project.ProjectBuildingException: Some problems were 
encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact 
org.apache.brooklyn:brooklyn-parent:pom:0.12.0-SNAPSHOT in Nexus 
(http://repository.apache.org/snapshots) and 'parent.relativePath' points at 
wrong local POM @ line 24, column 13

at 
org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:364)
at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:361)
  

[GitHub] brooklyn-server pull request #617: Persist management plane ID

2017-04-11 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/617#discussion_r110929027
  
--- Diff: 
core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/ManagementPlaneIdTest.java
 ---
@@ -0,0 +1,247 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.brooklyn.core.mgmt.rebind;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNotEquals;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.concurrent.Callable;
+
+import org.apache.brooklyn.api.mgmt.ManagementContext;
+import org.apache.brooklyn.api.mgmt.ha.HighAvailabilityMode;
+import org.apache.brooklyn.api.mgmt.ha.ManagementNodeState;
+import org.apache.brooklyn.core.entity.Entities;
+import org.apache.brooklyn.core.internal.BrooklynProperties;
+import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
+import 
org.apache.brooklyn.core.mgmt.persist.BrooklynMementoPersisterToObjectStore;
+import org.apache.brooklyn.core.mgmt.persist.FileBasedObjectStore;
+import org.apache.brooklyn.core.mgmt.persist.PersistMode;
+import org.apache.brooklyn.core.server.BrooklynServerConfig;
+import org.apache.brooklyn.core.server.BrooklynServerPaths;
+import org.apache.brooklyn.test.Asserts;
+import org.apache.brooklyn.util.os.Os;
+import org.apache.brooklyn.util.text.Strings;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+public class ManagementPlaneIdTest {
+private File mementoDir;
+
+protected ClassLoader classLoader = getClass().getClassLoader();
+
+private Collection managementContextForTermination;
+
+@BeforeMethod
+public void setUp() {
+mementoDir = Os.newTempDir(getClass());
+managementContextForTermination = new ArrayList<>();
+}
+
+@AfterMethod(alwaysRun=true)
+public void tearDown() throws Exception {
+if (managementContextForTermination != null) {
+for (ManagementContext mgmt : managementContextForTermination) 
{
+Entities.destroyAll(mgmt);
+}
+}
+if (mementoDir != null) 
FileBasedObjectStore.deleteCompletely(mementoDir);
+}
+
+@Test
+public void testUninitializedThrows() {
+ManagementContext mgmt = new 
LocalManagementContext(BrooklynProperties.Factory.newEmpty());
+assertFalse(mgmt.getOptionalManagementPlaneId().isPresent(), 
"expected managementPlaneId to be absent");
+}
+
+@Test
+public void testPlaneIdPersists() throws Exception {
+final ManagementContext mgmt = 
createManagementContext(PersistMode.AUTO, HighAvailabilityMode.DISABLED);
+checkPlaneIdPersisted(mgmt);
+}
+
+@Test(enabled=false) //Need to wait for 1hr to verify the update will 
not overwrite
--- End diff --

Reversed the test to verify that the local planeId is "fixed" by the 
persisted state so it's quick 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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #617: Persist management plane ID

2017-04-11 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/617#discussion_r110928904
  
--- Diff: 
core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/ManagementPlaneIdTest.java
 ---
@@ -0,0 +1,247 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.brooklyn.core.mgmt.rebind;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNotEquals;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.concurrent.Callable;
+
+import org.apache.brooklyn.api.mgmt.ManagementContext;
+import org.apache.brooklyn.api.mgmt.ha.HighAvailabilityMode;
+import org.apache.brooklyn.api.mgmt.ha.ManagementNodeState;
+import org.apache.brooklyn.core.entity.Entities;
+import org.apache.brooklyn.core.internal.BrooklynProperties;
+import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
+import 
org.apache.brooklyn.core.mgmt.persist.BrooklynMementoPersisterToObjectStore;
+import org.apache.brooklyn.core.mgmt.persist.FileBasedObjectStore;
+import org.apache.brooklyn.core.mgmt.persist.PersistMode;
+import org.apache.brooklyn.core.server.BrooklynServerConfig;
+import org.apache.brooklyn.core.server.BrooklynServerPaths;
+import org.apache.brooklyn.test.Asserts;
+import org.apache.brooklyn.util.os.Os;
+import org.apache.brooklyn.util.text.Strings;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+public class ManagementPlaneIdTest {
--- End diff --

That's how the test started, but I needed some functionality which wasn't 
available in `RebindTestFixture` (can't remember the details 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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-server pull request #617: Persist management plane ID

2017-04-11 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/617#discussion_r110928608
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java ---
@@ -467,6 +469,15 @@ protected void instantiateMementos() throws 
IOException {
 memento = persistenceStoreAccess.loadMemento(mementoRawData, 
rebindContext.lookup(), exceptionHandler);
 }
 
+protected void initPlaneId() {
+String persistedPlaneId = mementoRawData.getPlaneId();
+if (persistedPlaneId == null) {
+
((LocalManagementContext)managementContext).generateManagementPlaneId();
--- End diff --

Added a warning here if there's already existing state, but no planeId.


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


[GitHub] brooklyn-server pull request #617: Persist management plane ID

2017-04-11 Thread neykov
Github user neykov commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/617#discussion_r110928407
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynMementoPersisterToObjectStore.java
 ---
@@ -674,6 +685,22 @@ private void delete(String subPath, String id, 
PersistenceExceptionHandler excep
 }
 }
 
+private void updatePlaneId(String planeId, PersistenceExceptionHandler 
exceptionHandler) {
+try {
+if (planeId==null) {
+LOG.warn("Null content for planeId");
+}
+
+String persistedPlaneId = read(PLANE_ID_FILE_NAME);
+if (persistedPlaneId != null && 
!persistedPlaneId.equals(planeId)) {
+throw new IllegalStateException("Persisted planeId found 
(" + persistedPlaneId + ") but instance planeId is different (" + planeId + 
")");
+}
+getWriter(PLANE_ID_FILE_NAME).put(planeId);
--- End diff --

+1


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


[GitHub] brooklyn-server issue #608: `BundleMaker` REST call allowing to add ZIP/JAR ...

2017-04-11 Thread ahgittin
Github user ahgittin commented on the issue:

https://github.com/apache/brooklyn-server/pull/608
  
Thanks for polishing this off @tbouron !


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


[GitHub] brooklyn-server pull request #628: Allow setting random number generator see...

2017-04-11 Thread asfgit
Github user asfgit closed the pull request at:

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


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


[GitHub] brooklyn-server pull request #546: Sequencer entity

2017-04-11 Thread asfgit
Github user asfgit closed the pull request at:

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


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


Build failed in Jenkins: brooklyn-master-build #1019

2017-04-11 Thread Apache Jenkins Server
See 

--
Failed to access build log

java.io.IOException: remote file operation failed: 
/home/jenkins/jenkins-slave/workspace/brooklyn-master-build at 
hudson.remoting.Channel@15aea76b:ubuntu-eu2: 
hudson.remoting.ChannelClosedException: channel is already closed
at hudson.FilePath.act(FilePath.java:992)
at hudson.FilePath.act(FilePath.java:974)
at hudson.FilePath.toURI(FilePath.java:1119)
at hudson.tasks.MailSender.createFailureMail(MailSender.java:318)
at hudson.tasks.MailSender.createMail(MailSender.java:179)
at hudson.tasks.MailSender.run(MailSender.java:110)
at hudson.tasks.Mailer.perform(Mailer.java:170)
at 
hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
at 
hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1067)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1753)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: hudson.remoting.ChannelClosedException: channel is already closed
at hudson.remoting.Channel.send(Channel.java:604)
at hudson.remoting.Request.call(Request.java:130)
at hudson.remoting.Channel.call(Channel.java:821)
at hudson.FilePath.act(FilePath.java:985)
... 16 more
Caused by: java.io.IOException
at hudson.remoting.Channel.close(Channel.java:1284)
at hudson.slaves.ChannelPinger$1.onDead(ChannelPinger.java:115)
at hudson.remoting.PingThread.ping(PingThread.java:130)
at hudson.remoting.PingThread.run(PingThread.java:86)
Caused by: java.util.concurrent.TimeoutException: Ping started at 1491915931432 
hasn't completed by 1491916171433
... 2 more


[jira] [Commented] (BROOKLYN-462) Invalid icon for "server" entity

2017-04-11 Thread Svetoslav Neykov (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964397#comment-15964397
 ] 

Svetoslav Neykov commented on BROOKLYN-462:
---

Corresponding HTML:
{noformat}





  
{noformat}

Request for {{/v1/applications/o7omc1vvto/entities/u2k72k4ats/icon}} returns 
status code 500 with a response body:
{noformat}
{"message":"Error getting resource 'classpath://brooklyn/icons/server.svg' for 
AggregateClassLoader[AggregateClassLoader[org.apache.brooklyn.core [120], 
AggregateClassLoader[], AggregateClassLoader[]]]: IOException: Error accessing 
classpath://brooklyn/icons/server.svg: java.io.IOException: 
brooklyn/icons/server.svg not found on 
classpath","details":"org.apache.brooklyn.util.exceptions.PropagatedRuntimeException:
 Error getting resource 'classpath://brooklyn/icons/server.svg' for 
AggregateClassLoader[AggregateClassLoader[org.apache.brooklyn.core [120], 
AggregateClassLoader[], AggregateClassLoader[]]]: IOException: Error accessing 
classpath://brooklyn/icons/server.svg: java.io.IOException: 
brooklyn/icons/server.svg not found on classpath\n\tat 
org.apache.brooklyn.util.exceptions.Exceptions.collapse(Exceptions.java:351)\n\tat
 
org.apache.brooklyn.util.exceptions.Exceptions.collapse(Exceptions.java:265)\n\tat
 
org.apache.brooklyn.util.exceptions.Exceptions.collapse(Exceptions.java:252)\n\tat
 
org.apache.brooklyn.rest.util.DefaultExceptionMapper.toResponse(DefaultExceptionMapper.java:117)\n\tat
 
org.apache.cxf.jaxrs.utils.ExceptionUtils.convertFaultToResponse(ExceptionUtils.java:86)\n\tat
 
org.apache.cxf.jaxrs.utils.JAXRSUtils.convertFaultToResponse(JAXRSUtils.java:1635)\n\tat
 org.apache.cxf.jaxrs.JAXRSInvoker.handleFault(JAXRSInvoker.java:331)\n\tat 
org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:203)\n\tat 
org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)\n\tat 
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)\n\tat
 
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)\n\tat
 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)\n\tat
 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)\n\tat
 
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:262)\n\tat
 
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)\n\tat
 
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)\n\tat
 
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)\n\tat
 
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)\n\tat
 
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:299)\n\tat
 
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:223)\n\tat
 javax.servlet.http.HttpServlet.service(HttpServlet.java:687)\n\tat 
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:274)\n\tat
 org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)\n\tat 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)\n\tat
 
org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)\n\tat
 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat
 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\n\tat
 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\n\tat
 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\n\tat
 
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)\n\tat
 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\n\tat 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat
 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\n\tat
 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat
 org.ops4j.pax.web.service.jetty.internal.JettyServerHandl
{noformat}

> Invalid icon for "server" entity
> 
>
> Key: BROOKLYN-462
> URL: https://issues.apache.org/jira/browse/BROOKLYN-462
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: Svetoslav Neykov
> Attachments: brooklyn462-classic-with-icon.png, Screen Shot 
> 2017-04-11 at 16.42.32.png
>
>
> Deploying the following bluepritn:
> {noformat}
> services:
> - type: server
> {noformat}
> results in broken icon in the left pane.



--
This message was sent by Atlassian JIRA

[jira] [Comment Edited] (BROOKLYN-462) Invalid icon for "server" entity

2017-04-11 Thread Svetoslav Neykov (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964386#comment-15964386
 ] 

Svetoslav Neykov edited comment on BROOKLYN-462 at 4/11/17 1:48 PM:


Thought we can't have attachments, here's what I see.
On current master, classic I see the icon. In the karaf build I see a broken 
icon.


was (Author: svet):
Thought we can't have attachments, here's what I see.
On current master, classic I see the icon. In the karaf build I see a broken 
icon.

> Invalid icon for "server" entity
> 
>
> Key: BROOKLYN-462
> URL: https://issues.apache.org/jira/browse/BROOKLYN-462
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: Svetoslav Neykov
> Attachments: brooklyn462-classic-with-icon.png, Screen Shot 
> 2017-04-11 at 16.42.32.png
>
>
> Deploying the following bluepritn:
> {noformat}
> services:
> - type: server
> {noformat}
> results in broken icon in the left pane.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (BROOKLYN-462) Invalid icon for "server" entity

2017-04-11 Thread Svetoslav Neykov (JIRA)

 [ 
https://issues.apache.org/jira/browse/BROOKLYN-462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Svetoslav Neykov updated BROOKLYN-462:
--
Attachment: Screen Shot 2017-04-11 at 16.42.32.png

> Invalid icon for "server" entity
> 
>
> Key: BROOKLYN-462
> URL: https://issues.apache.org/jira/browse/BROOKLYN-462
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: Svetoslav Neykov
> Attachments: brooklyn462-classic-with-icon.png, Screen Shot 
> 2017-04-11 at 16.42.32.png
>
>
> Deploying the following bluepritn:
> {noformat}
> services:
> - type: server
> {noformat}
> results in broken icon in the left pane.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (BROOKLYN-462) Invalid icon for "server" entity

2017-04-11 Thread Svetoslav Neykov (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964386#comment-15964386
 ] 

Svetoslav Neykov commented on BROOKLYN-462:
---

Thought we can't have attachments, here's what I see.
On current master, classic I see the icon. In the karaf build I see a broken 
icon.

> Invalid icon for "server" entity
> 
>
> Key: BROOKLYN-462
> URL: https://issues.apache.org/jira/browse/BROOKLYN-462
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: Svetoslav Neykov
> Attachments: brooklyn462-classic-with-icon.png, Screen Shot 
> 2017-04-11 at 16.42.32.png
>
>
> Deploying the following bluepritn:
> {noformat}
> services:
> - type: server
> {noformat}
> results in broken icon in the left pane.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] brooklyn-dist issue #89: Adds tests for OSGI loading of external config prov...

2017-04-11 Thread neykov
Github user neykov commented on the issue:

https://github.com/apache/brooklyn-dist/pull/89
  
LGTM. Will wait for a successful `brooklyn-server` CI build and then merge 
so build doesn't fail.


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


[GitHub] brooklyn-server pull request #625: Updates BasicExternalConfigSupplierRegist...

2017-04-11 Thread asfgit
Github user asfgit closed the pull request at:

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


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


[GitHub] brooklyn-server issue #625: Updates BasicExternalConfigSupplierRegistry to u...

2017-04-11 Thread neykov
Github user neykov commented on the issue:

https://github.com/apache/brooklyn-server/pull/625
  
LGTM, merging.


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


[GitHub] brooklyn-server pull request #628: Allow setting random number generator see...

2017-04-11 Thread grkvlt
GitHub user grkvlt opened a pull request:

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

Allow setting random number generator seed for identifiers

Define `brooklyn.experimental.feature.random_seed` with the value of the 
seed for the random number generator.

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

$ git pull https://github.com/grkvlt/brooklyn-server feature/random-seed

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

https://github.com/apache/brooklyn-server/pull/628.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 #628


commit b7244740fc6b75bdf3be4191a3ed99965eaab9bc
Author: Andrew Donald Kennedy 
Date:   2017-04-09T16:50:36Z

Allow setting random number generator seed for identifiers




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


[GitHub] brooklyn-server issue #625: Updates BasicExternalConfigSupplierRegistry to u...

2017-04-11 Thread nakomis
Github user nakomis commented on the issue:

https://github.com/apache/brooklyn-server/pull/625
  
Tests added at https://github.com/apache/brooklyn-dist/pull/89



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


[GitHub] brooklyn-dist pull request #89: Adds tests for OSGI loading of external conf...

2017-04-11 Thread nakomis
GitHub user nakomis opened a pull request:

https://github.com/apache/brooklyn-dist/pull/89

Adds tests for OSGI loading of external config providers



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

$ git pull https://github.com/nakomis/brooklyn-dist osgi-external-config

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

https://github.com/apache/brooklyn-dist/pull/89.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 #89


commit a95695be94a4a4004ec2154a8c5af6a39ec9bca6
Author: Martin Harris 
Date:   2017-04-11T12:48:27Z

Adds tests for OSGI loading of external config providers




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


[jira] [Commented] (BROOKLYN-443) 0.10.0 and 0.11.0 snapshot docs links 404'ing

2017-04-11 Thread Aled Sage (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964307#comment-15964307
 ] 

Aled Sage commented on BROOKLYN-443:


Fixed in https://github.com/apache/brooklyn-docs/pull/166 by removing the 
snapshot links! (But those changes won't go live automatically.)

> 0.10.0 and 0.11.0 snapshot docs links 404'ing
> -
>
> Key: BROOKLYN-443
> URL: https://issues.apache.org/jira/browse/BROOKLYN-443
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: John McCabe
>Priority: Minor
>
> Attempting to access the snapshot docs site for 0.10.0 or 0.11.0 results in a 
> 404.
> Browsing from -  https://brooklyn.apache.org/meta/versions.html
> Browsing to - https://brooklyn.apache.org/v/0.11.0-SNAPSHOT/, 
> https://brooklyn.apache.org/v/0.10.0-SNAPSHOT/
> Best,
> John



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (BROOKLYN-443) 0.10.0 and 0.11.0 snapshot docs links 404'ing

2017-04-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964305#comment-15964305
 ] 

ASF GitHub Bot commented on BROOKLYN-443:
-

Github user asfgit closed the pull request at:

https://github.com/apache/brooklyn-docs/pull/166


> 0.10.0 and 0.11.0 snapshot docs links 404'ing
> -
>
> Key: BROOKLYN-443
> URL: https://issues.apache.org/jira/browse/BROOKLYN-443
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: John McCabe
>Priority: Minor
>
> Attempting to access the snapshot docs site for 0.10.0 or 0.11.0 results in a 
> 404.
> Browsing from -  https://brooklyn.apache.org/meta/versions.html
> Browsing to - https://brooklyn.apache.org/v/0.11.0-SNAPSHOT/, 
> https://brooklyn.apache.org/v/0.10.0-SNAPSHOT/
> Best,
> John



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] brooklyn-docs pull request #166: Remove snapshot docs link

2017-04-11 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/brooklyn-docs/pull/166


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


[GitHub] brooklyn-docs issue #166: Remove snapshot docs link

2017-04-11 Thread aledsage
Github user aledsage commented on the issue:

https://github.com/apache/brooklyn-docs/pull/166
  
I agree. We must not encourage users to use a snapshot build, via the 
official docs. (We're not doing that - there are no snapshot download links, 
but as such the snapshot docs aren't useful for end-users.)

Merging.


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


[GitHub] brooklyn-server issue #300: Location DSL Updates

2017-04-11 Thread grkvlt
Github user grkvlt commented on the issue:

https://github.com/apache/brooklyn-server/pull/300
  
I am going to close this, as the `DslComponent` code has moved too much to 
merge, and I think @neykov's idea of a `DslLocation` might bea better way of 
handling this concept. Will revisit later.


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


[GitHub] brooklyn-server pull request #300: Location DSL Updates

2017-04-11 Thread grkvlt
Github user grkvlt closed the pull request at:

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


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


[jira] [Commented] (BROOKLYN-461) Condition that always return true

2017-04-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964225#comment-15964225
 ] 

ASF GitHub Bot commented on BROOKLYN-461:
-

Github user asfgit closed the pull request at:

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


> Condition that always return true
> -
>
> Key: BROOKLYN-461
> URL: https://issues.apache.org/jira/browse/BROOKLYN-461
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: JC
>Assignee: Aled Sage
>Priority: Trivial
>
> Hi
> In recent github mirror of broolyn-server, I've found the following issue in 
> equals implementation.
> Path: 
> utils/common/src/main/java/org/apache/brooklyn/util/collections/CollectionMerger.java
> {code}
> 196 
> 197 @Override
> 198 public boolean equals(Object o) {
> 199 if (!(o instanceof Ref)) {
> 200 return false;
> 201 }
> 202 return ((Ref)o).obj == ((Ref)o).obj;
> 203 }
> {code}
> Line 202 should be like this?
> {code}
> 202 return this.obj == ((Ref)o).obj;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] brooklyn-server pull request #626: BROOKLYN-461: fix CollectionMerger’s Re...

2017-04-11 Thread asfgit
Github user asfgit closed the pull request at:

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


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


[jira] [Commented] (BROOKLYN-446) Constructor ScheduledTask(Map, Task) is broken

2017-04-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964193#comment-15964193
 ] 

ASF GitHub Bot commented on BROOKLYN-446:
-

Github user asfgit closed the pull request at:

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


> Constructor ScheduledTask(Map, Task) is broken
> --
>
> Key: BROOKLYN-446
> URL: https://issues.apache.org/jira/browse/BROOKLYN-446
> Project: Brooklyn
>  Issue Type: Bug
>Affects Versions: 0.10.0
>Reporter: Svetoslav Neykov
>
> The resulting task is executed only once, not rescheduled.
> A test case to show the behaviour:
> {noformat}
> import static org.testng.Assert.assertTrue;
> import java.util.Map;
> import java.util.concurrent.atomic.AtomicInteger;
> import org.apache.brooklyn.api.mgmt.Task;
> import org.apache.brooklyn.core.test.BrooklynMgmtUnitTestSupport;
> import org.apache.brooklyn.test.Asserts;
> import org.apache.brooklyn.util.collections.MutableMap;
> import org.apache.brooklyn.util.time.Duration;
> import org.testng.annotations.Test;
> import com.google.common.collect.ImmutableMap;
> import com.google.common.util.concurrent.Runnables;
> public class ScheduledTaskTest extends BrooklynMgmtUnitTestSupport {
> /**
>  * Fails with:
>  * java.lang.UnsupportedOperationException
>  * at 
> com.google.common.collect.ImmutableMap.remove(ImmutableMap.java:338)
>  * at 
> org.apache.brooklyn.util.core.task.BasicTask.(BasicTask.java:115)
>  * at 
> org.apache.brooklyn.util.core.task.BasicTask.(BasicTask.java:107)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTask.(ScheduledTask.java:96)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTask.(ScheduledTask.java:88)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTaskTest.testImmutableFlags(ScheduledTaskTest.java:43)
>  */
> @Test
> public void testImmutableFlags() {
> Map flags = ImmutableMap.of(
> "period", Duration.ONE_SECOND,
> "delay", Duration.ONE_SECOND);
> Task task = new BasicTask<>(Runnables.doNothing());
> new ScheduledTask(flags, task);
> }
> /**
>  * Fails with:
>  * java.lang.AssertionError: failed succeeds-eventually, 69 attempts, 
> 30005ms elapsed: AssertionError: expected [true] but found [false]
>  * at 
> org.apache.brooklyn.test.Asserts.succeedsEventually(Asserts.java:1008)
>  * at 
> org.apache.brooklyn.test.Asserts.succeedsEventually(Asserts.java:895)
>  * at 
> org.apache.brooklyn.test.Asserts.succeedsEventually(Asserts.java:888)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTaskTest.testTaskConstructor(ScheduledTaskTest.java:60)
>  */
> @Test
> public void testTaskConstructor() {
> final AtomicInteger cnt = new AtomicInteger();
> Map flags = MutableMap.of(
> "period", Duration.ONE_SECOND,
> "delay", Duration.ONE_SECOND);
> Task task = new BasicTask<>(new Runnable() {
> @Override
> public void run() {
> cnt.incrementAndGet();
> }
> });
> ScheduledTask scheduledTask = new ScheduledTask(flags, task);
> mgmt.getExecutionManager().submit(scheduledTask);
> Asserts.succeedsEventually(new Runnable() {
> @Override
> public void run() {
> assertTrue(cnt.get() > 1);
> }
> });
> }
> }
> {noformat}
> The problem is that the task gets reused and on the second schedule attempt 
> it already has a future assigned so is not scheduled any more.
> The best solution seems to be to remove the constructor altogether. 
> Optionally providing a Runnable/Callable job constructor, wrapping the job in 
> a factory, returning a new task on each submission.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] brooklyn-server pull request #627: BROOKLYN-446: deprecate broken ScheduledT...

2017-04-11 Thread asfgit
Github user asfgit closed the pull request at:

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


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


[jira] [Commented] (BROOKLYN-446) Constructor ScheduledTask(Map, Task) is broken

2017-04-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964191#comment-15964191
 ] 

ASF GitHub Bot commented on BROOKLYN-446:
-

Github user neykov commented on the issue:

https://github.com/apache/brooklyn-server/pull/627
  
LGTM, merging. Thanks @aledsage.


> Constructor ScheduledTask(Map, Task) is broken
> --
>
> Key: BROOKLYN-446
> URL: https://issues.apache.org/jira/browse/BROOKLYN-446
> Project: Brooklyn
>  Issue Type: Bug
>Affects Versions: 0.10.0
>Reporter: Svetoslav Neykov
>
> The resulting task is executed only once, not rescheduled.
> A test case to show the behaviour:
> {noformat}
> import static org.testng.Assert.assertTrue;
> import java.util.Map;
> import java.util.concurrent.atomic.AtomicInteger;
> import org.apache.brooklyn.api.mgmt.Task;
> import org.apache.brooklyn.core.test.BrooklynMgmtUnitTestSupport;
> import org.apache.brooklyn.test.Asserts;
> import org.apache.brooklyn.util.collections.MutableMap;
> import org.apache.brooklyn.util.time.Duration;
> import org.testng.annotations.Test;
> import com.google.common.collect.ImmutableMap;
> import com.google.common.util.concurrent.Runnables;
> public class ScheduledTaskTest extends BrooklynMgmtUnitTestSupport {
> /**
>  * Fails with:
>  * java.lang.UnsupportedOperationException
>  * at 
> com.google.common.collect.ImmutableMap.remove(ImmutableMap.java:338)
>  * at 
> org.apache.brooklyn.util.core.task.BasicTask.(BasicTask.java:115)
>  * at 
> org.apache.brooklyn.util.core.task.BasicTask.(BasicTask.java:107)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTask.(ScheduledTask.java:96)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTask.(ScheduledTask.java:88)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTaskTest.testImmutableFlags(ScheduledTaskTest.java:43)
>  */
> @Test
> public void testImmutableFlags() {
> Map flags = ImmutableMap.of(
> "period", Duration.ONE_SECOND,
> "delay", Duration.ONE_SECOND);
> Task task = new BasicTask<>(Runnables.doNothing());
> new ScheduledTask(flags, task);
> }
> /**
>  * Fails with:
>  * java.lang.AssertionError: failed succeeds-eventually, 69 attempts, 
> 30005ms elapsed: AssertionError: expected [true] but found [false]
>  * at 
> org.apache.brooklyn.test.Asserts.succeedsEventually(Asserts.java:1008)
>  * at 
> org.apache.brooklyn.test.Asserts.succeedsEventually(Asserts.java:895)
>  * at 
> org.apache.brooklyn.test.Asserts.succeedsEventually(Asserts.java:888)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTaskTest.testTaskConstructor(ScheduledTaskTest.java:60)
>  */
> @Test
> public void testTaskConstructor() {
> final AtomicInteger cnt = new AtomicInteger();
> Map flags = MutableMap.of(
> "period", Duration.ONE_SECOND,
> "delay", Duration.ONE_SECOND);
> Task task = new BasicTask<>(new Runnable() {
> @Override
> public void run() {
> cnt.incrementAndGet();
> }
> });
> ScheduledTask scheduledTask = new ScheduledTask(flags, task);
> mgmt.getExecutionManager().submit(scheduledTask);
> Asserts.succeedsEventually(new Runnable() {
> @Override
> public void run() {
> assertTrue(cnt.get() > 1);
> }
> });
> }
> }
> {noformat}
> The problem is that the task gets reused and on the second schedule attempt 
> it already has a future assigned so is not scheduled any more.
> The best solution seems to be to remove the constructor altogether. 
> Optionally providing a Runnable/Callable job constructor, wrapping the job in 
> a factory, returning a new task on each submission.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] brooklyn-server issue #627: BROOKLYN-446: deprecate broken ScheduledTask con...

2017-04-11 Thread neykov
Github user neykov commented on the issue:

https://github.com/apache/brooklyn-server/pull/627
  
LGTM, merging. Thanks @aledsage.


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


[GitHub] brooklyn-server issue #168: [WIP] Configure JcloudsLocationCustomizer as an ...

2017-04-11 Thread grkvlt
Github user grkvlt commented on the issue:

https://github.com/apache/brooklyn-server/pull/168
  
Closing as replaced by #429 


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


[GitHub] brooklyn-server pull request #168: [WIP] Configure JcloudsLocationCustomizer...

2017-04-11 Thread grkvlt
Github user grkvlt closed the pull request at:

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


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


[GitHub] brooklyn-docs pull request #166: Remove snapshot docs link

2017-04-11 Thread drigodwin
GitHub user drigodwin opened a pull request:

https://github.com/apache/brooklyn-docs/pull/166

Remove snapshot docs link

Snapshot Versions links are defunct and not useful. I propose we remove 
them.

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

$ git pull https://github.com/drigodwin/brooklyn-docs remove-snapshot-links

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

https://github.com/apache/brooklyn-docs/pull/166.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 #166


commit 08e040bc3d68ae7a3846d0bec07251dce1504cf1
Author: Duncan Godwin 
Date:   2017-04-11T11:00:11Z

Remove snapshot docs link

Snapshot links are defunct and no longer useful




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


[jira] [Resolved] (BROOKLYN-433) YAML-based config constraint to support regex

2017-04-11 Thread Aled Sage (JIRA)

 [ 
https://issues.apache.org/jira/browse/BROOKLYN-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aled Sage resolved BROOKLYN-433.

   Resolution: Fixed
Fix Version/s: 0.11.0

> YAML-based config constraint to support regex
> -
>
> Key: BROOKLYN-433
> URL: https://issues.apache.org/jira/browse/BROOKLYN-433
> Project: Brooklyn
>  Issue Type: Improvement
>Affects Versions: 0.10.0
>Reporter: Aled Sage
>Assignee: Aled Sage
>Priority: Minor
> Fix For: 0.11.0
>
>
> One can specify constraints on a config key's value, to give a validation 
> error if an invalid value is supplied.
> In the Java code, this can be any predicate.
> However, in YAML we don't support many options. It would be good to support a 
> regex constraint. For example:
> {noformat}
> brooklyn.parameters:
> - name: address
>   type: string
>   constraints:
>   - required
>   - regex: ^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$
> {noformat}
> See docs at 
> https://raw.githubusercontent.com/apache/brooklyn-docs/master/guide/yaml/yaml-reference.md,
>  and code at 
> https://github.com/apache/brooklyn-server/blob/master/core/src/main/java/org/apache/brooklyn/core/objs/BasicSpecParameter.java#L204-L205



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (BROOKLYN-471) Catalog: Unhelpful error when DSL included in catalog metadata

2017-04-11 Thread Sam Corbett (JIRA)
Sam Corbett created BROOKLYN-471:


 Summary: Catalog: Unhelpful error when DSL included in catalog 
metadata
 Key: BROOKLYN-471
 URL: https://issues.apache.org/jira/browse/BROOKLYN-471
 Project: Brooklyn
  Issue Type: Sub-task
Reporter: Sam Corbett


The error message produced when catalog definitions contain unsupported DSL 
leaves a lot to be desired:

Catalog:
{code}
brooklyn.catalog:
  items:
  - a: $brooklyn:attributeWhenReady("hello")
{code}

Error on adding to the catalogue:
{code}
ERROR Error resolving {a=$brooklyn:attributeWhenReady("hello")}, in 
org.apache.brooklyn.util.core.task.BasicExecutionContext@71bdc498([LocalManagementContext[FMxnzCti-NgoQFf0H],
 BROOKLYN-SERVER]): Error resolving map value for key a, 
$brooklyn:attributeWhenReady("hello"), in 
org.apache.brooklyn.util.core.task.BasicExecutionContext@71bdc498([LocalManagementContext[FMxnzCti-NgoQFf0H],
 BROOKLYN-SERVER]): Context entity not available when trying to evaluate 
Brooklyn DSL
{code}

The error should be something simple like "DSL is not supported in catalog 
definitions," and optionally, "you wrote: 
$brooklyn:attributeWhenReady("hello")."



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (BROOKLYN-441) OpenStack deploy vm fails: get wrong loginUser

2017-04-11 Thread Aled Sage (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964145#comment-15964145
 ] 

Aled Sage commented on BROOKLYN-441:


This may or may not be a bug - I think we need a little more info.

Brooklyn will, by default, use jclouds to ssh to the newly provisioned VM using 
the {{loginUser}} (in your case "centos"). It will execute some setup commands, 
which includes creating a new user which is subsequently used by Brooklyn. The 
use that it creates is configured using something like {{user: brooklyn}}. If 
this isn't configured, it defaults to using the name of the user that is 
executing Brooklyn.

I'm guessing that you're running Brooklyn as the user "ubuntu" (I guess that 
based on your privateKeyFile path). I therefore speculate that it's created a 
user "ubuntu" on your new centos VM!

The fact that the log message is for ssh'ing with {{SshMachineLocation}} 
(rather than in jclouds code) makes me believe it has got past the initial 
login, and is now using newly created user for subsequent ssh commands. If that 
is the case, then this is not a bug.

Is your entity starting up ok, other than this log message?

There are many config options to control if/what user is created, and its 
configuration. For example, see 
https://github.com/apache/brooklyn-server/blob/master/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/CreateUserStatements.java

> OpenStack deploy vm fails: get wrong loginUser
> --
>
> Key: BROOKLYN-441
> URL: https://issues.apache.org/jira/browse/BROOKLYN-441
> Project: Brooklyn
>  Issue Type: Bug
>Affects Versions: 0.10.0
> Environment: brooklyn v0.10 openstack liberty
>Reporter: Nie Kun
>
> I am trying to launch a instance on openstack via brooklyn
> My yaml file was like below:
> {quote}
> name: test
> location:
>   jclouds:openstack-mitaka-nova:
> endpoint: https://10.10.0.10:5000/v2.0
> identity: X
> credential: XX
> services:
> - type: brooklyn.entity.basic.EmptySoftwareProcess
>   name: test1
>   provisioning.properties:
> osFamily: CentOS
> osVersionRegex: 7
> hardwareId: RegionOne/3
> imageId: RegionOne/a9eab8c3-8e3c-4e68-8af2-02e9b5915a58
> loginUser: centos
> loginUser.privateKeyFile: /home/ubuntu/.ssh/id_rsa
> templateOptions:
>   networks: ["3f4ca47b-6e04-449b-a44f-7cbc5696084d"]
>   securityGroups: ["default", "SSH"]
>   generateKeyPair: false
>   keyPairName: niekun_openstack_de
> {quote}
> I specify the loginUser: centos in the yaml file
> But from the log file I saw that brooklyn still trying ssh to the instance by 
> using ubuntu user.
> I don't know why this happened. It seems like the loginUser: centos does't 
> work.
> Below are the brooklyn's log
> {quote}
> 2017-02-21 09:07:44,202 DEBUG o.a.b.l.ssh.SshMachineLocation 
> [brooklyn-execmanager-dNzOCrw1-174]: 
> SshMachineLocation[SshMachineLocation:yndl:ubuntu@192.168.1.118/192.168.1.118:22(id=yndlps9c9z)]
>  invalidating all entries in ssh pool cache. Final stats: 
> CacheStats{hitCount=0, missCount=1, loadSuccessCount=1, loadExceptionCount=0, 
> totalLoadTime=111485, evictionCount=0}
> {quote}
> I think this is a bug



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (BROOKLYN-444) Effector call works from GUI but fails from CLI

2017-04-11 Thread Aled Sage (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964117#comment-15964117
 ] 

Aled Sage commented on BROOKLYN-444:


Brooklyn 0.11.0-SNAPSHOT is using cxf 3.1.10, so hopefully this is fixed.

[~geomacy] or [~murdo] could one of you please retest, and mark this as fixed 
for 0.11.0 if it works for you now?

> Effector call works from GUI but fails from CLI
> ---
>
> Key: BROOKLYN-444
> URL: https://issues.apache.org/jira/browse/BROOKLYN-444
> Project: Brooklyn
>  Issue Type: Bug
>Affects Versions: 0.10.0
> Environment: Brooklyn Version 0.10.0 on Mac
>Reporter: Murdo Aird
>Assignee: Geoff Macartney
>Priority: Critical
>
> The following simple BP adds an Effector to an entity. The entity can be 
> called from the web UI and succeeds. Drilling into the Activity logs shows 
> the simple bash command works.
> However if I try to invoke the Effector via the CLI [1], the call fails:
> br app "effector-test" entity "Empty Software Process" effector DoStuff invoke
> For the CLI failure, it looks like a random (?) environment variable is being 
> injected via the CLI [2].
> {code:none}
> name: effector-test
> location: localhost
> services:
>   - type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
> install.command: echo True
> launch.command: echo True
> checkRunning.command: echo true
> brooklyn.initializers:
>   - type: org.apache.brooklyn.core.effector.ssh.SshCommandEffector
> brooklyn.config:
>   name: DoStuff
>   command: whoami
> {code}
> * Calling a standard Effector (e.g. stop) via the CLI works. 
> * If the DoSuff Effector via CLI fails, I can subsequently call it from the 
> web UI and it works
> Not to muddy the waters, but calling the same Effector from the REST API also 
> results in an error - but it's a different one [3].
> [1] https://gist.github.com/murdoaird/0ba46476b8ec1e5039097b3754f720f7
> [2] https://gist.github.com/murdoaird/50777a5fa398a79611b4ec5bbfdc1d7d#env-1
> [3] https://gist.github.com/murdoaird/e153c5b3502d5475dee7358e2d9c3472



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (BROOKLYN-446) Constructor ScheduledTask(Map, Task) is broken

2017-04-11 Thread Aled Sage (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964106#comment-15964106
 ] 

Aled Sage commented on BROOKLYN-446:


I've deprecated the broken methods in 
https://github.com/apache/brooklyn-server/pull/627, in time for 0.11.0 
hopefully.

I agree that constructors taking a Runnable/Callable would be sensible. In the 
mean time, I've just pointed folk at the constructor that takes a task factory.

---
Longer term, I'd love to find the time to re-write our scheduled-executor 
stuff. I really do hate our {{ScheduledTask}}. Why did we invent a new (worse) 
api for scheduling jobs, rather than just re-using the very well known 
{{java.util.concurrent.ScheduledExecutorService}}? The answer I suspect is that 
in Brooklyn 0.1.0 we were too focused on a groovy API (not that I think it was 
a good groovy API either!).

That long-term aim makes me hesitant to tweak this stuff. If we are going to 
invest time in this, I'd prefer to do it better! (But adding the constructors 
is a couple of hours, versus a couple of days for the 
{{ScheduledExecutorService}} style of api.)

> Constructor ScheduledTask(Map, Task) is broken
> --
>
> Key: BROOKLYN-446
> URL: https://issues.apache.org/jira/browse/BROOKLYN-446
> Project: Brooklyn
>  Issue Type: Bug
>Affects Versions: 0.10.0
>Reporter: Svetoslav Neykov
>
> The resulting task is executed only once, not rescheduled.
> A test case to show the behaviour:
> {noformat}
> import static org.testng.Assert.assertTrue;
> import java.util.Map;
> import java.util.concurrent.atomic.AtomicInteger;
> import org.apache.brooklyn.api.mgmt.Task;
> import org.apache.brooklyn.core.test.BrooklynMgmtUnitTestSupport;
> import org.apache.brooklyn.test.Asserts;
> import org.apache.brooklyn.util.collections.MutableMap;
> import org.apache.brooklyn.util.time.Duration;
> import org.testng.annotations.Test;
> import com.google.common.collect.ImmutableMap;
> import com.google.common.util.concurrent.Runnables;
> public class ScheduledTaskTest extends BrooklynMgmtUnitTestSupport {
> /**
>  * Fails with:
>  * java.lang.UnsupportedOperationException
>  * at 
> com.google.common.collect.ImmutableMap.remove(ImmutableMap.java:338)
>  * at 
> org.apache.brooklyn.util.core.task.BasicTask.(BasicTask.java:115)
>  * at 
> org.apache.brooklyn.util.core.task.BasicTask.(BasicTask.java:107)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTask.(ScheduledTask.java:96)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTask.(ScheduledTask.java:88)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTaskTest.testImmutableFlags(ScheduledTaskTest.java:43)
>  */
> @Test
> public void testImmutableFlags() {
> Map flags = ImmutableMap.of(
> "period", Duration.ONE_SECOND,
> "delay", Duration.ONE_SECOND);
> Task task = new BasicTask<>(Runnables.doNothing());
> new ScheduledTask(flags, task);
> }
> /**
>  * Fails with:
>  * java.lang.AssertionError: failed succeeds-eventually, 69 attempts, 
> 30005ms elapsed: AssertionError: expected [true] but found [false]
>  * at 
> org.apache.brooklyn.test.Asserts.succeedsEventually(Asserts.java:1008)
>  * at 
> org.apache.brooklyn.test.Asserts.succeedsEventually(Asserts.java:895)
>  * at 
> org.apache.brooklyn.test.Asserts.succeedsEventually(Asserts.java:888)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTaskTest.testTaskConstructor(ScheduledTaskTest.java:60)
>  */
> @Test
> public void testTaskConstructor() {
> final AtomicInteger cnt = new AtomicInteger();
> Map flags = MutableMap.of(
> "period", Duration.ONE_SECOND,
> "delay", Duration.ONE_SECOND);
> Task task = new BasicTask<>(new Runnable() {
> @Override
> public void run() {
> cnt.incrementAndGet();
> }
> });
> ScheduledTask scheduledTask = new ScheduledTask(flags, task);
> mgmt.getExecutionManager().submit(scheduledTask);
> Asserts.succeedsEventually(new Runnable() {
> @Override
> public void run() {
> assertTrue(cnt.get() > 1);
> }
> });
> }
> }
> {noformat}
> The problem is that the task gets reused and on the second schedule attempt 
> it already has a future assigned so is not scheduled any more.
> The best solution seems to be to remove the constructor altogether. 
> Optionally providing a Runnable/Callable job constructor, wrapping the job in 
> a factory, returning a new task on each submission.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (BROOKLYN-446) Constructor ScheduledTask(Map, Task) is broken

2017-04-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964103#comment-15964103
 ] 

ASF GitHub Bot commented on BROOKLYN-446:
-

GitHub user aledsage opened a pull request:

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

BROOKLYN-446: deprecate broken ScheduledTask constructors

See https://issues.apache.org/jira/browse/BROOKLYN-446

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

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

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

https://github.com/apache/brooklyn-server/pull/627.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 #627


commit a3520eb82a5737989a3927fd7b22627088810e8d
Author: Aled Sage 
Date:   2017-04-11T09:55:41Z

BROOKLYN-446: deprecate broken ScheduledTask constructors




> Constructor ScheduledTask(Map, Task) is broken
> --
>
> Key: BROOKLYN-446
> URL: https://issues.apache.org/jira/browse/BROOKLYN-446
> Project: Brooklyn
>  Issue Type: Bug
>Affects Versions: 0.10.0
>Reporter: Svetoslav Neykov
>
> The resulting task is executed only once, not rescheduled.
> A test case to show the behaviour:
> {noformat}
> import static org.testng.Assert.assertTrue;
> import java.util.Map;
> import java.util.concurrent.atomic.AtomicInteger;
> import org.apache.brooklyn.api.mgmt.Task;
> import org.apache.brooklyn.core.test.BrooklynMgmtUnitTestSupport;
> import org.apache.brooklyn.test.Asserts;
> import org.apache.brooklyn.util.collections.MutableMap;
> import org.apache.brooklyn.util.time.Duration;
> import org.testng.annotations.Test;
> import com.google.common.collect.ImmutableMap;
> import com.google.common.util.concurrent.Runnables;
> public class ScheduledTaskTest extends BrooklynMgmtUnitTestSupport {
> /**
>  * Fails with:
>  * java.lang.UnsupportedOperationException
>  * at 
> com.google.common.collect.ImmutableMap.remove(ImmutableMap.java:338)
>  * at 
> org.apache.brooklyn.util.core.task.BasicTask.(BasicTask.java:115)
>  * at 
> org.apache.brooklyn.util.core.task.BasicTask.(BasicTask.java:107)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTask.(ScheduledTask.java:96)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTask.(ScheduledTask.java:88)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTaskTest.testImmutableFlags(ScheduledTaskTest.java:43)
>  */
> @Test
> public void testImmutableFlags() {
> Map flags = ImmutableMap.of(
> "period", Duration.ONE_SECOND,
> "delay", Duration.ONE_SECOND);
> Task task = new BasicTask<>(Runnables.doNothing());
> new ScheduledTask(flags, task);
> }
> /**
>  * Fails with:
>  * java.lang.AssertionError: failed succeeds-eventually, 69 attempts, 
> 30005ms elapsed: AssertionError: expected [true] but found [false]
>  * at 
> org.apache.brooklyn.test.Asserts.succeedsEventually(Asserts.java:1008)
>  * at 
> org.apache.brooklyn.test.Asserts.succeedsEventually(Asserts.java:895)
>  * at 
> org.apache.brooklyn.test.Asserts.succeedsEventually(Asserts.java:888)
>  * at 
> org.apache.brooklyn.util.core.task.ScheduledTaskTest.testTaskConstructor(ScheduledTaskTest.java:60)
>  */
> @Test
> public void testTaskConstructor() {
> final AtomicInteger cnt = new AtomicInteger();
> Map flags = MutableMap.of(
> "period", Duration.ONE_SECOND,
> "delay", Duration.ONE_SECOND);
> Task task = new BasicTask<>(new Runnable() {
> @Override
> public void run() {
> cnt.incrementAndGet();
> }
> });
> ScheduledTask scheduledTask = new ScheduledTask(flags, task);
> mgmt.getExecutionManager().submit(scheduledTask);
> Asserts.succeedsEventually(new Runnable() {
> @Override
> public void run() {
> assertTrue(cnt.get() > 1);
> }
> });
> }
> }
> {noformat}
> The problem is that the task gets reused and on the second schedule attempt 
> it already has a future assigned so is not scheduled any more.
> The best solution seems to be to remove the constructor altogether. 
> Optionally providing a Runnable/Callable job constructor, wrapping the job in 
> a factory, returning a new task on each submission.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] brooklyn-server pull request #627: BROOKLYN-446: deprecate broken ScheduledT...

2017-04-11 Thread aledsage
GitHub user aledsage opened a pull request:

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

BROOKLYN-446: deprecate broken ScheduledTask constructors

See https://issues.apache.org/jira/browse/BROOKLYN-446

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

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

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

https://github.com/apache/brooklyn-server/pull/627.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 #627


commit a3520eb82a5737989a3927fd7b22627088810e8d
Author: Aled Sage 
Date:   2017-04-11T09:55:41Z

BROOKLYN-446: deprecate broken ScheduledTask constructors




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


[jira] [Commented] (BROOKLYN-449) Intermittent NoClassDefFoundError deploying a redis blueprint

2017-04-11 Thread Aled Sage (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964093#comment-15964093
 ] 

Aled Sage commented on BROOKLYN-449:


I've now seen this as well. It seems to happen in our QA framework maybe one in 
100 times approx. It's not always for the same test (i.e. it's not specific to 
redis).

In the brooklyn server's log, I see:
{noformat}
2017-04-04 12:48:21,689 INFO  327 o.a.b.r.r.EffectorResource [tp1268907907-129] 
REST invocation of BasicApplicationImpl{id=k9kjw0ku0f}.stop[] {} by user *
2017-04-04 12:48:21,697 WARN  327 o.a.b.r.u.DefaultExceptionMapper 
[tp1268907907-129] REST call generated exception type class 
java.lang.NoClassDefFoundError unrecognized in class 
org.apache.brooklyn.rest.util.DefaultExceptionMapper (subsequent occurrences 
will be logged debug only): java.lang.NoClassDefFoundError: Could not 
initialize class org.codehaus.groovy.runtime.InvokerHelper
{noformat}

This happens when invoking the {{stop}} effector over the REST api. Here's the 
error logged by the caller:
{noformat}
2017-04-04 12:48:21,705 ERROR 287 i.c.t.s.TestRunnerCallable [er-VpBXgoxP-3715] 
Error Executing test suite  on http://10.104.2.2:39012
java.lang.RuntimeException: POST request to 
http://10.104.2.2:39012/v1/applications/k9kjw0ku0f/entities/k9kjw0ku0f/effectors/stop?timeout=1m
 returned status 500 (Server Error): {"message":"Invalid java type: Could not 
initialize class 
org.codehaus.groovy.runtime.InvokerHelper","details":"java.lang.NoClassDefFoundError:
 Could not initialize class org.codehaus.groovy.runtime.InvokerHelper\n\tat 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.createPojoMetaClassGetPropertySite(AbstractCallSite.java:274)\n\tat
 org.codehaus.groovy.runtime.callsite.AbstractCallSite.crea
teGetPropertySite(AbstractCallSite.java:250)\n\tat 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.acceptGetProperty(AbstractCallSite.java:235)\n\tat
 org.codehaus.groovy.runtime.callsite
.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)\n\tat 
org.apache.brooklyn.util.groovy.GroovyJavaMethods.invokeMethodOnMetaClass(GroovyJavaMethods.java:210)\n\tat
 org.apache.brookl
yn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:321)\n\tat
 org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffec
torMethodSync(AbstractManagementContext.java:346)\n\tat 
org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:276)\n\tat
 org.apache.brooklyn.core.effecto
r.MethodEffector.call(MethodEffector.java:153)\n\tat 
org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:68)\n\tat
 org.apache.brooklyn.core.entity.trait.Starta
ble$StopEffectorBody.call(Startable.java:60)\n\tat 
org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)\n\tat
 org.apache.brooklyn.util.core.tas
k.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:363)\n\tat 
org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:529)\n\tat
 java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tat
 java.util.concurrent.ThreadPoolExecutor$Wo
rker.run(ThreadPoolExecutor.java:617)\n\tat 
java.lang.Thread.run(Thread.java:745)\n","error":500}
at 
io.cloudsoft.test.scheduler.rest.client.BrooklynRestClientImpl.invokeEffector(BrooklynRestClientImpl.java:215)[287:io.cloudsoft.amp.qaframework.qa-test-scheduler:1.0.0.SNAPSHOT]
at 
io.cloudsoft.test.scheduler.TestRunnerCallable.stopTest(TestRunnerCallable.java:405)[287:io.cloudsoft.amp.qaframework.qa-test-scheduler:1.0.0.SNAPSHOT]
at 
io.cloudsoft.test.scheduler.TestRunnerCallable.executeTests(TestRunnerCallable.java:155)[287:io.cloudsoft.amp.qaframework.qa-test-scheduler:1.0.0.SNAPSHOT]
at 
io.cloudsoft.test.scheduler.TestRunnerCallable.call(TestRunnerCallable.java:99)[287:io.cloudsoft.amp.qaframework.qa-test-scheduler:1.0.0.SNAPSHOT]
at 
io.cloudsoft.test.scheduler.TestRunnerImpl$1.run(TestRunnerImpl.java:79)[287:io.cloudsoft.amp.qaframework.qa-test-scheduler:1.0.0.SNAPSHOT]
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
at 
org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:362)[120:org.apache.brooklyn.core:0.11.0.SNAPSHOT]
at 
org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:529)[120:org.apache.brooklyn.core:0.11.0.SNAPSHOT]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at 

[jira] [Resolved] (BROOKLYN-452) Brooklyn may fail to deploy with certain CentOS 7 images

2017-04-11 Thread Aled Sage (JIRA)

 [ 
https://issues.apache.org/jira/browse/BROOKLYN-452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aled Sage resolved BROOKLYN-452.

   Resolution: Fixed
 Assignee: Yavor Yanchev
Fix Version/s: 0.11.0

I think that https://github.com/apache/brooklyn-server/pull/591 fixes it, 
rather than just working around it. Marking as fixed.

> Brooklyn may fail to deploy with certain CentOS 7 images
> 
>
> Key: BROOKLYN-452
> URL: https://issues.apache.org/jira/browse/BROOKLYN-452
> Project: Brooklyn
>  Issue Type: Improvement
>Reporter: Yavor Yanchev
>Assignee: Yavor Yanchev
> Fix For: 0.11.0
>
>
> There is a change made by RedHat [1] [2] which landed in CentOS 7 as well. It 
> prevents the normal deployment due to change in the sudo configuration.
> The reported behavior is observed when Brooklyn is configured not to use 
> jclouds for the initial ssh-based setup. Brooklyn is not using jclouds if 
> *useJcloudsSshInit* parameter is set to *false*
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1196451
> [2] https://rhn.redhat.com/errata/RHSA-2016-2593.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] brooklyn-server pull request #626: BROOKLYN-461: fix CollectionMerger’s Re...

2017-04-11 Thread aledsage
GitHub user aledsage opened a pull request:

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

BROOKLYN-461: fix CollectionMerger’s Ref.equals

I think we've got away with this for so long because different objects 
didn't have the same hashcode, so it rarely had to execute the equals method!

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

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

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

https://github.com/apache/brooklyn-server/pull/626.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 #626






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


[jira] [Assigned] (BROOKLYN-461) Condition that always return true

2017-04-11 Thread Aled Sage (JIRA)

 [ 
https://issues.apache.org/jira/browse/BROOKLYN-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aled Sage reassigned BROOKLYN-461:
--

Assignee: Aled Sage

> Condition that always return true
> -
>
> Key: BROOKLYN-461
> URL: https://issues.apache.org/jira/browse/BROOKLYN-461
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: JC
>Assignee: Aled Sage
>Priority: Trivial
>
> Hi
> In recent github mirror of broolyn-server, I've found the following issue in 
> equals implementation.
> Path: 
> utils/common/src/main/java/org/apache/brooklyn/util/collections/CollectionMerger.java
> {code}
> 196 
> 197 @Override
> 198 public boolean equals(Object o) {
> 199 if (!(o instanceof Ref)) {
> 200 return false;
> 201 }
> 202 return ((Ref)o).obj == ((Ref)o).obj;
> 203 }
> {code}
> Line 202 should be like this?
> {code}
> 202 return this.obj == ((Ref)o).obj;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (BROOKLYN-461) Condition that always return true

2017-04-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964076#comment-15964076
 ] 

ASF GitHub Bot commented on BROOKLYN-461:
-

GitHub user aledsage opened a pull request:

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

BROOKLYN-461: fix CollectionMerger’s Ref.equals

I think we've got away with this for so long because different objects 
didn't have the same hashcode, so it rarely had to execute the equals method!

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

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

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

https://github.com/apache/brooklyn-server/pull/626.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 #626






> Condition that always return true
> -
>
> Key: BROOKLYN-461
> URL: https://issues.apache.org/jira/browse/BROOKLYN-461
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: JC
>Priority: Trivial
>
> Hi
> In recent github mirror of broolyn-server, I've found the following issue in 
> equals implementation.
> Path: 
> utils/common/src/main/java/org/apache/brooklyn/util/collections/CollectionMerger.java
> {code}
> 196 
> 197 @Override
> 198 public boolean equals(Object o) {
> 199 if (!(o instanceof Ref)) {
> 200 return false;
> 201 }
> 202 return ((Ref)o).obj == ((Ref)o).obj;
> 203 }
> {code}
> Line 202 should be like this?
> {code}
> 202 return this.obj == ((Ref)o).obj;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (BROOKLYN-462) Invalid icon for "server" entity

2017-04-11 Thread Aled Sage (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964052#comment-15964052
 ] 

Aled Sage edited comment on BROOKLYN-462 at 4/11/17 9:19 AM:
-

[~svet] can you elaborate please? With brooklyn 0.11.0-SNAPSHOT, when I run in 
classic mode (i.e. non-karaf) then I see the icon of a server in the tree view 
of the "applications" tab. The summary tab's blueprint section for the server 
shows:
{noformat}
services:
- type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
  name: Server
  iconUrl: classpath://brooklyn/icons/server.svg
{noformat}

In contrast, when I use Brooklyn karaf, there is no icon for the server. The 
tree view in the "applications" tab shows only the green dot and no icon (no 
broken icons). The summary tab's blueprint section for the server does *not* 
show the iconUrl:
{noformat}
services:
- type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
  name: Server
{noformat}

This behaviour presumably relate to the changes in 
https://github.com/apache/brooklyn-server/commit/d66f7c63654022b4d473df37c4f481e1d2ef9993


was (Author: aled.sage):
[~svet] can you elaborate please? With brooklyn 0.11.0-SNAPSHOT, when I run in 
classic mode (i.e. non-karaf) then I see the icon of a server in the tree view 
of the "applications" tab. The summary tab's blueprint section for the server 
shows:
{noformat}
services:
- type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
  name: Server
  iconUrl: classpath://brooklyn/icons/server.svg
{noformat}

In contrast, when I use Brooklyn karaf, there is no icon for the server. The 
tree view in the "applications" tab shows only the green dot and no icon (no 
broken icons).

> Invalid icon for "server" entity
> 
>
> Key: BROOKLYN-462
> URL: https://issues.apache.org/jira/browse/BROOKLYN-462
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: Svetoslav Neykov
> Attachments: brooklyn462-classic-with-icon.png
>
>
> Deploying the following bluepritn:
> {noformat}
> services:
> - type: server
> {noformat}
> results in broken icon in the left pane.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (BROOKLYN-462) Invalid icon for "server" entity

2017-04-11 Thread Aled Sage (JIRA)

 [ 
https://issues.apache.org/jira/browse/BROOKLYN-462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aled Sage updated BROOKLYN-462:
---
Attachment: brooklyn462-classic-with-icon.png

Screenshot from classic mode. App deployed was just:
{noformat}
location: localhost
services:
- type: server
{noformat}

> Invalid icon for "server" entity
> 
>
> Key: BROOKLYN-462
> URL: https://issues.apache.org/jira/browse/BROOKLYN-462
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: Svetoslav Neykov
> Attachments: brooklyn462-classic-with-icon.png
>
>
> Deploying the following bluepritn:
> {noformat}
> services:
> - type: server
> {noformat}
> results in broken icon in the left pane.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (BROOKLYN-462) Invalid icon for "server" entity

2017-04-11 Thread Aled Sage (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15964052#comment-15964052
 ] 

Aled Sage commented on BROOKLYN-462:


[~svet] can you elaborate please? With brooklyn 0.11.0-SNAPSHOT, when I run in 
classic mode (i.e. non-karaf) then I see the icon of a server in the tree view 
of the "applications" tab. The summary tab's blueprint section for the server 
shows:
{noformat}
services:
- type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
  name: Server
  iconUrl: classpath://brooklyn/icons/server.svg
{noformat}

In contrast, when I use Brooklyn karaf, there is no icon for the server. The 
tree view in the "applications" tab shows only the green dot and no icon (no 
broken icons).

> Invalid icon for "server" entity
> 
>
> Key: BROOKLYN-462
> URL: https://issues.apache.org/jira/browse/BROOKLYN-462
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: Svetoslav Neykov
>
> Deploying the following bluepritn:
> {noformat}
> services:
> - type: server
> {noformat}
> results in broken icon in the left pane.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (BROOKLYN-470) Brooklyn can not use certain CentOS 7 images on Azure ARM

2017-04-11 Thread Aled Sage (JIRA)

 [ 
https://issues.apache.org/jira/browse/BROOKLYN-470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aled Sage resolved BROOKLYN-470.

   Resolution: Fixed
 Assignee: Aled Sage
Fix Version/s: 0.11.0

Fixed in https://github.com/apache/brooklyn-server/pull/624

> Brooklyn can not use certain CentOS 7 images on Azure ARM
> -
>
> Key: BROOKLYN-470
> URL: https://issues.apache.org/jira/browse/BROOKLYN-470
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: Yavor Yanchev
>Assignee: Aled Sage
> Fix For: 0.11.0
>
>
> CentOS 7 images on Azure ARM are provided by OpenLogic.
> These images require authenticated sudo with password during the provisioning 
> state.
> Brooklyn can use them when provisioning is done via jclouds, but not when 
> Brooklyn's internal implementation is used. The internal implementation is 
> enabled when useJcloudsSshInit parameter is set to false



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[GitHub] brooklyn-server pull request #625: Updates BasicExternalConfigSupplierRegist...

2017-04-11 Thread nakomis
Github user nakomis commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/625#discussion_r110842541
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/mgmt/internal/BasicExternalConfigSupplierRegistry.java
 ---
@@ -103,12 +103,13 @@ private void 
updateFromBrooklynProperties(ManagementContext mgmt) {
 BrooklynProperties config = 
ConfigUtils.filterForPrefixAndStrip(externalProviderProperties, key + ".");
 
 try {
-Maybe configSupplier = 
Reflections.invokeConstructorFromArgs(classloader, 
ExternalConfigSupplier.class, providerClassname, mgmt, name, config);
+Class supplierClass = 
(Class)new ClassLoaderUtils(this, 
mgmt).loadClass(providerClassname);
+Maybe configSupplier = 
Reflections.invokeConstructorFromArgs(supplierClass, mgmt, name, config);
 if (!configSupplier.isPresent()) {
--- End diff --

`supplierClass` is passed to `Reflections.invokeConstructorFromArgs` so it 
needs to be loaded first


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


[GitHub] brooklyn-docs issue #164: Adds documentation for bundling catalog resources ...

2017-04-11 Thread nakomis
Github user nakomis commented on the issue:

https://github.com/apache/brooklyn-docs/pull/164
  
DO NOT MERGE. zip uploading is currently WIP feature


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