You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2015/07/24 16:24:21 UTC

[1/4] incubator-brooklyn git commit: Tidy BrooklynLauncherRebindCatalogTest

Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master df4eb8a7f -> 2013f2fb2


Tidy BrooklynLauncherRebindCatalogTest

Stop the BrooklynLaunchers that were created during tests
(as discussed in PR #716)

Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/40c39756
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/40c39756
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/40c39756

Branch: refs/heads/master
Commit: 40c39756e5fba56b7606cb95b151791e09825821
Parents: 3559b5d
Author: Aled Sage <al...@gmail.com>
Authored: Thu Jul 23 22:46:46 2015 -0700
Committer: Aled Sage <al...@gmail.com>
Committed: Thu Jul 23 22:46:46 2015 -0700

----------------------------------------------------------------------
 .../BrooklynLauncherRebindCatalogTest.java      | 30 ++++++++++++++------
 1 file changed, 22 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/40c39756/usage/launcher/src/test/java/brooklyn/launcher/BrooklynLauncherRebindCatalogTest.java
----------------------------------------------------------------------
diff --git a/usage/launcher/src/test/java/brooklyn/launcher/BrooklynLauncherRebindCatalogTest.java b/usage/launcher/src/test/java/brooklyn/launcher/BrooklynLauncherRebindCatalogTest.java
index 8cf5354..70ce776 100644
--- a/usage/launcher/src/test/java/brooklyn/launcher/BrooklynLauncherRebindCatalogTest.java
+++ b/usage/launcher/src/test/java/brooklyn/launcher/BrooklynLauncherRebindCatalogTest.java
@@ -19,13 +19,20 @@
 package brooklyn.launcher;
 
 import java.io.File;
-import java.util.Collection;
+import java.util.List;
 
 import javax.annotation.Nullable;
 
 import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
 import org.testng.annotations.Test;
 
+import com.google.common.base.Function;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.io.Files;
+
 import brooklyn.catalog.BrooklynCatalog;
 import brooklyn.catalog.CatalogItem;
 import brooklyn.catalog.internal.CatalogInitialization;
@@ -34,11 +41,6 @@ import brooklyn.test.entity.LocalManagementContextForTests;
 import brooklyn.util.ResourceUtils;
 import brooklyn.util.os.Os;
 
-import com.google.common.base.Function;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.google.common.io.Files;
-
 public class BrooklynLauncherRebindCatalogTest {
 
     private static final String TEST_VERSION = "test-version";
@@ -47,13 +49,25 @@ public class BrooklynLauncherRebindCatalogTest {
     private static final Iterable<String> EXPECTED_DEFAULT_IDS = ImmutableSet.of("one:" + TEST_VERSION, "two:" + TEST_VERSION);
     private static final Iterable<String> EXPECTED_ADDED_IDS = ImmutableSet.of("three:" + TEST_VERSION, "four:" + TEST_VERSION);
 
+    private List<BrooklynLauncher> launchers = Lists.newCopyOnWriteArrayList();
+    
+    @AfterMethod(alwaysRun=true)
+    public void tearDown() throws Exception {
+        for (BrooklynLauncher launcher : launchers) {
+            launcher.terminate();
+        }
+        launchers.clear();
+    }
+    
     private BrooklynLauncher newLauncherForTests(String persistenceDir) {
         CatalogInitialization catalogInitialization = new CatalogInitialization(CATALOG_INITIAL, false, null, false);
         BrooklynLauncher launcher = BrooklynLauncher.newInstance()
                 .brooklynProperties(LocalManagementContextForTests.builder(true).buildProperties())
                 .catalogInitialization(catalogInitialization)
                 .persistMode(PersistMode.AUTO)
-                .persistenceDir(persistenceDir);
+                .persistenceDir(persistenceDir)
+                .webconsole(false);
+        launchers.add(launcher);
         return launcher;
     }
 
@@ -70,7 +84,7 @@ public class BrooklynLauncherRebindCatalogTest {
         catalog.deleteCatalogItem("one", TEST_VERSION);
         catalog.deleteCatalogItem("two", TEST_VERSION);
 
-        Assert.assertEquals(((Collection) catalog.getCatalogItems()).size(), 0);
+        Assert.assertEquals(Iterables.size(catalog.getCatalogItems()), 0);
 
         catalog.addItems(new ResourceUtils(this).getResourceAsString(CATALOG_ADDITIONS));
 


[3/4] incubator-brooklyn git commit: doc improvements for troubleshooting-exceptions

Posted by he...@apache.org.
doc improvements for troubleshooting-exceptions

As discussed in comments on PR #762

Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/06fee499
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/06fee499
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/06fee499

Branch: refs/heads/master
Commit: 06fee4997b65b910f2141d9583171d9eb3558dc2
Parents: 80ccd9e
Author: Aled Sage <al...@gmail.com>
Authored: Thu Jul 23 22:55:35 2015 -0700
Committer: Aled Sage <al...@gmail.com>
Committed: Thu Jul 23 22:55:35 2015 -0700

----------------------------------------------------------------------
 docs/guide/dev/tips/troubleshooting-exceptions.md | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/06fee499/docs/guide/dev/tips/troubleshooting-exceptions.md
----------------------------------------------------------------------
diff --git a/docs/guide/dev/tips/troubleshooting-exceptions.md b/docs/guide/dev/tips/troubleshooting-exceptions.md
index e288438..fb3d849 100644
--- a/docs/guide/dev/tips/troubleshooting-exceptions.md
+++ b/docs/guide/dev/tips/troubleshooting-exceptions.md
@@ -28,7 +28,6 @@ First let's take a look at the `customize()` method of the Tomcat server bluepri
       copyTemplate(entity.getConfig(TomcatServer.SERVER_XML_RESOURCE), Os.mergePaths(getRunDir(), "conf", "server.xml"));
       copyTemplate(entity.getConfig(TomcatServer.WEB_XML_RESOURCE), Os.mergePaths(getRunDir(), "conf", "web.xml"));
 
-      // Deduplicate same code in JBoss
       if (isProtocolEnabled("HTTPS")) {
           String keystoreUrl = Preconditions.checkNotNull(getSslKeystoreUrl(), "keystore URL must be specified if using HTTPS for " + entity);
           String destinationSslKeystoreFile = getHttpsSslKeystoreFile();
@@ -68,7 +67,9 @@ Execution failed, invalid result 127 for customizing TomcatServerImpl{id=e1HP2s8
 
 [![Script failure error in the Brooklyn debug console.](images/script-failure.png)](images/script-failure-large.png)
 
-By selecting the `Activities` tab and drilling down into the tasks, we eventually get to the task that failed:
+By selecting the `Activities` tab, we can drill into the task that failed. The list of tasks shown (where the 
+effectors are shown as top-level tasks) are clickable links. Selecting that row will show the details of
+that particular task, including its sub-tasks. We can eventually get to the specific sub-task that failed:
 
 [![Task failure error in the Brooklyn debug console.](images/failed-task.png)](images/failed-task-large.png)
 
@@ -112,7 +113,7 @@ is named `brooklyn.debug.log`. Usually the easiest way to navigate the log file
 `less brooklyn.debug.log`. We can quickly find find the stack trace by first navigating to the end of the log file
 with `Shift-G`, then performing a reverse-lookup by typing `?Tomcat` and pressing `Enter`. If searching for the 
 blueprint type (in this case Tomcat) simply matches tasks unrelated to the exception, you can also search for 
-the text of the error message, in this case `? invalid result 127`. You can make the search case-insensitivy by
+the text of the error message, in this case `? invalid result 127`. You can make the search case-insensitivity by
 typing `-i` before performing the search. To skip the current match and move to the next on (i.e. 'up' as we're
 performing a reverse-lookup), simply press `n`
 
@@ -426,8 +427,9 @@ the `Show/hide empty records` icon (highlighted in yellow above):
 
 We know from previous steps that the installation and launch scripts completed, and we know the procecess is running,
 but we can see here that the server is not responding to JMX requests. A good thing to check here would be that the
-JMX port is not being blocked by iptables, firewalls or security groups. Let's assume that we've checked that
-and they're all open. There is still one more thing that Brooklyn can tell us.
+JMX port is not being blocked by iptables, firewalls or security groups
+ (see the (troubleshooting connectivity guide)[troubleshooting-connectivity.html]). 
+Let's assume that we've checked that and they're all open. There is still one more thing that Brooklyn can tell us.
 
 Still on the `Sensors` tab, let's take a look at the `log.location` sensor:
 


[2/4] incubator-brooklyn git commit: Change package name in WebClusterDatabaseExampleGroovy

Posted by he...@apache.org.
Change package name in WebClusterDatabaseExampleGroovy

Was still staying brooklyn.demo; change to org.apache.brooklyn.demo,
which also matches the folder it is now in.

Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/80ccd9e5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/80ccd9e5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/80ccd9e5

Branch: refs/heads/master
Commit: 80ccd9e56ed66ccb714475ebaab0c8e70504fc66
Parents: 40c3975
Author: Aled Sage <al...@gmail.com>
Authored: Thu Jul 23 22:47:30 2015 -0700
Committer: Aled Sage <al...@gmail.com>
Committed: Thu Jul 23 22:47:30 2015 -0700

----------------------------------------------------------------------
 .../apache/brooklyn/demo/WebClusterDatabaseExampleGroovy.groovy    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/80ccd9e5/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleGroovy.groovy
----------------------------------------------------------------------
diff --git a/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleGroovy.groovy b/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleGroovy.groovy
index c3f6cc7..d40fcc5 100644
--- a/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleGroovy.groovy
+++ b/examples/simple-web-cluster/src/main/java/org/apache/brooklyn/demo/WebClusterDatabaseExampleGroovy.groovy
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package brooklyn.demo;
+package org.apache.brooklyn.demo;
 
 import static brooklyn.entity.java.JavaEntityMethods.javaSysProp
 import static brooklyn.event.basic.DependentConfiguration.attributeWhenReady


[4/4] incubator-brooklyn git commit: This closes #766

Posted by he...@apache.org.
This closes #766


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/2013f2fb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/2013f2fb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/2013f2fb

Branch: refs/heads/master
Commit: 2013f2fb20c1ba0913105ec54630ca495b3a1742
Parents: df4eb8a 06fee49
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Fri Jul 24 15:24:08 2015 +0100
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Fri Jul 24 15:24:08 2015 +0100

----------------------------------------------------------------------
 .../dev/tips/troubleshooting-exceptions.md      | 12 ++++----
 .../demo/WebClusterDatabaseExampleGroovy.groovy |  2 +-
 .../BrooklynLauncherRebindCatalogTest.java      | 30 ++++++++++++++------
 3 files changed, 30 insertions(+), 14 deletions(-)
----------------------------------------------------------------------