[GitHub] brooklyn-server pull request #202: Fix failing tests - handle newly introduc...

2016-06-15 Thread neykov
GitHub user neykov opened a pull request:

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

Fix failing tests - handle newly introduced config key



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

$ git pull https://github.com/neykov/brooklyn-server fix/failing-tests

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

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


commit 9a6de8ccb46ab9cdfbb4f51ff0b6eef05d364a60
Author: Svetoslav Neykov 
Date:   2016-06-16T06:57:14Z

Fix failing tests - handle newly introduced config key




---
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 #261

2016-06-15 Thread Apache Jenkins Server
See 

--
[...truncated 20132 lines...]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.assertEquals(Assert.java:806)
at org.testng.Assert.assertEquals(Assert.java:784)
at 
org.apache.brooklyn.core.entity.DynamicEntityTypeConfigTest.testGetConfigKeys(DynamicEntityTypeConfigTest.java:85)

testRemoveConfigKey(org.apache.brooklyn.core.entity.DynamicEntityTypeConfigTest)
  Time elapsed: 0.002 sec  <<< FAILURE!
java.lang.AssertionError: Sets differ: expected 
[install.version[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
spec.config[ConfigKey:java.lang.String]] but got 
[spec.config[ConfigKey:java.lang.String], 
install.version[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String]]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.assertEquals(Assert.java:806)
at org.testng.Assert.assertEquals(Assert.java:784)
at 
org.apache.brooklyn.core.entity.DynamicEntityTypeConfigTest.testRemoveConfigKey(DynamicEntityTypeConfigTest.java:109)

testGetConfigKeysReturnsFromSuperAndInterfacesAndSubClass(org.apache.brooklyn.core.entity.EntityConfigTest)
  Time elapsed: 0.012 sec  <<< FAILURE!
java.lang.AssertionError: Sets differ: expected 
[superKey1[ConfigKey:java.lang.String], superKey2[ConfigKey:java.lang.String], 
subKey2[ConfigKey:java.lang.String], interfaceKey1[ConfigKey:java.lang.String]] 
but got [subKey2[ConfigKey:java.lang.String], 
superKey1[ConfigKey:java.lang.String], 
interfaceKey1[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
superKey2[ConfigKey:java.lang.String]]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.assertEquals(Assert.java:806)
at org.testng.Assert.assertEquals(Assert.java:784)
at 
org.apache.brooklyn.core.entity.EntityConfigTest.testGetConfigKeysReturnsFromSuperAndInterfacesAndSubClass(EntityConfigTest.java:276)

testConfigInImplVisible(org.apache.brooklyn.core.objs.BasicSpecParameterFromClassTest)
  Time elapsed: 0.004 sec  <<< FAILURE!
java.lang.AssertionError: expected [1] but found [2]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertEquals(Assert.java:123)
at org.testng.Assert.assertEquals(Assert.java:370)
at org.testng.Assert.assertEquals(Assert.java:380)
at 
org.apache.brooklyn.core.objs.BasicSpecParameterFromClassTest.testConfigInImplVisible(BasicSpecParameterFromClassTest.java:98)

2016-06-16 01:56:30,639 INFO  Brooklyn shutdown: stopping entities 
[TestEntityImpl{id=f3l3hxsixv}, TestEntityImpl{id=w54xuiixyl}, 
BlockingEntityImpl{id=z9nlmqctio}]

Results :

Failed tests: 
  DynamicEntityTypeConfigTest.testAddConfigKey:91 Sets differ: expected 
[install.version[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
spec.config[ConfigKey:java.lang.String], 
new.config[ConfigKey:java.lang.String]] but got 
[spec.config[ConfigKey:java.lang.String], 
install.version[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
new.config[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String]]
  DynamicEntityTypeConfigTest.testAddConfigKeyThroughEntity:100 Sets differ: 
expected [install.version[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
spec.config[ConfigKey:java.lang.String], 
new.config[ConfigKey:java.lang.String]] but got 
[spec.config[ConfigKey:java.lang.String], 
install.version[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
new.config[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String]]
  DynamicEntityTypeConfigTest.testGetConfigKeys:85 Sets differ: expected 
[install.version[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
spec.config[ConfigKey:java.lang.String]] but got 
[spec.config[ConfigKey:java.lang.String], 
install.version[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
pre.i

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

2016-06-15 Thread Apache Jenkins Server
See 

--
[...truncated 20155 lines...]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.assertEquals(Assert.java:806)
at org.testng.Assert.assertEquals(Assert.java:784)
at 
org.apache.brooklyn.core.entity.DynamicEntityTypeConfigTest.testGetConfigKeys(DynamicEntityTypeConfigTest.java:85)

testRemoveConfigKey(org.apache.brooklyn.core.entity.DynamicEntityTypeConfigTest)
  Time elapsed: 0.003 sec  <<< FAILURE!
java.lang.AssertionError: Sets differ: expected 
[install.version[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
spec.config[ConfigKey:java.lang.String]] but got 
[spec.config[ConfigKey:java.lang.String], 
install.version[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String]]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.assertEquals(Assert.java:806)
at org.testng.Assert.assertEquals(Assert.java:784)
at 
org.apache.brooklyn.core.entity.DynamicEntityTypeConfigTest.testRemoveConfigKey(DynamicEntityTypeConfigTest.java:109)

testGetConfigKeysReturnsFromSuperAndInterfacesAndSubClass(org.apache.brooklyn.core.entity.EntityConfigTest)
  Time elapsed: 0.012 sec  <<< FAILURE!
java.lang.AssertionError: Sets differ: expected 
[superKey1[ConfigKey:java.lang.String], superKey2[ConfigKey:java.lang.String], 
subKey2[ConfigKey:java.lang.String], interfaceKey1[ConfigKey:java.lang.String]] 
but got [subKey2[ConfigKey:java.lang.String], 
superKey1[ConfigKey:java.lang.String], 
interfaceKey1[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
superKey2[ConfigKey:java.lang.String]]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.assertEquals(Assert.java:806)
at org.testng.Assert.assertEquals(Assert.java:784)
at 
org.apache.brooklyn.core.entity.EntityConfigTest.testGetConfigKeysReturnsFromSuperAndInterfacesAndSubClass(EntityConfigTest.java:276)

testConfigInImplVisible(org.apache.brooklyn.core.objs.BasicSpecParameterFromClassTest)
  Time elapsed: 0.002 sec  <<< FAILURE!
java.lang.AssertionError: expected [1] but found [2]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertEquals(Assert.java:123)
at org.testng.Assert.assertEquals(Assert.java:370)
at org.testng.Assert.assertEquals(Assert.java:380)
at 
org.apache.brooklyn.core.objs.BasicSpecParameterFromClassTest.testConfigInImplVisible(BasicSpecParameterFromClassTest.java:98)

2016-06-15 23:33:49,087 INFO  Brooklyn shutdown: stopping entities 
[TestEntityImpl{id=xwkfr5si3g}, TestEntityImpl{id=w8boic912p}, 
BlockingEntityImpl{id=v36nauz5js}]

Results :

Failed tests: 
  DynamicEntityTypeConfigTest.testAddConfigKey:91 Sets differ: expected 
[install.version[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
spec.config[ConfigKey:java.lang.String], 
new.config[ConfigKey:java.lang.String]] but got 
[spec.config[ConfigKey:java.lang.String], 
install.version[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
new.config[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String]]
  DynamicEntityTypeConfigTest.testAddConfigKeyThroughEntity:100 Sets differ: 
expected [install.version[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
spec.config[ConfigKey:java.lang.String], 
new.config[ConfigKey:java.lang.String]] but got 
[spec.config[ConfigKey:java.lang.String], 
install.version[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
new.config[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String]]
  DynamicEntityTypeConfigTest.testGetConfigKeys:85 Sets differ: expected 
[install.version[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
spec.config[ConfigKey:java.lang.String]] but got 
[spec.config[ConfigKey:java.lang.String], 
install.version[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
pre.i

Build failed in Jenkins: brooklyn-server-master #134

2016-06-15 Thread Apache Jenkins Server
See 

Changes:

[kiuby88.programming] Check the required open port for BrooklynNode

[kiuby88.programming] Inferring required open ports depending on config key 
value type

[kiuby88.programming] Solving concurrency issues

[kiuby88.programming] Minor fix.

[kiuby88.programming] Addressing comments.

--
[...truncated 19202 lines...]
enricher.suppressDuplicates[ConfigKey:java.lang.Boolean] = true

enricher.targetSensor[ConfigKey:org.apache.brooklyn.api.sensor.Sensor] = 
Sensor: service.isUp (java.lang.Boolean)
enricher.transformation[ConfigKey:com.google.common.base.Function] 
= 
if[{Not(IS_NULL)=forPredicate(IsEqualTo(0)(sizeFunction(keys)))}]-else[java.lang.Object@60eee643]
ComputeServiceState{uniqueTag=service.state.actual, running=true, 
entity=BasicEntityImpl{id=g7vo0q5fzt}, id=m79svqnajm}
2016-06-15 23:02:01,303 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.plan.XmlPlanToSpecTransformerTest.testSimpleXmlPlanParse()
 finished in 48 ms
2016-06-15 23:02:01,303 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@AfterMethod 
org.apache.brooklyn.core.plan.XmlPlanToSpecTransformerTest.tearDown()
2016-06-15 23:02:01,304 INFO  No Camp-YAML parser registered for parsing 
catalog item DSL; skipping DSL-parsing
2016-06-15 23:02:01,304 INFO  Stopping application 
BasicApplicationImpl{id=ao9gb3u5ua}
2016-06-15 23:02:01,305 INFO  Stopped application 
BasicApplicationImpl{id=ao9gb3u5ua}
2016-06-15 23:02:01,306 WARN  Error invoking start at 
BasicApplicationImpl{id=ao9gb3u5ua}: RuntimeInterruptedException: 
java.lang.InterruptedException: sleep interrupted
2016-06-15 23:02:01,308 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@AfterMethod 
org.apache.brooklyn.core.plan.XmlPlanToSpecTransformerTest.tearDown() finished 
in 5 ms
2016-06-15 23:02:01,308 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 23:02:01,308 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 0 ms
2016-06-15 23:02:01,308 INFO  TESTNG INVOKING: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testCreateMapReturnsSameEachTime()
2016-06-15 23:02:01,309 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testCreateMapReturnsSameEachTime()
 finished in 1 ms
2016-06-15 23:02:01,309 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 23:02:01,309 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 0 ms
2016-06-15 23:02:01,309 INFO  TESTNG INVOKING: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testMapKeySetIterator()
2016-06-15 23:02:01,309 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testMapKeySetIterator()
 finished in 0 ms
2016-06-15 23:02:01,310 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 23:02:01,310 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 0 ms
2016-06-15 23:02:01,310 INFO  TESTNG INVOKING: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testMapOperations()
2016-06-15 23:02:01,311 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testMapOperations()
 finished in 1 ms
2016-06-15 23:02:01,311 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 23:02:01,311 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 0 ms
2016-06-15 23:02:01,311 INFO  TESTNG INVOKING: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testReferenceAcceptsNullValue()
2016-06-15 23:02:01,313 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testReferenceAcceptsNullValue()
 finished in 2 ms
2016-06-15 23:02:01,313 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 23:02:01,313 INFO  TESTNG PASSED CONFIGURATION: "S

[GitHub] brooklyn-library pull request #42: Refactoring test dependencies

2016-06-15 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 issue #42: Refactoring test dependencies

2016-06-15 Thread aledsage
Github user aledsage commented on the issue:

https://github.com/apache/brooklyn-library/pull/42
  
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-library issue #43: Close streams after usage

2016-06-15 Thread aledsage
Github user aledsage commented on the issue:

https://github.com/apache/brooklyn-library/pull/43
  
@neykov LGTM; please merge once apache/brooklyn-server#196 is merged.


---
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-263) Explicit ports are not open for BrooklynNode in cloud

2016-06-15 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on BROOKLYN-263:
-

Github user asfgit closed the pull request at:

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


> Explicit ports are not open for BrooklynNode in cloud
> -
>
> Key: BROOKLYN-263
> URL: https://issues.apache.org/jira/browse/BROOKLYN-263
> Project: Brooklyn
>  Issue Type: Bug
>Affects Versions: 0.9.0, 0.10.0
>Reporter: Jose Carrasco
>Priority: Minor
>  Labels: easyfix
>
> I tried to deploy a BrooklynNode entity with an explicit web console port 
> (8082) over a AWS VM machine. Using the following plan:
> {code:title=BluePrint|borderStyle=solid}
> name: BrooklynNode
> location: aws-ec2:us-west-2
> services:
> - type: org.apache.brooklyn.entity.brooklynnode.BrooklynNode
>   id: brooklynNode
>   brooklyn.config:
> onExistingProperties: do_not_use
> brooklynnode.webconsole.nosecurity: true
> brooklynnode.webconsole.httpPort: 8082 
> {code}
> However I found an error because the entity did not look to be up (SERVICE_UP 
> retrieved false). Then, I tried to figure out a bit. The BrooklynNode 
> instance was installed and executed correctly but the VM’s security group did 
> not have any rule to enable the 8082 port.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] brooklyn-server pull request #136: Fix/required open ports

2016-06-15 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 #136: Fix/required open ports

2016-06-15 Thread aledsage
Github user aledsage commented on the issue:

https://github.com/apache/brooklyn-server/pull/136
  
Thanks @kiuby88 - confirmed all tests pass for me locally. Merging now.


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


Build failed in Jenkins: brooklyn-server-master #133

2016-06-15 Thread Apache Jenkins Server
See 

Changes:

[svetoslav.neykov] Fail on non-0 exit code when setting up a location

[svetoslav.neykov] Implement dontRequireTtyForSudo for locations

[svetoslav.neykov] Execute location obtain commands as tasks

--
[...truncated 19255 lines...]

enricher.targetSensor[ConfigKey:org.apache.brooklyn.api.sensor.Sensor] = 
Sensor: service.isUp (java.lang.Boolean)
enricher.transformation[ConfigKey:com.google.common.base.Function] 
= 
if[{Not(IS_NULL)=forPredicate(IsEqualTo(0)(sizeFunction(keys)))}]-else[java.lang.Object@74f18d6e]
ComputeServiceState{uniqueTag=service.state.actual, running=true, 
entity=BasicEntityImpl{id=f7lh009ngb}, id=kc2wkes0qh}
2016-06-15 20:24:49,909 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.plan.XmlPlanToSpecTransformerTest.testSimpleXmlPlanParse()
 finished in 45 ms
2016-06-15 20:24:49,910 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@AfterMethod 
org.apache.brooklyn.core.plan.XmlPlanToSpecTransformerTest.tearDown()
2016-06-15 20:24:49,911 INFO  Stopping application 
BasicApplicationImpl{id=ygnsra5rxp}
2016-06-15 20:24:49,911 INFO  No Camp-YAML parser registered for parsing 
catalog item DSL; skipping DSL-parsing
2016-06-15 20:24:49,912 INFO  Stopped application 
BasicApplicationImpl{id=ygnsra5rxp}
2016-06-15 20:24:49,913 WARN  Error invoking start at 
BasicApplicationImpl{id=ygnsra5rxp}: RuntimeInterruptedException: 
java.lang.InterruptedException: sleep interrupted
2016-06-15 20:24:49,914 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@AfterMethod 
org.apache.brooklyn.core.plan.XmlPlanToSpecTransformerTest.tearDown() finished 
in 5 ms
2016-06-15 20:24:49,915 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 20:24:49,915 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 0 ms
2016-06-15 20:24:49,915 INFO  TESTNG INVOKING: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testCreateMapReturnsSameEachTime()
2016-06-15 20:24:49,916 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testCreateMapReturnsSameEachTime()
 finished in 1 ms
2016-06-15 20:24:49,916 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 20:24:49,917 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 1 ms
2016-06-15 20:24:49,917 INFO  TESTNG INVOKING: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testMapKeySetIterator()
2016-06-15 20:24:49,917 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testMapKeySetIterator()
 finished in 0 ms
2016-06-15 20:24:49,918 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 20:24:49,918 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 1 ms
2016-06-15 20:24:49,918 INFO  TESTNG INVOKING: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testMapOperations()
2016-06-15 20:24:49,919 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testMapOperations()
 finished in 1 ms
2016-06-15 20:24:49,919 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 20:24:49,919 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 0 ms
2016-06-15 20:24:49,919 INFO  TESTNG INVOKING: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testReferenceAcceptsNullValue()
2016-06-15 20:24:49,921 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testReferenceAcceptsNullValue()
 finished in 2 ms
2016-06-15 20:24:49,921 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 20:24:49,921 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 0 ms
2016-06-15 20:24:49,921 INFO  TEST

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

2016-06-15 Thread Apache Jenkins Server
See 

--
[...truncated 20049 lines...]
at org.testng.Assert.assertEquals(Assert.java:806)
at org.testng.Assert.assertEquals(Assert.java:784)
at 
org.apache.brooklyn.core.entity.DynamicEntityTypeConfigTest.testGetConfigKeys(DynamicEntityTypeConfigTest.java:85)

testRemoveConfigKey(org.apache.brooklyn.core.entity.DynamicEntityTypeConfigTest)
  Time elapsed: 0.002 sec  <<< FAILURE!
java.lang.AssertionError: Sets differ: expected 
[install.version[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
spec.config[ConfigKey:java.lang.String]] but got 
[spec.config[ConfigKey:java.lang.String], 
install.version[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String]]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.assertEquals(Assert.java:806)
at org.testng.Assert.assertEquals(Assert.java:784)
at 
org.apache.brooklyn.core.entity.DynamicEntityTypeConfigTest.testRemoveConfigKey(DynamicEntityTypeConfigTest.java:109)

testGetConfigKeysReturnsFromSuperAndInterfacesAndSubClass(org.apache.brooklyn.core.entity.EntityConfigTest)
  Time elapsed: 0.03 sec  <<< FAILURE!
java.lang.AssertionError: Sets differ: expected 
[superKey1[ConfigKey:java.lang.String], superKey2[ConfigKey:java.lang.String], 
subKey2[ConfigKey:java.lang.String], interfaceKey1[ConfigKey:java.lang.String]] 
but got [subKey2[ConfigKey:java.lang.String], 
superKey1[ConfigKey:java.lang.String], 
interfaceKey1[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
superKey2[ConfigKey:java.lang.String]]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.assertEquals(Assert.java:806)
at org.testng.Assert.assertEquals(Assert.java:784)
at 
org.apache.brooklyn.core.entity.EntityConfigTest.testGetConfigKeysReturnsFromSuperAndInterfacesAndSubClass(EntityConfigTest.java:276)

testConfigInImplVisible(org.apache.brooklyn.core.objs.BasicSpecParameterFromClassTest)
  Time elapsed: 0.004 sec  <<< FAILURE!
java.lang.AssertionError: expected [1] but found [2]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertEquals(Assert.java:123)
at org.testng.Assert.assertEquals(Assert.java:370)
at org.testng.Assert.assertEquals(Assert.java:380)
at 
org.apache.brooklyn.core.objs.BasicSpecParameterFromClassTest.testConfigInImplVisible(BasicSpecParameterFromClassTest.java:98)

2016-06-15 20:12:19,167 INFO  Brooklyn shutdown: stopping entities 
[TestEntityImpl{id=z92qnvb6hj}, TestEntityImpl{id=o3kwvnne7e}, 
BlockingEntityImpl{id=en7zkzvd2p}]

Results :

Failed tests: 
  DynamicEntityTypeConfigTest.testAddConfigKey:91 Sets differ: expected 
[install.version[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
spec.config[ConfigKey:java.lang.String], 
new.config[ConfigKey:java.lang.String]] but got 
[spec.config[ConfigKey:java.lang.String], 
install.version[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
new.config[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String]]
  DynamicEntityTypeConfigTest.testAddConfigKeyThroughEntity:100 Sets differ: 
expected [install.version[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
spec.config[ConfigKey:java.lang.String], 
new.config[ConfigKey:java.lang.String]] but got 
[spec.config[ConfigKey:java.lang.String], 
install.version[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
new.config[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String]]
  DynamicEntityTypeConfigTest.testGetConfigKeys:85 Sets differ: expected 
[install.version[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
spec.config[ConfigKey:java.lang.String]] but got 
[spec.config[ConfigKey:java.lang.String], 
install.version[ConfigKey:java.lang.String], 
post.install.command[ConfigKey:java.lang.String], 
install.unique_label[ConfigKey:java.lang.String], 
defaultDisplayName[ConfigKey:java.lang.String], 
pre.install.command[ConfigKey:java.lang.String]]
  Dynam

[GitHub] brooklyn-server pull request #169: Add dontRequireTtyForSudo option to locat...

2016-06-15 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 #196: Close streams after usage

2016-06-15 Thread aledsage
Github user aledsage commented on the issue:

https://github.com/apache/brooklyn-server/pull/196
  
LGTM; once jenkins has confirmed the PR builds then good to merge (please 
do feel free to do that yourself @neykov if you get to it 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.
---


Build failed in Jenkins: brooklyn-server-master #132

2016-06-15 Thread Apache Jenkins Server
See 

Changes:

[bostko] Sanitize effector parameters when reporting an exception

[aled.sage] Fix JcloudsSshMachineLocation.getSubnetIp

[aled.sage] BROOKLYN-299: fix LocationUsage mutex

[aled.sage] Move DEFAULT_DISPLAY_NAME from app to entity

[bostko] BROOKLYN-282: don���t log passwords (#1)

[svetoslav.neykov] Fix build failure, assign object to variable before losing 
type

--
[...truncated 19244 lines...]

enricher.targetSensor[ConfigKey:org.apache.brooklyn.api.sensor.Sensor] = 
Sensor: service.isUp (java.lang.Boolean)
enricher.transformation[ConfigKey:com.google.common.base.Function] 
= 
if[{Not(IS_NULL)=forPredicate(IsEqualTo(0)(sizeFunction(keys)))}]-else[java.lang.Object@525534db]
ComputeServiceState{uniqueTag=service.state.actual, running=true, 
entity=BasicEntityImpl{id=y70b0x3lc8}, id=xqrjbhezir}
2016-06-15 18:30:48,393 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.plan.XmlPlanToSpecTransformerTest.testSimpleXmlPlanParse()
 finished in 34 ms
2016-06-15 18:30:48,394 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@AfterMethod 
org.apache.brooklyn.core.plan.XmlPlanToSpecTransformerTest.tearDown()
2016-06-15 18:30:48,394 INFO  No Camp-YAML parser registered for parsing 
catalog item DSL; skipping DSL-parsing
2016-06-15 18:30:48,395 INFO  Stopping application 
BasicApplicationImpl{id=x5ynrhy6vn}
2016-06-15 18:30:48,395 INFO  Stopped application 
BasicApplicationImpl{id=x5ynrhy6vn}
2016-06-15 18:30:48,396 WARN  Error invoking start at 
BasicApplicationImpl{id=x5ynrhy6vn}: RuntimeInterruptedException: 
java.lang.InterruptedException: sleep interrupted
2016-06-15 18:30:48,397 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@AfterMethod 
org.apache.brooklyn.core.plan.XmlPlanToSpecTransformerTest.tearDown() finished 
in 3 ms
2016-06-15 18:30:48,398 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 18:30:48,398 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 0 ms
2016-06-15 18:30:48,398 INFO  TESTNG INVOKING: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testCreateMapReturnsSameEachTime()
2016-06-15 18:30:48,399 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testCreateMapReturnsSameEachTime()
 finished in 1 ms
2016-06-15 18:30:48,399 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 18:30:48,399 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 0 ms
2016-06-15 18:30:48,399 INFO  TESTNG INVOKING: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testMapKeySetIterator()
2016-06-15 18:30:48,399 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testMapKeySetIterator()
 finished in 0 ms
2016-06-15 18:30:48,400 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 18:30:48,400 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 0 ms
2016-06-15 18:30:48,400 INFO  TESTNG INVOKING: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testMapOperations()
2016-06-15 18:30:48,400 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testMapOperations()
 finished in 0 ms
2016-06-15 18:30:48,401 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 18:30:48,401 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp() 
finished in 0 ms
2016-06-15 18:30:48,401 INFO  TESTNG INVOKING: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testReferenceAcceptsNullValue()
2016-06-15 18:30:48,402 INFO  TESTNG PASSED: "Surefire test" - 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.testReferenceAcceptsNullValue()
 finished in 1 ms
2016-06-15 18:30:48,402 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - 
@BeforeMethod 
org.apache.brooklyn.core.internal.storage.impl.BrooklynStorageImplTest.setUp()
2016-06-15 18:30:48,403 INFO  TESTNG PASSED CONFIGURATIO

[jira] [Commented] (BROOKLYN-290) Broken link in brooklyn-client README.md

2016-06-15 Thread Geoff Macartney (JIRA)

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

Geoff Macartney commented on BROOKLYN-290:
--

https://github.com/apache/brooklyn-client/pull/23

that's the original file as linked, it just got moved as noted in the PR.

> Broken link in brooklyn-client README.md
> 
>
> Key: BROOKLYN-290
> URL: https://issues.apache.org/jira/browse/BROOKLYN-290
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: John McCabe
>Priority: Trivial
>  Labels: documentation
>
> The README.md links to a 404'ing *Runtime README* file:
> - https://github.com/apache/brooklyn-client/blob/master/README
> Not clear what this should be.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] brooklyn-client pull request #23: Update link to README.

2016-06-15 Thread geomacy
GitHub user geomacy opened a pull request:

https://github.com/apache/brooklyn-client/pull/23

Update link to README.

File was moved in 
https://github.com/apache/brooklyn-client/commit/6fc8a1ee098fa5a4cd7d8fe726dcc7354abaf15a

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

$ git pull https://github.com/geomacy/brooklyn-client docfix

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

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


commit e04af0b30c49522b2e5950ad0ecb7e6b3082614d
Author: Geoff Macartney 
Date:   2016-06-15T16:06:56Z

Update link to README.

File was moved in 
https://github.com/apache/brooklyn-client/commit/6fc8a1ee098fa5a4cd7d8fe726dcc7354abaf15a




---
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-297) Support yaml DSL for "name"

2016-06-15 Thread Aled Sage (JIRA)

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

Aled Sage commented on BROOKLYN-297:


There is a workaround for this, using the config {{defaultDisplayName}}. See:
* https://github.com/apache/brooklyn-server/pull/200
* https://github.com/apache/brooklyn-server/pull/201

For example:

{noformat}
brooklyn.catalog:
  version: 1.0.0
  items:
  - id: docker-container
itemType: entity
item:
  type: ...
  brooklyn.parameters:
- name: imageName
  type: string
  brooklyn.config:
defaultDisplayName:
  $brooklyn:formatString:
  - "Container: %s"
  - $brooklyn:config("imageName")
  ...
{noformat}

Note this only works for some things in the DSL, because the 
{{defaultDisplayName}} is resolved in the entity's {{init()}} method. 
Referencing config on your own entity will work, but potentially not 
referencing other entities (because they might not be managed/instantiated 
yet), and not using "attributeWhenReady" (because that would block the entity's 
initialisation).

> Support yaml DSL for "name"
> ---
>
> Key: BROOKLYN-297
> URL: https://issues.apache.org/jira/browse/BROOKLYN-297
> Project: Brooklyn
>  Issue Type: Improvement
>Affects Versions: 0.9.0
>Reporter: Aled Sage
>Priority: Minor
>
> When providing the name of an entity in yaml, it would be good to be able to 
> use DSL as we can for config.
> For example, we have a catalog item for an entity that creates a docker 
> container. A natural name for it would be the prefix "Container: " followed 
> by the image name (as illustrated in the syntax below).
> {noformat}
> brooklyn.catalog:
>   version: 1.0.0
>   items:
>   - id: docker-container
> itemType: entity
> item:
>   type: ...
>   brooklyn.parameters:
> - name: imageName
>   type: string
>   name:
> $brooklyn:formatString:
> - "Container: %s"
> - $brooklyn:config("imageName")
>   ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] brooklyn-server pull request #195: Sanitize effector parameters when reporti...

2016-06-15 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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-299) Stopping app takes long time: blocked on LocalUsageManager.recordLocationEvent, waiting for ssh connection timeout

2016-06-15 Thread Aled Sage (JIRA)

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

Aled Sage resolved BROOKLYN-299.

   Resolution: Fixed
Fix Version/s: 0.10.0

> Stopping app takes long time: blocked on 
> LocalUsageManager.recordLocationEvent, waiting for ssh connection timeout
> --
>
> Key: BROOKLYN-299
> URL: https://issues.apache.org/jira/browse/BROOKLYN-299
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: Aled Sage
> Fix For: 0.10.0
>
>
> With brooklyn 0.10.0-snapshot master...
> It is sometimes taking a long time to stop locations (and this is also 
> affecting starting them) - a few minutes extra.
> The reason is that it's blocked, waiting on the mutex in 
> {{LocalUsageManager.recordLocationEvent}}, or 
> {{LocalUsageManager.recordApplicationEvent}}!
> While holding the lock, it calls {{location.toMetadataRecord}}. For some 
> location types, this causes an ssh call to infer the machine details. That in 
> itself is a bad idea. However, this is made even worse because we call it 
> when unmanaging a {{JcloudsSshMachineLocation}} - i.e. when the VM has 
> already been terminated. This means the ssh call times out, potentially after 
> a couple of minutes.
> The stacktrace for two such threads are shown below (collected using jstack):
> {noformat}
> "brooklyn-execmanager-hgWZmzF2-7587" daemon prio=5 tid=0x7f94ee04b800 
> nid=0x14b53 waiting for monitor entry [0x79d91000]
>java.lang.Thread.State: BLOCKED (on object monitor)
> at 
> org.apache.brooklyn.core.mgmt.internal.LocalUsageManager.recordApplicationEvent(LocalUsageManager.java:247)
> - waiting to lock <0x0007c06ca2f0> (a java.lang.Object)
> at 
> org.apache.brooklyn.core.entity.AbstractApplication.recordApplicationEvent(AbstractApplication.java:263)
> at 
> org.apache.brooklyn.core.entity.AbstractApplication.setExpectedStateAndRecordLifecycleEvent(AbstractApplication.java:258)
> at 
> org.apache.brooklyn.core.entity.AbstractApplication.stop(AbstractApplication.java:221)
> at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
> at 
> groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
> at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
> at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
> at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
> at 
> org.apache.brooklyn.util.groovy.GroovyJavaMethods.invokeMethodOnMetaClass(GroovyJavaMethods.java:191)
> at 
> org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:309)
> at 
> org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:333)
> at 
> org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:256)
> at 
> org.apache.brooklyn.core.effector.MethodEffector.call(MethodEffector.java:149)
> at 
> org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:68)
> at 
> org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:60)
> at 
> org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)
> at 
> org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:359)
> at 
> org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:519)
> 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)
> "brooklyn-execmanager-hgWZmzF2-7583" daemon prio=5 tid=0x7f94ef137000 
> nid=0xf67f waiting on condition [0x79476000]
>java.lang.Thread.State: WAITING (parking)
> at sun.misc.Unsafe.park(Native Method)
> - parking to wait for  <0x0007efa1> (a 
> java.ut

[GitHub] brooklyn-server issue #195: Sanitize effector parameters when reporting an e...

2016-06-15 Thread aledsage
Github user aledsage commented on the issue:

https://github.com/apache/brooklyn-server/pull/195
  
Unfortunately jenkins is not running PR builds. I ran `mvn clean install` 
manually, and it worked. So 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 #200: Move DEFAULT_DISPLAY_NAME from app to entity

2016-06-15 Thread neykov
Github user neykov commented on the issue:

https://github.com/apache/brooklyn-server/pull/200
  
Thanks for pointing out @sjcorbett. Fixed in 
https://github.com/apache/brooklyn-server/commit/3bb69b6080fbde17279753ba562f4a5008bbd0f6.
The Eclipse compiler is too smart sometimes, especially around generics and 
losing type info, able to figure out things which leave the java compiler 
wondering.


---
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-282) Avoid showing secret effector parameters

2016-06-15 Thread Aled Sage (JIRA)

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

Aled Sage resolved BROOKLYN-282.

   Resolution: Fixed
Fix Version/s: 0.10.0

> Avoid showing secret effector parameters
> 
>
> Key: BROOKLYN-282
> URL: https://issues.apache.org/jira/browse/BROOKLYN-282
> Project: Brooklyn
>  Issue Type: Improvement
>Affects Versions: 0.9.0
>Reporter: Aled Sage
> Fix For: 0.10.0
>
>
> A customer has an effector that takes sensitive data as a parameter (e.g. a 
> password).
> There are three places where the value would currently be visible:
> 1. When entering the value (if invoking the effector from the web-console).
> 2. When showing the activity info (in the activity view of the web-console).
> 3. In the logs.
> Elsewhere (e.g. in config and attributes), the default is to infer if it is a 
> secret from its config name. This is based on whether it contains any of: 
> password, passwd, credential, secret, private, access.cert or access.key. The 
> {{org.apache.brooklyn.core.config.Sanitizer}} is used to replace these values 
> with "". We are careful to call {{Sanitizer.sanitize()}} before 
> logging.
> The web-console (i.e. in JavaScript) does something similar for blurring the 
> config key values for secrets.
> As a first pass, we could apply the same logic to effector parameters. When 
> entering the value, we would mask it out as it was entered. And we would 
> subsequently use the {{Sanitizer}} before generating the activity info or 
> logging.
> ---
> Longer term, we could also add to ConfigKey (and Sensor) a method 
> {{Optional isSecret()}}. If absent, it means no explicit info has 
> been given so we can fall back to our inference logic.
> The problem with the {{isSecret()}} method is that the Sanitizer sometimes 
> works with a map of string keys. In that context, we don't have the strongly 
> typed config key any more so we can't query it to check if a given key is 
> secret. We'd need to carefully review the effector parameter usage to see if 
> we are ever trying to log (or generate activity info) when only working with 
> a map of string keys.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] brooklyn-server issue #200: Move DEFAULT_DISPLAY_NAME from app to entity

2016-06-15 Thread sjcorbett
Github user sjcorbett commented on the issue:

https://github.com/apache/brooklyn-server/pull/200
  
Compilation of Brooklyn core fails after pulling this:
```
[INFO] -
[ERROR] COMPILATION ERROR :
[INFO] -
[ERROR] 
/Users/sam/code/brooklyn.io/brooklyn/brooklyn-server/core/src/test/java/org/apache/brooklyn/core/entity/EntityNameTest.java:[65,40]
 error: incompatible types: Entity cannot be converted to TestEntity
[INFO] 1 error
[INFO] -
[INFO] 

[INFO] BUILD FAILURE
[INFO] 

[INFO] Total time: 28.458 s
[INFO] Finished at: 2016-06-15T16:21:26+01:00
[INFO] Final Memory: 26M/686M
[INFO] 

```
Line in question:
```java
public void testDefaultDisplayNameUsesDeferredSupplier() {
TestEntity entity = app.addChild(EntitySpec.create(TestEntity.class)
```

Tried both Oracle JDK 1.7 and 1.8.


---
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 #38: Don't run mvn in change-version.sh

2016-06-15 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 issue #38: Don't run mvn in change-version.sh

2016-06-15 Thread aledsage
Github user aledsage commented on the issue:

https://github.com/apache/brooklyn-dist/pull/38
  
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 #201: Entity display name: fix catalog item def...

2016-06-15 Thread aledsage
GitHub user aledsage opened a pull request:

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

Entity display name: fix catalog item defaults

Previously, if an entity in the catalog did not have an explicit display 
name then it got the name from the item’s metadata. This was fine in
simple use-cases, but bad if using sub-types or if entities wanted to
declare their own defaultDisplayName.

(Deletes `EntityNameYamlTest.testBrooklynCatalog`, as was spotted by 
@geomacy in https://github.com/apache/brooklyn-server/pull/200 after merge).

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

$ git pull https://github.com/aledsage/brooklyn-server 
entity-default_display_name-in-catalog-items

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

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


commit c4f79794631ccd85c4a81adfb0c571b280e498a4
Author: Aled Sage 
Date:   2016-06-15T13:45:38Z

Entity display name: fix catalog item defaults

Previously, if an entity in the catalog did not have an explicit display 
name then it got the name from the item’s metadata. This was fine in
simple use-cases, but bad if using sub-types or if entities wanted to
declare their own defaultDisplayName.




---
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 #200: Move DEFAULT_DISPLAY_NAME from app to ent...

2016-06-15 Thread aledsage
Github user aledsage commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/200#discussion_r67162187
  
--- Diff: 
camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/EntityNameYamlTest.java
 ---
@@ -0,0 +1,90 @@
+/*
+ * 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.camp.brooklyn;
+
+import static org.testng.Assert.assertEquals;
+
+import org.apache.brooklyn.api.entity.Entity;
+import org.apache.brooklyn.core.entity.Entities;
+import org.apache.brooklyn.core.test.entity.TestEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.Test;
+
+import com.google.common.base.Joiner;
+import com.google.common.base.Predicates;
+import com.google.common.collect.Iterables;
+
+@Test
+public class EntityNameYamlTest extends AbstractYamlTest {
+private static final Logger log = 
LoggerFactory.getLogger(EntityNameYamlTest.class);
+
+@Test
+public void testExplicitDisplayName() throws Exception {
+String yaml = Joiner.on("\n").join(
+"services:",
+"- type: org.apache.brooklyn.core.test.entity.TestEntity",
+"  name: myDisplayName");
+deployAndAssertDisplayName(yaml, "myDisplayName");
+}
+
+@Test
+public void testExplicitDefaultDisplayName() throws Exception {
+String yaml = Joiner.on("\n").join(
+"services:",
+"- type: org.apache.brooklyn.core.test.entity.TestEntity",
+"  brooklyn.config:",
+"defaultDisplayName: myDefaultName");
+deployAndAssertDisplayName(yaml, "myDefaultName");
+}
+
+@Test
+public void testExplicitDefaultDisplayNameReferrencingConfig() throws 
Exception {
+String yaml = Joiner.on("\n").join(
+"services:",
+"- type: org.apache.brooklyn.core.test.entity.TestEntity",
+"  brooklyn.config:",
+"myconf: myval",
+"defaultDisplayName:",
+"  $brooklyn:formatString:",
+"  - \"PREFIX%sSUFFIX\"",
+"  - $brooklyn:config(\"myconf\")");
+deployAndAssertDisplayName(yaml, "PREFIXmyvalSUFFIX");
+}
+
+@Test
+public void testBrooklynConfig() throws Exception {
--- End diff --

Good point @geomacy - I'll delete this duplicate test.


---
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 #195: Sanitize effector parameters when reporting an e...

2016-06-15 Thread bostko
Github user bostko commented on the issue:

https://github.com/apache/brooklyn-server/pull/195
  
@aledsage thank you for the changes!


---
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 #197: Fix JcloudsSshMachineLocation.getSubnetIp

2016-06-15 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 #197: Fix JcloudsSshMachineLocation.getSubnetIp

2016-06-15 Thread neykov
Github user neykov commented on the issue:

https://github.com/apache/brooklyn-server/pull/197
  
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-library issue #34: Fix sed command that update the MySQL configurat...

2016-06-15 Thread tbouron
Github user tbouron commented on the issue:

https://github.com/apache/brooklyn-library/pull/34
  
@aledsage I encountered issues in all environments, any cloud. Even though 
the password is changed at the MySQL level, it never updates the `mymysql.cnf` 
file, probably because of absence of the `-i` option. As a result, the entity 
goes on fire because the `checkRunning` command uses the credentials specified 
within this file.

We have a "[live 
test](https://github.com/brooklyncentral/brooklyn-mysql-node/blob/master/catalog.tests.bom)",
 that's how I noticed this issue.


---
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 #34: Fix sed command that update the MySQL con...

2016-06-15 Thread tbouron
Github user tbouron commented on a diff in the pull request:

https://github.com/apache/brooklyn-library/pull/34#discussion_r67155972
  
--- Diff: 
software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlNodeEffectors.java
 ---
@@ -75,7 +75,7 @@ public Void call(ConfigBag parameters) {
 DynamicTasks.queue(
 SshTasks.newSshExecTaskFactory(machine, 
 "cd 
"+entity().getAttribute(MySqlNode.RUN_DIR),
-"sed -i'' -e 
's@^\\(\\s*password\\s*=\\s*\\).*$@\\1" + newPass.replace("\\", "") + "@g' 
mymysql.cnf")
+"sed -i.bak 
's/\\(password.*\\)=.*/\\1= " + newPass.replace("\\", "") + "/' 
mymysql.cnf")
--- End diff --

You are right for the 2 mentioned cases @neykov, I didn't think this 
through.

I'll need to go back to the drawing board.


---
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 #196: Close streams after usage

2016-06-15 Thread neykov
Github user neykov commented on the issue:

https://github.com/apache/brooklyn-server/pull/196
  
Thanks for the great review @aledsage. Addressed comments.


---
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 #38: Don't run mvn in change-version.sh

2016-06-15 Thread neykov
GitHub user neykov opened a pull request:

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

Don't run mvn in change-version.sh

`target` folders are already excluded in the find command. Remove call to 
`mvn clean` because the project could hit unresolved dependencies (in the case 
of using a custom repo location). Also speeds up the execution.

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

$ git pull https://github.com/neykov/brooklyn-dist change-version-fix

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

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


commit 3095943f05d9acdeded0d5ba5bf446460c7b3a16
Author: Svetoslav Neykov 
Date:   2016-06-15T12:23:24Z

Don't run mvn in change-version.sh

target folders are already excluded in the find command. Remove call to mvn 
clean because the project could hit unresolved dependencies (in the case of 
using a custom repo location). Also speeds up the execution.




---
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 #200: Move DEFAULT_DISPLAY_NAME from app to ent...

2016-06-15 Thread geomacy
Github user geomacy commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/200#discussion_r67148906
  
--- Diff: 
camp/camp-brooklyn/src/test/java/org/apache/brooklyn/camp/brooklyn/EntityNameYamlTest.java
 ---
@@ -0,0 +1,90 @@
+/*
+ * 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.camp.brooklyn;
+
+import static org.testng.Assert.assertEquals;
+
+import org.apache.brooklyn.api.entity.Entity;
+import org.apache.brooklyn.core.entity.Entities;
+import org.apache.brooklyn.core.test.entity.TestEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.Test;
+
+import com.google.common.base.Joiner;
+import com.google.common.base.Predicates;
+import com.google.common.collect.Iterables;
+
+@Test
+public class EntityNameYamlTest extends AbstractYamlTest {
+private static final Logger log = 
LoggerFactory.getLogger(EntityNameYamlTest.class);
+
+@Test
+public void testExplicitDisplayName() throws Exception {
+String yaml = Joiner.on("\n").join(
+"services:",
+"- type: org.apache.brooklyn.core.test.entity.TestEntity",
+"  name: myDisplayName");
+deployAndAssertDisplayName(yaml, "myDisplayName");
+}
+
+@Test
+public void testExplicitDefaultDisplayName() throws Exception {
+String yaml = Joiner.on("\n").join(
+"services:",
+"- type: org.apache.brooklyn.core.test.entity.TestEntity",
+"  brooklyn.config:",
+"defaultDisplayName: myDefaultName");
+deployAndAssertDisplayName(yaml, "myDefaultName");
+}
+
+@Test
+public void testExplicitDefaultDisplayNameReferrencingConfig() throws 
Exception {
+String yaml = Joiner.on("\n").join(
+"services:",
+"- type: org.apache.brooklyn.core.test.entity.TestEntity",
+"  brooklyn.config:",
+"myconf: myval",
+"defaultDisplayName:",
+"  $brooklyn:formatString:",
+"  - \"PREFIX%sSUFFIX\"",
+"  - $brooklyn:config(\"myconf\")");
+deployAndAssertDisplayName(yaml, "PREFIXmyvalSUFFIX");
+}
+
+@Test
+public void testBrooklynConfig() throws Exception {
--- End diff --

I know it's a bit late commenting after a merge, but what's different about 
this test than `testExplicitDisplayName` above?  Did you mean to update this to 
refer to Brooklyn property config in some way?


---
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 #200: Move DEFAULT_DISPLAY_NAME from app to entity

2016-06-15 Thread neykov
Github user neykov commented on the issue:

https://github.com/apache/brooklyn-server/pull/200
  
Looks like jenkins gave up on this PR entirely. 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 #200: Move DEFAULT_DISPLAY_NAME from app to ent...

2016-06-15 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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-299) Stopping app takes long time: blocked on LocalUsageManager.recordLocationEvent, waiting for ssh connection timeout

2016-06-15 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on BROOKLYN-299:
-

Github user asfgit closed the pull request at:

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


> Stopping app takes long time: blocked on 
> LocalUsageManager.recordLocationEvent, waiting for ssh connection timeout
> --
>
> Key: BROOKLYN-299
> URL: https://issues.apache.org/jira/browse/BROOKLYN-299
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: Aled Sage
>
> With brooklyn 0.10.0-snapshot master...
> It is sometimes taking a long time to stop locations (and this is also 
> affecting starting them) - a few minutes extra.
> The reason is that it's blocked, waiting on the mutex in 
> {{LocalUsageManager.recordLocationEvent}}, or 
> {{LocalUsageManager.recordApplicationEvent}}!
> While holding the lock, it calls {{location.toMetadataRecord}}. For some 
> location types, this causes an ssh call to infer the machine details. That in 
> itself is a bad idea. However, this is made even worse because we call it 
> when unmanaging a {{JcloudsSshMachineLocation}} - i.e. when the VM has 
> already been terminated. This means the ssh call times out, potentially after 
> a couple of minutes.
> The stacktrace for two such threads are shown below (collected using jstack):
> {noformat}
> "brooklyn-execmanager-hgWZmzF2-7587" daemon prio=5 tid=0x7f94ee04b800 
> nid=0x14b53 waiting for monitor entry [0x79d91000]
>java.lang.Thread.State: BLOCKED (on object monitor)
> at 
> org.apache.brooklyn.core.mgmt.internal.LocalUsageManager.recordApplicationEvent(LocalUsageManager.java:247)
> - waiting to lock <0x0007c06ca2f0> (a java.lang.Object)
> at 
> org.apache.brooklyn.core.entity.AbstractApplication.recordApplicationEvent(AbstractApplication.java:263)
> at 
> org.apache.brooklyn.core.entity.AbstractApplication.setExpectedStateAndRecordLifecycleEvent(AbstractApplication.java:258)
> at 
> org.apache.brooklyn.core.entity.AbstractApplication.stop(AbstractApplication.java:221)
> at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
> at 
> groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
> at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
> at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
> at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
> at 
> org.apache.brooklyn.util.groovy.GroovyJavaMethods.invokeMethodOnMetaClass(GroovyJavaMethods.java:191)
> at 
> org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:309)
> at 
> org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:333)
> at 
> org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:256)
> at 
> org.apache.brooklyn.core.effector.MethodEffector.call(MethodEffector.java:149)
> at 
> org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:68)
> at 
> org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:60)
> at 
> org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)
> at 
> org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:359)
> at 
> org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:519)
> 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)
> "brooklyn-execmanager-hgWZmzF2-7583" daemon prio=5 tid=0x7f94ef137000 
> nid=0xf67f waiting on condition [0x79476000]
>java.lang.Thread.State: WAITING (parking)
> at sun.misc.Unsafe.

[GitHub] brooklyn-server pull request #199: BROOKLYN-299: fix LocationUsage mutex

2016-06-15 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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-299) Stopping app takes long time: blocked on LocalUsageManager.recordLocationEvent, waiting for ssh connection timeout

2016-06-15 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on BROOKLYN-299:
-

Github user neykov commented on the issue:

https://github.com/apache/brooklyn-server/pull/199
  
I like the fix. Changes look good. Merging.


> Stopping app takes long time: blocked on 
> LocalUsageManager.recordLocationEvent, waiting for ssh connection timeout
> --
>
> Key: BROOKLYN-299
> URL: https://issues.apache.org/jira/browse/BROOKLYN-299
> Project: Brooklyn
>  Issue Type: Bug
>Reporter: Aled Sage
>
> With brooklyn 0.10.0-snapshot master...
> It is sometimes taking a long time to stop locations (and this is also 
> affecting starting them) - a few minutes extra.
> The reason is that it's blocked, waiting on the mutex in 
> {{LocalUsageManager.recordLocationEvent}}, or 
> {{LocalUsageManager.recordApplicationEvent}}!
> While holding the lock, it calls {{location.toMetadataRecord}}. For some 
> location types, this causes an ssh call to infer the machine details. That in 
> itself is a bad idea. However, this is made even worse because we call it 
> when unmanaging a {{JcloudsSshMachineLocation}} - i.e. when the VM has 
> already been terminated. This means the ssh call times out, potentially after 
> a couple of minutes.
> The stacktrace for two such threads are shown below (collected using jstack):
> {noformat}
> "brooklyn-execmanager-hgWZmzF2-7587" daemon prio=5 tid=0x7f94ee04b800 
> nid=0x14b53 waiting for monitor entry [0x79d91000]
>java.lang.Thread.State: BLOCKED (on object monitor)
> at 
> org.apache.brooklyn.core.mgmt.internal.LocalUsageManager.recordApplicationEvent(LocalUsageManager.java:247)
> - waiting to lock <0x0007c06ca2f0> (a java.lang.Object)
> at 
> org.apache.brooklyn.core.entity.AbstractApplication.recordApplicationEvent(AbstractApplication.java:263)
> at 
> org.apache.brooklyn.core.entity.AbstractApplication.setExpectedStateAndRecordLifecycleEvent(AbstractApplication.java:258)
> at 
> org.apache.brooklyn.core.entity.AbstractApplication.stop(AbstractApplication.java:221)
> at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
> at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
> at 
> groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149)
> at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
> at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
> at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
> at 
> org.apache.brooklyn.util.groovy.GroovyJavaMethods.invokeMethodOnMetaClass(GroovyJavaMethods.java:191)
> at 
> org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:309)
> at 
> org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:333)
> at 
> org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:256)
> at 
> org.apache.brooklyn.core.effector.MethodEffector.call(MethodEffector.java:149)
> at 
> org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:68)
> at 
> org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:60)
> at 
> org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)
> at 
> org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:359)
> at 
> org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:519)
> 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)
> "brooklyn-execmanager-hgWZmzF2-7583" daemon prio=5 tid=0x7f94ef137000 
> nid=0xf67f waiting on condition [0x79476000]
>java.lang.Thread.State: 

[GitHub] brooklyn-server issue #199: BROOKLYN-299: fix LocationUsage mutex

2016-06-15 Thread neykov
Github user neykov commented on the issue:

https://github.com/apache/brooklyn-server/pull/199
  
I like the fix. Changes look good. 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 #195: Sanitize effector parameters when reporti...

2016-06-15 Thread aledsage
Github user aledsage commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/195#discussion_r67142271
  
--- Diff: 
core/src/test/java/org/apache/brooklyn/core/mgmt/internal/TestEntityWithEffectors.java
 ---
@@ -21,15 +21,77 @@
 import org.apache.brooklyn.api.entity.ImplementedBy;
 import org.apache.brooklyn.core.annotation.Effector;
 import org.apache.brooklyn.core.annotation.EffectorParam;
+import org.apache.brooklyn.core.effector.MethodEffector;
 import org.apache.brooklyn.core.test.entity.TestEntity;
 
+/**
+ * Entity for testing that secret effector parameters are:
+ * 
+ *   excluded from the activities view
+ *   not logged
+ *   masked out in the UI
+ * 
+ * Of those, only the first is unit-tested.
+ * 
+ * To test manually...
+ * 
+ * Configure logback to log everything at trace:
+ * 
+ * {@code
+ * 
+ * 
+ * 
+ * 
+ * 
+ * }
+ * 
+ * 
+ * Run Brooklyn with the above log configuration file:
+ * 
+ * {@code
+ * export JAVA_OPTS="-Xms256m -Xmx1g -XX:MaxPermSize=256m 
-Dlogback.configurationFile=/path/to/logback-trace.xml"
+ * ./bin/brooklyn launch --persist auto --persistenceDir 
/path/to/persistedState
+ * }
+ * 
+ * 
+ * Deploy the blueprint below:
+ * 
+ * {@code
+ * services:
+ * - type: org.apache.brooklyn.core.mgmt.internal.TestEntityWithEffectors
--- End diff --

The way I built it was to export TestEntityWithEffectors*.java as a jar 
from my IDE, and add it to ./lib/patch of a pre-installed Brooklyn. That didn't 
require adding the pom.

Which pom did you add that to? Maybe we should add something more general 
like "You'll have to ensure this is on the classpath of your brooklyn server, 
before testing". I'll update my PR accordingly.


---
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 #195: Sanitize effector parameters when reporti...

2016-06-15 Thread bostko
Github user bostko commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/195#discussion_r67141981
  
--- Diff: 
core/src/test/java/org/apache/brooklyn/core/mgmt/internal/TestEntityWithEffectors.java
 ---
@@ -21,15 +21,77 @@
 import org.apache.brooklyn.api.entity.ImplementedBy;
 import org.apache.brooklyn.core.annotation.Effector;
 import org.apache.brooklyn.core.annotation.EffectorParam;
+import org.apache.brooklyn.core.effector.MethodEffector;
 import org.apache.brooklyn.core.test.entity.TestEntity;
 
+/**
+ * Entity for testing that secret effector parameters are:
+ * 
+ *   excluded from the activities view
+ *   not logged
+ *   masked out in the UI
+ * 
+ * Of those, only the first is unit-tested.
+ * 
+ * To test manually...
+ * 
+ * Configure logback to log everything at trace:
+ * 
+ * {@code
+ * 
+ * 
+ * 
+ * 
+ * 
+ * }
+ * 
+ * 
+ * Run Brooklyn with the above log configuration file:
+ * 
+ * {@code
+ * export JAVA_OPTS="-Xms256m -Xmx1g -XX:MaxPermSize=256m 
-Dlogback.configurationFile=/path/to/logback-trace.xml"
+ * ./bin/brooklyn launch --persist auto --persistenceDir 
/path/to/persistedState
+ * }
+ * 
+ * 
+ * Deploy the blueprint below:
+ * 
+ * {@code
+ * services:
+ * - type: org.apache.brooklyn.core.mgmt.internal.TestEntityWithEffectors
--- End diff --

I had to add 
```xml

org.apache.brooklyn
brooklyn-core
${project.version}
tests

```
In my maven file to use this entity.
@aledsage do you think we should this note here?


---
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 #196: Close streams after usage

2016-06-15 Thread aledsage
Github user aledsage commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/196#discussion_r67138867
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/util/core/crypto/SecureKeys.java ---
@@ -78,11 +78,11 @@ public static X509Principal 
getX509PrincipalWithCommonName(String commonName) {
 return new X509Principal("" + "C=None," + "L=None," + "O=None," + 
"OU=None," + "CN=" + commonName);
 }
 
-/** reads RSA or DSA / pem style private key files (viz {@link 
#toPem(KeyPair)}), extracting also the public key if possible
+/** reads RSA or DSA / pem style private key files (viz {@link 
#toPem(KeyPair)}), extracting also the public key if possible. Closes the 
stream.
  * @throws IllegalStateException on errors, in particular {@link 
PassphraseProblem} if that is the problem */
 public static KeyPair readPem(InputStream input, final String 
passphrase) {
 // TODO cache is only for fallback "reader" strategy (2015-01); 
delete when Parser confirmed working
-byte[] cache = Streams.readFully(input);
+byte[] cache = Streams.readFullyAndClose(input);
--- End diff --

@neykov How about overloading `readPem` to take a byte array? It looks like 
that is the way it is used anyway.

And for the tests that call it, I wonder if we should add `byte[] 
ResourceUtils.getResourceAsBytes(String url)`. Again it feels like many callers 
of the existing `getResourceFromUrl` either want it as a string or as bytes.


---
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 #195: Sanitize effector parameters when reporting an e...

2016-06-15 Thread aledsage
Github user aledsage commented on the issue:

https://github.com/apache/brooklyn-server/pull/195
  
@bostko I've created https://github.com/bostko/brooklyn-server/pull/1 - 
please review. If you merge it into your branch, then it should automatically 
appear in this PR.

For the apache record, that PR does:

Also refactors EffectorUtils.prepareArgsForEffector (deprecating old
method), and updates how MethodEffector calls it so we have the 
parameter names.

The previous calls to `sanitizeArgs(args)` where args was not of type 
`Map` would do nothing. 
Therefore if this was ever called with an array etc, we'd log all of 
the parameter values.



---
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-302) SSLException: close_notify in ResourceUtils getResourceAsString against https url

2016-06-15 Thread Svetoslav Neykov (JIRA)

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

Svetoslav Neykov commented on BROOKLYN-302:
---

Github could be experimenting with tightened security on servers or just have a 
misconfigured instance. Could you note down the IP of the server next time you 
get a failure.

> SSLException: close_notify in ResourceUtils getResourceAsString against https 
> url
> -
>
> Key: BROOKLYN-302
> URL: https://issues.apache.org/jira/browse/BROOKLYN-302
> Project: Brooklyn
>  Issue Type: Bug
>Affects Versions: 0.10.0
>Reporter: Duncan Grant
>Priority: Minor
>
> This can be reproduced by running the following in the groovy console of 
> brooklyn but I'm not sure when it will fail.
> {code}
> org.apache.brooklyn.util.core.ResourceUtils utils = 
> org.apache.brooklyn.util.core.ResourceUtils.create();
> String result = 
> utils.getResourceAsString("https://github.com/apache/brooklyn-library/raw/master/examples/simple-web-cluster/src/main/resources/visitors-creation-script.sql";);
> System.out.println(result);
> {code}
> I have seen this consistently fail for the last few days and have tried with 
> java versions 1.7.0_71, 1.8.0_45, and 1.8.0_92.
> Error on failure is:
> {noformat}
> 2016-06-14 16:43:13,301 WARN  Problem in user-supplied script: 
> org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: SSLException: 
> Received fatal alert: close_notify
> org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
>   at 
> org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:128) 
> ~[brooklyn-utils-common-0.10.0-20160613.090333-51.jar:0.10.0-SNAPSHOT]
> Caused by: javax.net.ssl.SSLException: Received fatal alert: close_notify
>   at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) 
> ~[na:1.8.0_92]
> {noformat}
> However this is working for me today.  This may be because I am running this 
> from the office rather than from home so I will try again at home this 
> evening.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (BROOKLYN-302) SSLException: close_notify in ResourceUtils getResourceAsString against https url

2016-06-15 Thread Duncan Grant (JIRA)

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

Duncan Grant commented on BROOKLYN-302:
---

java ssl debug:
{noformat}
trustStore is: 
/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/security/cacerts
trustStore type is : jks
trustStore provider is : 
init truststore
adding as trusted cert:
  Subject: CN=Equifax Secure Global eBusiness CA-1, O=Equifax Secure Inc., C=US
  Issuer:  CN=Equifax Secure Global eBusiness CA-1, O=Equifax Secure Inc., C=US
  Algorithm: RSA; Serial number: 0xc3517
  Valid from Mon Jun 21 05:00:00 BST 1999 until Mon Jun 22 05:00:00 BST 2020

adding as trusted cert:
  Subject: CN=SecureTrust CA, O=SecureTrust Corporation, C=US
  Issuer:  CN=SecureTrust CA, O=SecureTrust Corporation, C=US
  Algorithm: RSA; Serial number: 0xcf08e5c0816a5ad427ff0eb271859d0
  Valid from Tue Nov 07 19:31:18 GMT 2006 until Mon Dec 31 19:40:55 GMT 2029

adding as trusted cert:
  Subject: CN=Entrust Root Certification Authority - EC1, OU="(c) 2012 Entrust, 
Inc. - for authorized use only", OU=See www.entrust.net/legal-terms, 
O="Entrust, Inc.", C=US
  Issuer:  CN=Entrust Root Certification Authority - EC1, OU="(c) 2012 Entrust, 
Inc. - for authorized use only", OU=See www.entrust.net/legal-terms, 
O="Entrust, Inc.", C=US
  Algorithm: EC; Serial number: 0xa68b792950d091f9
  Valid from Tue Dec 18 15:25:36 GMT 2012 until Fri Dec 18 15:55:36 GMT 2037

adding as trusted cert:
  Subject: OU=Security Communication RootCA1, O=SECOM Trust.net, C=JP
  Issuer:  OU=Security Communication RootCA1, O=SECOM Trust.net, C=JP
  Algorithm: RSA; Serial number: 0x0
  Valid from Tue Sep 30 05:20:49 BST 2003 until Sat Sep 30 05:20:49 BST 2023

adding as trusted cert:
  Subject: CN=DigiCert Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US
  Issuer:  CN=DigiCert Global Root CA, OU=www.digicert.com, O=DigiCert Inc, C=US
  Algorithm: RSA; Serial number: 0x83be056904246b1a1756ac95991c74a
  Valid from Fri Nov 10 00:00:00 GMT 2006 until Mon Nov 10 00:00:00 GMT 2031

adding as trusted cert:
  Subject: CN=QuoVadis Root CA 2 G3, O=QuoVadis Limited, C=BM
  Issuer:  CN=QuoVadis Root CA 2 G3, O=QuoVadis Limited, C=BM
  Algorithm: RSA; Serial number: 0x445734245b81899b35f2ceb82b3b5ba726f07528
  Valid from Thu Jan 12 18:59:32 GMT 2012 until Sun Jan 12 18:59:32 GMT 2042

adding as trusted cert:
  Subject: CN=DigiCert Trusted Root G4, OU=www.digicert.com, O=DigiCert Inc, 
C=US
  Issuer:  CN=DigiCert Trusted Root G4, OU=www.digicert.com, O=DigiCert Inc, 
C=US
  Algorithm: RSA; Serial number: 0x59b1b579e8e2132e23907bda55c
  Valid from Thu Aug 01 13:00:00 BST 2013 until Fri Jan 15 12:00:00 GMT 2038

adding as trusted cert:
  Subject: CN=GeoTrust Primary Certification Authority, O=GeoTrust Inc., C=US
  Issuer:  CN=GeoTrust Primary Certification Authority, O=GeoTrust Inc., C=US
  Algorithm: RSA; Serial number: 0x18acb56afd69b6153a636cafdafac4a1
  Valid from Mon Nov 27 00:00:00 GMT 2006 until Thu Jul 17 00:59:59 BST 2036

adding as trusted cert:
  Subject: OU=Security Communication RootCA2, O="SECOM Trust Systems CO.,LTD.", 
C=JP
  Issuer:  OU=Security Communication RootCA2, O="SECOM Trust Systems CO.,LTD.", 
C=JP
  Algorithm: RSA; Serial number: 0x0
  Valid from Fri May 29 06:00:39 BST 2009 until Tue May 29 06:00:39 BST 2029

adding as trusted cert:
  Subject: OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For 
authorized use only", OU=Class 3 Public Primary Certification Authority - G2, 
O="VeriSign, Inc.", C=US
  Issuer:  OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For 
authorized use only", OU=Class 3 Public Primary Certification Authority - G2, 
O="VeriSign, Inc.", C=US
  Algorithm: RSA; Serial number: 0x7dd9fe07cfa81eb7107967fba78934c6
  Valid from Mon May 18 01:00:00 BST 1998 until Wed Aug 02 00:59:59 BST 2028

adding as trusted cert:
  Subject: OU=ePKI Root Certification Authority, O="Chunghwa Telecom Co., 
Ltd.", C=TW
  Issuer:  OU=ePKI Root Certification Authority, O="Chunghwa Telecom Co., 
Ltd.", C=TW
  Algorithm: RSA; Serial number: 0x15c8bd65475cafb897005ee406d2bc9d
  Valid from Mon Dec 20 02:31:27 GMT 2004 until Wed Dec 20 02:31:27 GMT 2034

adding as trusted cert:
  Subject: CN=AffirmTrust Commercial, O=AffirmTrust, C=US
  Issuer:  CN=AffirmTrust Commercial, O=AffirmTrust, C=US
  Algorithm: RSA; Serial number: 0x062726a9b17c
  Valid from Fri Jan 29 14:06:06 GMT 2010 until Tue Dec 31 14:06:06 GMT 2030

adding as trusted cert:
  Subject: CN=Certum Trusted Network CA, OU=Certum Certification Authority, 
O=Unizeto Technologies S.A., C=PL
  Issuer:  CN=Certum Trusted Network CA, OU=Certum Certification Authority, 
O=Unizeto Technologies S.A., C=PL
  Algorithm: RSA; Serial number: 0x444c0
  Valid from Wed Oct 22 13:07:37 BST 2008 until Mon Dec 31 12:07:37 GMT 2029

adding as trusted cert:
  Subject: CN=XRamp Glob

[jira] [Created] (BROOKLYN-302) SSLException: close_notify in ResourceUtils getResourceAsString against https url

2016-06-15 Thread Duncan Grant (JIRA)
Duncan Grant created BROOKLYN-302:
-

 Summary: SSLException: close_notify in ResourceUtils 
getResourceAsString against https url
 Key: BROOKLYN-302
 URL: https://issues.apache.org/jira/browse/BROOKLYN-302
 Project: Brooklyn
  Issue Type: Bug
Affects Versions: 0.10.0
Reporter: Duncan Grant
Priority: Minor


This can be reproduced by running the following in the groovy console of 
brooklyn but I'm not sure when it will fail.

{code}
org.apache.brooklyn.util.core.ResourceUtils utils = 
org.apache.brooklyn.util.core.ResourceUtils.create();
String result = 
utils.getResourceAsString("https://github.com/apache/brooklyn-library/raw/master/examples/simple-web-cluster/src/main/resources/visitors-creation-script.sql";);
System.out.println(result);
{code}

I have seen this consistently fail for the last few days and have tried with 
java versions 1.7.0_71, 1.8.0_45, and 1.8.0_92.
Error on failure is:
{noformat}
2016-06-14 16:43:13,301 WARN  Problem in user-supplied script: 
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: SSLException: 
Received fatal alert: close_notify
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException: 
at 
org.apache.brooklyn.util.exceptions.Exceptions.propagate(Exceptions.java:128) 
~[brooklyn-utils-common-0.10.0-20160613.090333-51.jar:0.10.0-SNAPSHOT]
Caused by: javax.net.ssl.SSLException: Received fatal alert: close_notify
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) 
~[na:1.8.0_92]
{noformat}

However this is working for me today.  This may be because I am running this 
from the office rather than from home so I will try again at home this evening.






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] brooklyn-server issue #200: Move DEFAULT_DISPLAY_NAME from app to entity

2016-06-15 Thread aledsage
Github user aledsage commented on the issue:

https://github.com/apache/brooklyn-server/pull/200
  
Build failure looks like it's caused by infrastructure problems:

```
Modules changed, recalculating dependency graph
Build timed out (after 60 minutes). Marking the build as aborted.
Build was aborted
Putting comment on the pull request
Finished: ABORTED
```

I've done a `git commit --amend && push -f` to try to trigger another 
jenkins build.


---
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-282) Avoid showing secret effector parameters

2016-06-15 Thread Aled Sage (JIRA)

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

Aled Sage commented on BROOKLYN-282:


Note that with 0.10.0 and later, it will be important to always run with 
{{org.apache.cxf}} logging above debug. Otherwise, you will likely get log 
messages like that below:

{noformat}
brooklyn.debug.log:2016-06-14 21:43:28,862 DEBUG o.a.c.s.i.AbstractInvoker 
[brooklyn-jetty-server-8082-qtp1970185138-38]: Invoking method public 
javax.ws.rs.core.Response 
org.apache.brooklyn.rest.resources.EffectorResource.invoke(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.util.Map)
 on object org.apache.brooklyn.rest.resources.EffectorResource@3c64f630 with 
params [l4p6u3phln, iletlkpn4a, resetPassword, 0, {newPassword=mypassword, 
secretPin=1234567}].
{noformat}

The default logging level should be right since 
https://github.com/apache/brooklyn-server/pull/198 was merged, which changed 
{{logging/logback-includes/src/main/resources/brooklyn/logback-logger-excludes.xml}}
 to add:

{noformat}

{noformat}

> Avoid showing secret effector parameters
> 
>
> Key: BROOKLYN-282
> URL: https://issues.apache.org/jira/browse/BROOKLYN-282
> Project: Brooklyn
>  Issue Type: Improvement
>Affects Versions: 0.9.0
>Reporter: Aled Sage
>
> A customer has an effector that takes sensitive data as a parameter (e.g. a 
> password).
> There are three places where the value would currently be visible:
> 1. When entering the value (if invoking the effector from the web-console).
> 2. When showing the activity info (in the activity view of the web-console).
> 3. In the logs.
> Elsewhere (e.g. in config and attributes), the default is to infer if it is a 
> secret from its config name. This is based on whether it contains any of: 
> password, passwd, credential, secret, private, access.cert or access.key. The 
> {{org.apache.brooklyn.core.config.Sanitizer}} is used to replace these values 
> with "". We are careful to call {{Sanitizer.sanitize()}} before 
> logging.
> The web-console (i.e. in JavaScript) does something similar for blurring the 
> config key values for secrets.
> As a first pass, we could apply the same logic to effector parameters. When 
> entering the value, we would mask it out as it was entered. And we would 
> subsequently use the {{Sanitizer}} before generating the activity info or 
> logging.
> ---
> Longer term, we could also add to ConfigKey (and Sensor) a method 
> {{Optional isSecret()}}. If absent, it means no explicit info has 
> been given so we can fall back to our inference logic.
> The problem with the {{isSecret()}} method is that the Sanitizer sometimes 
> works with a map of string keys. In that context, we don't have the strongly 
> typed config key any more so we can't query it to check if a given key is 
> secret. We'd need to carefully review the effector parameter usage to see if 
> we are ever trying to log (or generate activity info) when only working with 
> a map of string keys.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)