Jenkins build is back to normal : brooklyn-master-build #1002

2017-04-06 Thread Apache Jenkins Server
See 



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

2017-04-06 Thread Apache Jenkins Server
See 

--
[...truncated 5.83 MB...]
[INFO] Reactor Summary:
[INFO] 
[INFO] Brooklyn REST JavaScript Web GUI ... SUCCESS [01:32 min]
[INFO] Brooklyn Server Root ... SUCCESS [  1.214 s]
[INFO] Brooklyn Parent Project  SUCCESS [  5.097 s]
[INFO] Brooklyn Test Support Utilities  SUCCESS [  7.666 s]
[INFO] Brooklyn Logback Includable Configuration .. SUCCESS [  4.462 s]
[INFO] Brooklyn Common Utilities .. SUCCESS [ 28.120 s]
[INFO] Brooklyn API ... SUCCESS [  5.182 s]
[INFO] CAMP Server Parent Project . SUCCESS [  4.140 s]
[INFO] CAMP Base .. SUCCESS [  7.897 s]
[INFO] Brooklyn Test Support .. SUCCESS [  5.369 s]
[INFO] Brooklyn REST Swagger Apidoc Utilities . SUCCESS [  4.847 s]
[INFO] Brooklyn Logback Configuration . SUCCESS [  5.824 s]
[INFO] CAMP Server  SUCCESS [ 10.212 s]
[INFO] Brooklyn Felix Runtime . SUCCESS [  7.090 s]
[INFO] Brooklyn Groovy Utilities .. SUCCESS [  9.929 s]
[INFO] Brooklyn Core .. SUCCESS [03:18 min]
[INFO] Brooklyn Policies .. SUCCESS [ 49.794 s]
[INFO] Brooklyn WinRM Software Entities ... SUCCESS [ 11.023 s]
[INFO] Brooklyn Secure JMXMP Agent  SUCCESS [ 13.000 s]
[INFO] Brooklyn JMX RMI Agent . SUCCESS [  4.649 s]
[INFO] Brooklyn Jclouds Location Targets .. SUCCESS [ 45.173 s]
[INFO] Brooklyn Software Base . SUCCESS [01:33 min]
[INFO] Brooklyn CAMP .. FAILURE [03:23 min]
[INFO] Brooklyn Hazelcast Storage . SKIPPED
[INFO] Brooklyn Launcher Common ... SKIPPED
[INFO] Brooklyn REST API .. SKIPPED
[INFO] Brooklyn REST Resources  SKIPPED
[INFO] Brooklyn REST Server ... SKIPPED
[INFO] Brooklyn Launcher .. SKIPPED
[INFO] Brooklyn Command Line Interface  SKIPPED
[INFO] Brooklyn Test Framework  SKIPPED
[INFO] Brooklyn OSGi init . SKIPPED
[INFO] Brooklyn Karaf . SKIPPED
[INFO] Jetty config fragment .. SKIPPED
[INFO] Apache Http Component extension  SKIPPED
[INFO] Brooklyn Karaf Features  SKIPPED
[INFO] Brooklyn Karaf Shell Commands .. SKIPPED
[INFO] Brooklyn Library Root .. SKIPPED
[INFO] Brooklyn CM SaltStack .. SKIPPED
[INFO] Brooklyn CM Ansible  SKIPPED
[INFO] Brooklyn CM Integration Root ... SKIPPED
[INFO] Brooklyn Network Software Entities . SKIPPED
[INFO] Brooklyn OSGi Software Entities  SKIPPED
[INFO] Brooklyn Database Software Entities  SKIPPED
[INFO] Brooklyn Web App Software Entities . SKIPPED
[INFO] Brooklyn Messaging Software Entities ... SKIPPED
[INFO] Brooklyn NoSQL Data Store Software Entities  SKIPPED
[INFO] Brooklyn Monitoring Software Entities .. SKIPPED
[INFO] Brooklyn QA  SKIPPED
[INFO] Brooklyn Examples Aggregator Project ... SKIPPED
[INFO] Brooklyn Examples Aggregator Project - Webapps . SKIPPED
[INFO] hello-world-webapp Maven Webapp  SKIPPED
[INFO] hello-world-sql-webapp Maven Webapp  SKIPPED
[INFO] Brooklyn Simple Web Cluster Example  SKIPPED
[INFO] Brooklyn Global Web Fabric Example . SKIPPED
[INFO] Brooklyn Simple Messaging Publish-Subscribe Example  SKIPPED
[INFO] Brooklyn NoSQL Cluster Examples  SKIPPED
[INFO] Brooklyn Library Karaf integration . SKIPPED
[INFO] Brooklyn Library Catalog ... SKIPPED
[INFO] Brooklyn Library Karaf Features  SKIPPED
[INFO] Brooklyn Client  SKIPPED
[INFO] Brooklyn Client Command Line Interface . SKIPPED
[INFO] Brooklyn REST java Client .. SKIPPED
[INFO] Brooklyn Downstream Project Parent . SKIPPED
[INFO] Brooklyn Dist Root . SKIPPED
[INFO] Brooklyn All Things  SKIPPED
[INFO] Brooklyn Distribution 

[jira] [Created] (BROOKLYN-469) CLI: Panic when login attempted with malformed URL

2017-04-06 Thread Sam Corbett (JIRA)
Sam Corbett created BROOKLYN-469:


 Summary: CLI: Panic when login attempted with malformed URL
 Key: BROOKLYN-469
 URL: https://issues.apache.org/jira/browse/BROOKLYN-469
 Project: Brooklyn
  Issue Type: Bug
Reporter: Sam Corbett


The cli panics when the URL for login isn't a URI:

{code}
$ br login http://localhost:sdnfksdjnfkjsndfkjsd
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x10 pc=0x647b1]

goroutine 1 [running]:
panic(0x4134c0, 0xc820014120)
/usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
github.com/apache/brooklyn-client/cli/net.(*Network).SendRequestGetStatusCode(0xc8200105c0,
 0xc8200ea000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)

/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/net/net.go:124
 +0x1e1
github.com/apache/brooklyn-client/cli/api/version.Version(0xc8200105c0, 0x0, 
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/api/version/version.go:31
 +0xb4
github.com/apache/brooklyn-client/cli/commands.(*Login).Run(0xc820015300, 0x0, 
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/commands/login.go:125
 +0xfa8
github.com/apache/brooklyn-client/cli/command_runner.ConcreteRunner.RunCmdByName(0x7bdd60,
 0xc820015320, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)

/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/command_runner/runner.go:49
 +0xe7
github.com/apache/brooklyn-client/cli/command_runner.(*ConcreteRunner).RunCmdByName(0xc820016540,
 0x49bb98, 0x5, 0xc82008e8c0, 0x0, 0x0)
:1 +0xe0
github.com/apache/brooklyn-client/cli/app.getCommand.func1(0xc82008e8c0)

/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/app/app.go:82
 +0x57
github.com/apache/brooklyn-client/cli/vendor/github.com/urfave/cli.Command.Run(0x49bb98,
 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc8200c0fa0, 0x1e, 0x0, ...)

/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/vendor/github.com/urfave/cli/command.go:174
 +0x1399
github.com/apache/brooklyn-client/cli/vendor/github.com/urfave/cli.(*App).Run(0xc82008e3c0,
 0xc82000a730, 0x5, 0x5, 0x0, 0x0)

/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/vendor/github.com/urfave/cli/app.go:187
 +0x112b
main.main()

/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/br/brooklyn.go:62
 +0x915
{code}




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


[GitHub] brooklyn-server pull request #622: Integration tests fixes

2017-04-06 Thread neykov
GitHub user neykov opened a pull request:

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

Integration tests fixes

Either fixes or marks integration tests as Broken so the CI integration 
test runs reliably.

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

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

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

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


commit 30388c171c351273f40ea771617d96279aa1f9ad
Author: Svetoslav Neykov 
Date:   2017-04-06T14:07:41Z

Fixes integration test failures

Or disables failing tests which can't be fixed now.

commit 49749488e91cb50422a0c0881c80bfef7e78bc2c
Author: Svetoslav Neykov 
Date:   2017-04-06T14:11:17Z

Adds tests which trigger the root cause leading to failures in 
testChildFailuresOnStartButWithQuorumCausesAppToSucceed

The tests are indeterministic - fail a couple of times per 100 invocations 
when executing with "mvn test" in the brooklyn-itest docker container.




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


[GitHub] brooklyn-docs pull request #163: Update jclouds 1.9.x links to point to jclo...

2017-04-06 Thread bostko
GitHub user bostko opened a pull request:

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

Update jclouds 1.9.x links to point to jclouds 2.0.x

Removed obsolete openstack-mitaka-nova section.

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

$ git pull https://github.com/bostko/brooklyn-docs jclouds-1.9-references

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

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


commit 40dbdc7acd50222ad49460349d9bddd22d980fd8
Author: Valentin Aitken 
Date:   2017-04-06T14:11:01Z

Update jclouds 1.9.x links to point to jclouds 2.0.x

Removed obsolete openstack-mitaka-nova section.




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


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

2017-04-06 Thread geomacy
Github user geomacy commented on a diff in the pull request:

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

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

2017-04-06 Thread geomacy
Github user geomacy commented on a diff in the pull request:

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

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

2017-04-06 Thread geomacy
Github user geomacy commented on a diff in the pull request:

https://github.com/apache/brooklyn-server/pull/617#discussion_r110156077
  
--- Diff: 
core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PeriodicDeltaChangeListener.java
 ---
@@ -382,6 +401,8 @@ protected void persistNowInternal(boolean 
alreadyHasMutex) {
 if (!alreadyHasMutex) persistingMutex.acquire();
 if (!isActive() && state != ListenerState.STOPPING) return;
 
+updatePlaneIdIfTimedOut();
--- End diff --

What's the motivation for updating the plane id like this?  When would you 
expect this to be required?


---
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-460) Brooklyn Camp syntax for adding tags to an entity spec

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

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

ASF GitHub Bot commented on BROOKLYN-460:
-

GitHub user bostko opened a pull request:

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

BROOKLYN-460: Brooklyn Camp syntax guidance



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

$ git pull https://github.com/bostko/brooklyn-docs yaml-tags

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

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


commit c24e01c4097e516f973c8203094fca0289ad54e2
Author: Valentin Aitken 
Date:   2017-04-06T13:08:55Z

BROOKLYN-460: Brooklyn Camp syntax guidance




> Brooklyn Camp syntax for adding tags to an entity spec
> --
>
> Key: BROOKLYN-460
> URL: https://issues.apache.org/jira/browse/BROOKLYN-460
> Project: Brooklyn
>  Issue Type: New Feature
>Reporter: Valentin Aitken
>Priority: Minor
> Fix For: 0.11.0
>
>
> Current requirement is to be able to supply String tags in an entity spec in 
> YAML so it can be then retrieved via REST API with {{GET 
> /v1/applications//entities//tags}}.
> Example usage in a YAML blueprint:
> {noformat}
> services:
> - type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
>   brooklyn.tags:
>   - tag1
>   - tag2
> {noformat}
> Please shout if you have further requirements for {{brooklyn.tags}}.



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


[GitHub] brooklyn-docs pull request #162: BROOKLYN-460: Brooklyn Camp syntax guidance

2017-04-06 Thread bostko
GitHub user bostko opened a pull request:

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

BROOKLYN-460: Brooklyn Camp syntax guidance



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

$ git pull https://github.com/bostko/brooklyn-docs yaml-tags

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

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


commit c24e01c4097e516f973c8203094fca0289ad54e2
Author: Valentin Aitken 
Date:   2017-04-06T13:08:55Z

BROOKLYN-460: Brooklyn Camp syntax guidance




---
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-468) restart effector does not restart the entity's feeds

2017-04-06 Thread Aled Sage (JIRA)

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

Aled Sage commented on BROOKLYN-468:


The consequence for me is that sometimes the entity's {{restart}} effector 
fails, because it never gets to {{service.isUp}}. This is because there is a 
not-up indicator based on the feed's output.

If the feed manages to poll while the process is stopping/stopped, then it 
reports the entity as unhealthy, but then never checks again.

Below are some snippets from the yaml blueprint:

{noformat}
brooklyn.initializers:
- type: org.apache.brooklyn.core.sensor.http.HttpRequestSensor
  brooklyn.config:
name: service.isHealthy
period: 5s
jsonPath: "$"
uri:
  $brooklyn:formatString:
  - "%s/v1/server/healthy"
  - $brooklyn:attributeWhenReady("main.uri.public")


brooklyn.enrichers:
- type: org.apache.brooklyn.enricher.stock.UpdatingMap
  brooklyn.config:
enricher.sourceSensor: $brooklyn:sensor("service.isHealthy")
enricher.targetSensor: $brooklyn:sensor("service.notUp.indicators")
enricher.updatingMap.computing:
  $brooklyn:object:
type: "com.google.guava:com.google.common.base.Functions"
factoryMethod.name: "forMap"
factoryMethod.args:
- "false": false
  "true": null
- "false"
{noformat}

I believe this can happen because the {{stop}} impl, which calls 
{{MachineLifecycleEffectorTasks.StopFeedsAtMachineTask}}, uses a parallel task 
to stop the process and stop the feeds simultaneously, so it's race as to 
whether the feed spots the process is not "healthy" before the feed stops. Note 
that doing it sequentially might still have a race: it cancels the tasks, but 
does not wait for the tasks to fully terminate, so a thread might be running in 
the background doing its poll and populating the sensor.

However, all of that is an aside: the feed should be restarted when the process 
is restarted, so that subsequent changes to the entity's state are reported.

> restart effector does not restart the entity's feeds
> 
>
> Key: BROOKLYN-468
> URL: https://issues.apache.org/jira/browse/BROOKLYN-468
> Project: Brooklyn
>  Issue Type: Bug
>Affects Versions: 0.10.0
>Reporter: Aled Sage
>
> I have a yaml-based {{VanillaSoftwareProcess}}. I called its {{restart}} 
> effector. This caused its feeds to be stopped, and not restarted (as visible 
> via the Groovy console:
> {noformat}
> mgmt.getEntityManager().getEntity("qafop4hk6f").feeds().getFeeds()
> [HttpFeed{uniqueTag=HttpFeed[http[service.isHealthy]], running=false, 
> entity=VanillaSoftwareProcessImpl{id=qafop4hk6f}, id=gt1wzcfb2r}, 
> HttpFeed{uniqueTag=HttpFeed[http[service.status]], running=false, 
> entity=VanillaSoftwareProcessImpl{id=qafop4hk6f}, id=u2dx5wkii7}]
> {noformat}
> IMO, when the entity restarts the feeds should be automatically restarted.
> The same applies if you call {{stop}} and then later call {{start}}.
> One tricky thing is we don't know which feeds were actually running before 
> {{stop}} was called - should we start all the feeds? Or should we record 
> which feeds we've automatically stopped, so we know which ones to start? (For 
> the latter, that could prove tricky if Brooklyn is restarted - we'd need to 
> persist it, which gets annoying.)



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


[jira] [Created] (BROOKLYN-468) restart effector does not restart the entity's feeds

2017-04-06 Thread Aled Sage (JIRA)
Aled Sage created BROOKLYN-468:
--

 Summary: restart effector does not restart the entity's feeds
 Key: BROOKLYN-468
 URL: https://issues.apache.org/jira/browse/BROOKLYN-468
 Project: Brooklyn
  Issue Type: Bug
Affects Versions: 0.10.0
Reporter: Aled Sage


I have a yaml-based {{VanillaSoftwareProcess}}. I called its {{restart}} 
effector. This caused its feeds to be stopped, and not restarted (as visible 
via the Groovy console:

{noformat}
mgmt.getEntityManager().getEntity("qafop4hk6f").feeds().getFeeds()

[HttpFeed{uniqueTag=HttpFeed[http[service.isHealthy]], running=false, 
entity=VanillaSoftwareProcessImpl{id=qafop4hk6f}, id=gt1wzcfb2r}, 
HttpFeed{uniqueTag=HttpFeed[http[service.status]], running=false, 
entity=VanillaSoftwareProcessImpl{id=qafop4hk6f}, id=u2dx5wkii7}]
{noformat}

IMO, when the entity restarts the feeds should be automatically restarted.

The same applies if you call {{stop}} and then later call {{start}}.

One tricky thing is we don't know which feeds were actually running before 
{{stop}} was called - should we start all the feeds? Or should we record which 
feeds we've automatically stopped, so we know which ones to start? (For the 
latter, that could prove tricky if Brooklyn is restarted - we'd need to persist 
it, which gets annoying.)



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


[GitHub] brooklyn-server pull request #621: Adds TestCase.continueOnFailure

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

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

Adds TestCase.continueOnFailure



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

$ git pull https://github.com/aledsage/brooklyn-server 
add-TestCase-continueOnFailure

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

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


commit c1422ed13136b02490f68c97dfa0d7863f8de598
Author: Aled Sage 
Date:   2017-04-06T11:34:43Z

Adds TestCase.continueOnFailure




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


[GitHub] brooklyn-docs pull request #161: Documentation on greaterThan and lessThan t...

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

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


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


[GitHub] brooklyn-docs issue #161: Documentation on greaterThan and lessThan test ass...

2017-04-06 Thread geomacy
Github user geomacy commented on the issue:

https://github.com/apache/brooklyn-docs/pull/161
  
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 #619: Add greaterThan and lessThan test framewo...

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

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


---
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 #619: Add greaterThan and lessThan test framework asse...

2017-04-06 Thread geomacy
Github user geomacy commented on the issue:

https://github.com/apache/brooklyn-server/pull/619
  
LGTM,  & @aledsage's comment has been addressed.  Will merge.


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


[GitHub] brooklyn-docs pull request #161: Documentation on greaterThan and lessThan t...

2017-04-06 Thread sjcorbett
GitHub user sjcorbett opened a pull request:

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

Documentation on greaterThan and lessThan test assertions

Accompanies https://github.com/apache/brooklyn-server/pull/619.

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

$ git pull https://github.com/sjcorbett/brooklyn-docs gtlt

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

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


commit 181569cab33adf11410072b5ac4ede02f167f4b9
Author: Sam Corbett 
Date:   2017-04-06T09:30:44Z

Documentation on greaterThan and lessThan test assertions




---
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-460) Brooklyn Camp syntax for adding tags to an entity spec

2017-04-06 Thread Valentin Aitken (JIRA)

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

Valentin Aitken resolved BROOKLYN-460.
--
   Resolution: Fixed
Fix Version/s: 0.11.0

> Brooklyn Camp syntax for adding tags to an entity spec
> --
>
> Key: BROOKLYN-460
> URL: https://issues.apache.org/jira/browse/BROOKLYN-460
> Project: Brooklyn
>  Issue Type: New Feature
>Reporter: Valentin Aitken
>Priority: Minor
> Fix For: 0.11.0
>
>
> Current requirement is to be able to supply String tags in an entity spec in 
> YAML so it can be then retrieved via REST API with {{GET 
> /v1/applications//entities//tags}}.
> Example usage in a YAML blueprint:
> {noformat}
> services:
> - type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
>   brooklyn.tags:
>   - tag1
>   - tag2
> {noformat}
> Please shout if you have further requirements for {{brooklyn.tags}}.



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


[GitHub] brooklyn-server pull request #612: BROOKLYN-460: Brooklyn Camp syntax for ad...

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

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


---
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 #612: BROOKLYN-460: Brooklyn Camp syntax for adding ta...

2017-04-06 Thread geomacy
Github user geomacy commented on the issue:

https://github.com/apache/brooklyn-server/pull/612
  
+1 LGTM; have run some tests successfully, and have checked back through 
all of @aledsage's and @neykov's comments, which are all addressed. 

Will merge.


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


[jira] [Commented] (BROOKLYN-460) Brooklyn Camp syntax for adding tags to an entity spec

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

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

ASF GitHub Bot commented on BROOKLYN-460:
-

Github user geomacy commented on the issue:

https://github.com/apache/brooklyn-server/pull/612
  
+1 LGTM; have run some tests successfully, and have checked back through 
all of @aledsage's and @neykov's comments, which are all addressed. 

Will merge.


> Brooklyn Camp syntax for adding tags to an entity spec
> --
>
> Key: BROOKLYN-460
> URL: https://issues.apache.org/jira/browse/BROOKLYN-460
> Project: Brooklyn
>  Issue Type: New Feature
>Reporter: Valentin Aitken
>Priority: Minor
>
> Current requirement is to be able to supply String tags in an entity spec in 
> YAML so it can be then retrieved via REST API with {{GET 
> /v1/applications//entities//tags}}.
> Example usage in a YAML blueprint:
> {noformat}
> services:
> - type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess
>   brooklyn.tags:
>   - tag1
>   - tag2
> {noformat}
> Please shout if you have further requirements for {{brooklyn.tags}}.



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