You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2016/11/10 14:20:41 UTC
[1/6] brooklyn-server git commit: XmlSerialiserTest logs at debug
Repository: brooklyn-server
Updated Branches:
refs/heads/master 6a4ca6486 -> d6f2c569e
XmlSerialiserTest logs at debug
\u001b in testIllegalXmlCharacter breaks tmux when it's printed
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/86894d9b
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/86894d9b
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/86894d9b
Branch: refs/heads/master
Commit: 86894d9b5d6cce02751a879818407da888fdfa06
Parents: 83a9967
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Mon Nov 7 18:28:04 2016 +0000
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Thu Nov 10 10:31:41 2016 +0000
----------------------------------------------------------------------
.../org/apache/brooklyn/util/core/xstream/XmlSerializerTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/86894d9b/core/src/test/java/org/apache/brooklyn/util/core/xstream/XmlSerializerTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/util/core/xstream/XmlSerializerTest.java b/core/src/test/java/org/apache/brooklyn/util/core/xstream/XmlSerializerTest.java
index 8bf0ab4..227019c 100644
--- a/core/src/test/java/org/apache/brooklyn/util/core/xstream/XmlSerializerTest.java
+++ b/core/src/test/java/org/apache/brooklyn/util/core/xstream/XmlSerializerTest.java
@@ -59,7 +59,7 @@ public class XmlSerializerTest {
protected void assertSerializeAndDeserialize(Object val) throws Exception {
String xml = serializer.toString(val);
Object result = serializer.fromString(xml);
- LOG.info("val="+val+"'; xml="+xml+"; result="+result);
+ LOG.debug("val="+val+"'; xml="+xml+"; result="+result);
assertEquals(result, val);
}
[4/6] brooklyn-server git commit: Delete duplicate dependency on
jackson-datatype-guava
Posted by al...@apache.org.
Delete duplicate dependency on jackson-datatype-guava
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/94ab2f81
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/94ab2f81
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/94ab2f81
Branch: refs/heads/master
Commit: 94ab2f810790bdb00e5a7f610c92c0c741448ab5
Parents: 86894d9
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Tue Nov 8 17:54:39 2016 +0000
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Thu Nov 10 10:31:42 2016 +0000
----------------------------------------------------------------------
parent/pom.xml | 5 -----
1 file changed, 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/94ab2f81/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index cb80089..defb676 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -208,11 +208,6 @@
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-guava</artifactId>
- <version>${fasterxml.jackson.version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
<version>${fasterxml.jackson.version}</version>
</dependency>
[3/6] brooklyn-server git commit: Fix Debian 7 live test
Posted by al...@apache.org.
Fix Debian 7 live test
ami-5586a43c is not unavailable.
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/e01a4eff
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/e01a4eff
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/e01a4eff
Branch: refs/heads/master
Commit: e01a4effac50ba99d3443a171bdd94e0cddf26e9
Parents: 94ab2f8
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Tue Nov 8 19:22:26 2016 +0000
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Thu Nov 10 10:31:42 2016 +0000
----------------------------------------------------------------------
.../apache/brooklyn/entity/AbstractEc2LiveTest.java | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e01a4eff/software/base/src/test/java/org/apache/brooklyn/entity/AbstractEc2LiveTest.java
----------------------------------------------------------------------
diff --git a/software/base/src/test/java/org/apache/brooklyn/entity/AbstractEc2LiveTest.java b/software/base/src/test/java/org/apache/brooklyn/entity/AbstractEc2LiveTest.java
index a3cb9b7..7e67ee0 100644
--- a/software/base/src/test/java/org/apache/brooklyn/entity/AbstractEc2LiveTest.java
+++ b/software/base/src/test/java/org/apache/brooklyn/entity/AbstractEc2LiveTest.java
@@ -96,10 +96,20 @@ public abstract class AbstractEc2LiveTest extends BrooklynAppLiveTestSupport {
runTest(ImmutableMap.of("imageId", "us-east-1/ami-5e12dc36", "loginUser", "admin", "hardwareId", SMALL_HARDWARE_ID));
}
- @Test(groups = {"Live"})
+ /**
+ * @deprecated since 0.10.0 use {@link #test_Debian_7()} instead.
+ */
+ @Test(groups = {"Live"}, enabled=false)
+ @Deprecated
public void test_Debian_7_2() throws Exception {
- // release codename "wheezy"
- runTest(ImmutableMap.of("imageId", "us-east-1/ami-5586a43c", "loginUser", "admin", "hardwareId", SMALL_HARDWARE_ID));
+ test_Debian_7();
+ }
+
+ @Test(groups = {"Live"})
+ public void test_Debian_7() throws Exception {
+ // See images at https://wiki.debian.org/Cloud/AmazonEC2Image/Wheezy.
+ // release codename "wheezy", version 7.8.aws.1.
+ runTest(ImmutableMap.of("imageId", "us-east-1/ami-baeda9d2", "loginUser", "admin", "hardwareId", SMALL_HARDWARE_ID));
}
@Test(groups = {"Live"})
[5/6] brooklyn-server git commit: SshCommandEffector resolves
shell.env against the target entity
Posted by al...@apache.org.
SshCommandEffector resolves shell.env against the target entity
Rather than always resolving it against the entity the effector is
attached to. This also fixes the resolution of the execution directory.
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/c256fa97
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/c256fa97
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/c256fa97
Branch: refs/heads/master
Commit: c256fa97014b2515cf54486b77b2a8f8c3645e14
Parents: e01a4ef
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Wed Nov 9 15:26:18 2016 +0000
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Thu Nov 10 10:31:42 2016 +0000
----------------------------------------------------------------------
.../core/effector/ssh/SshCommandEffector.java | 19 ++++++++++---------
.../core/sensor/ssh/SshCommandSensor.java | 3 ++-
2 files changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/c256fa97/core/src/main/java/org/apache/brooklyn/core/effector/ssh/SshCommandEffector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/effector/ssh/SshCommandEffector.java b/core/src/main/java/org/apache/brooklyn/core/effector/ssh/SshCommandEffector.java
index 8d7ca13..2df5094 100644
--- a/core/src/main/java/org/apache/brooklyn/core/effector/ssh/SshCommandEffector.java
+++ b/core/src/main/java/org/apache/brooklyn/core/effector/ssh/SshCommandEffector.java
@@ -59,11 +59,12 @@ public final class SshCommandEffector extends AddEffector {
public static final ConfigKey<String> EFFECTOR_EXECUTION_DIR = SshCommandSensor.SENSOR_EXECUTION_DIR;
public static final MapConfigKey<Object> EFFECTOR_SHELL_ENVIRONMENT = BrooklynConfigKeys.SHELL_ENVIRONMENT;
- public static enum ExecutionTarget {
+ public enum ExecutionTarget {
ENTITY,
MEMBERS,
CHILDREN
}
+
public static final ConfigKey<ExecutionTarget> EXECUTION_TARGET = ConfigKeys.newConfigKey(ExecutionTarget.class, "executionTarget",
"Where this command should run; by default on this 'entity'; alternatively on all 'children' or all 'members' (if it's a group); "
+ "in the latter cases the sets are filtered by entities which have a machine and are not stopping.",
@@ -114,7 +115,7 @@ public final class SshCommandEffector extends AddEffector {
public String callOne(ConfigBag params) {
return queue(
- makePartialTaskFactory(params)
+ makePartialTaskFactory(params, entity())
.summary("effector "+effector.getName()+" ssh call")
).get();
}
@@ -129,7 +130,7 @@ public final class SshCommandEffector extends AddEffector {
Maybe<SshMachineLocation> machine = Locations.findUniqueSshMachineLocation(target.getLocations());
if (machine.isAbsent()) continue;
- SshEffectorTaskFactory<String> t = makePartialTaskFactory(params);
+ SshEffectorTaskFactory<String> t = makePartialTaskFactory(params, target);
t.summary("effector "+effector.getName()+" at "+target);
t.machine( machine.get() );
@@ -138,9 +139,9 @@ public final class SshCommandEffector extends AddEffector {
queue(ptb.build()).getUnchecked();
return null;
}
-
- public SshEffectorTaskFactory<String> makePartialTaskFactory(ConfigBag params) {
- String sshCommand = SshCommandSensor.makeCommandExecutingInDirectory(command, executionDir, entity());
+
+ public SshEffectorTaskFactory<String> makePartialTaskFactory(ConfigBag params, Entity entity) {
+ String sshCommand = SshCommandSensor.makeCommandExecutingInDirectory(command, executionDir, entity);
MutableMap<String, Object> env = MutableMap.of();
@@ -150,7 +151,7 @@ public final class SshCommandEffector extends AddEffector {
}
// Set things from the entity's defined shell environment, if applicable
- env.putAll(entity().config().get(BrooklynConfigKeys.SHELL_ENVIRONMENT));
+ env.putAll(entity.config().get(BrooklynConfigKeys.SHELL_ENVIRONMENT));
// Set the parameters we've been passed. This will repeat declared parameters but to no harm,
// it may pick up additional values (could be a flag defining whether this is permitted or not.)
@@ -159,7 +160,7 @@ public final class SshCommandEffector extends AddEffector {
// Add the shell environment entries from the effector configuration
if (shellEnv != null) env.putAll(shellEnv);
-
+
// Add the shell environment entries from our invocation
Map<String, Object> effectorEnv = params.get(EFFECTOR_SHELL_ENVIRONMENT);
if (effectorEnv != null) env.putAll(effectorEnv);
@@ -173,7 +174,7 @@ public final class SshCommandEffector extends AddEffector {
// Execute the effector with the serialized environment strings
ShellEnvironmentSerializer serializer = new ShellEnvironmentSerializer(entity().getManagementContext());
-
+
return SshEffectorTasks.ssh(sshCommand)
.requiringZeroAndReturningStdout()
.environmentVariables(serializer.serialize(env));
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/c256fa97/core/src/main/java/org/apache/brooklyn/core/sensor/ssh/SshCommandSensor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/sensor/ssh/SshCommandSensor.java b/core/src/main/java/org/apache/brooklyn/core/sensor/ssh/SshCommandSensor.java
index 8b1d410..24bc2d4 100644
--- a/core/src/main/java/org/apache/brooklyn/core/sensor/ssh/SshCommandSensor.java
+++ b/core/src/main/java/org/apache/brooklyn/core/sensor/ssh/SshCommandSensor.java
@@ -21,6 +21,7 @@ package org.apache.brooklyn.core.sensor.ssh;
import java.util.Map;
import java.util.concurrent.ExecutionException;
+import org.apache.brooklyn.api.entity.Entity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -138,7 +139,7 @@ public final class SshCommandSensor<T> extends AddSensor<T> {
}
@Beta
- public static String makeCommandExecutingInDirectory(String command, String executionDir, EntityLocal entity) {
+ public static String makeCommandExecutingInDirectory(String command, String executionDir, Entity entity) {
String finalCommand = command;
String execDir = executionDir;
if (Strings.isBlank(execDir)) {
[2/6] brooklyn-server git commit: Typos
Posted by al...@apache.org.
Typos
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/83a99672
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/83a99672
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/83a99672
Branch: refs/heads/master
Commit: 83a9967264b9ca3a0d6035e903befcf5b3894863
Parents: e56de02
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Mon Nov 7 18:26:36 2016 +0000
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Thu Nov 10 10:31:41 2016 +0000
----------------------------------------------------------------------
.../brooklyn/core/sensor/PortAttributeSensorAndConfigKey.java | 2 +-
.../java/org/apache/brooklyn/entity/group/DynamicCluster.java | 2 +-
.../apache/brooklyn/location/ssh/SshMachineLocationTest.java | 6 +++---
.../org/apache/brooklyn/location/jclouds/JcloudsLocation.java | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/83a99672/core/src/main/java/org/apache/brooklyn/core/sensor/PortAttributeSensorAndConfigKey.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/sensor/PortAttributeSensorAndConfigKey.java b/core/src/main/java/org/apache/brooklyn/core/sensor/PortAttributeSensorAndConfigKey.java
index 556e7b0..9e42f77 100644
--- a/core/src/main/java/org/apache/brooklyn/core/sensor/PortAttributeSensorAndConfigKey.java
+++ b/core/src/main/java/org/apache/brooklyn/core/sensor/PortAttributeSensorAndConfigKey.java
@@ -134,7 +134,7 @@ public class PortAttributeSensorAndConfigKey extends AttributeSensorAndConfigKey
LOG.warn("{}: ports not applicable, or not yet applicable, because has multiple locations {}; ignoring ", new Object[] { entity, locations, getName() });
}
} else {
- LOG.warn("{}: ports not applicable, or not yet applicable, bacause has no locations; ignoring {}", entity, getName());
+ LOG.warn("{}: ports not applicable, or not yet applicable, because has no locations; ignoring {}", entity, getName());
}
return null;
}
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/83a99672/core/src/main/java/org/apache/brooklyn/entity/group/DynamicCluster.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/entity/group/DynamicCluster.java b/core/src/main/java/org/apache/brooklyn/entity/group/DynamicCluster.java
index f09e72f..f2112e8 100644
--- a/core/src/main/java/org/apache/brooklyn/entity/group/DynamicCluster.java
+++ b/core/src/main/java/org/apache/brooklyn/entity/group/DynamicCluster.java
@@ -198,7 +198,7 @@ public interface DynamicCluster extends AbstractGroup, Cluster, MemberReplaceabl
"cluster.entity", "The cluster an entity is a member of");
AttributeSensor<Boolean> CLUSTER_ONE_AND_ALL_MEMBERS_UP = Sensors.newBooleanSensor(
- "cluster.one_and_all.members.up", "True cluster is running, there is on member, and all members are service.isUp");
+ "cluster.one_and_all.members.up", "True if the cluster is running, there is one member, and all members are service.isUp");
/**
* Changes the cluster size by the given number.
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/83a99672/core/src/test/java/org/apache/brooklyn/location/ssh/SshMachineLocationTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/location/ssh/SshMachineLocationTest.java b/core/src/test/java/org/apache/brooklyn/location/ssh/SshMachineLocationTest.java
index 82d9001..2c7a78d 100644
--- a/core/src/test/java/org/apache/brooklyn/location/ssh/SshMachineLocationTest.java
+++ b/core/src/test/java/org/apache/brooklyn/location/ssh/SshMachineLocationTest.java
@@ -246,7 +246,7 @@ public class SshMachineLocationTest extends BrooklynAppUnitTestSupport {
@Test(groups = "Integration")
public void testCopyStreamTo() throws Exception {
String contents = "abc";
- File dest = new File(Os.tmp(), "sssMachineLocationTest_dest.tmp");
+ File dest = new File(Os.tmp(), "sshMachineLocationTest_dest.tmp");
try {
host.copyTo(Streams.newInputStreamWithContents(contents), dest.getAbsolutePath());
assertEquals("abc", Files.readFirstLine(dest, Charsets.UTF_8));
@@ -257,7 +257,7 @@ public class SshMachineLocationTest extends BrooklynAppUnitTestSupport {
@Test(groups = "Integration")
public void testInstallUrlTo() throws Exception {
- File dest = new File(Os.tmp(), "sssMachineLocationTest_dir/");
+ File dest = new File(Os.tmp(), "sshMachineLocationTest_dir/");
dest.mkdir();
try {
int result = host.installTo("https://raw.github.com/brooklyncentral/brooklyn/master/README.md", Urls.mergePaths(dest.getAbsolutePath(), "README.md"));
@@ -271,7 +271,7 @@ public class SshMachineLocationTest extends BrooklynAppUnitTestSupport {
@Test(groups = "Integration")
public void testInstallClasspathCopyTo() throws Exception {
- File dest = new File(Os.tmp(), "sssMachineLocationTest_dir/");
+ File dest = new File(Os.tmp(), "sshMachineLocationTest_dir/");
dest.mkdir();
try {
int result = host.installTo("classpath://brooklyn/config/sample.properties", Urls.mergePaths(dest.getAbsolutePath(), "sample.properties"));
http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/83a99672/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
index c58bdbd..423326f 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
@@ -3460,7 +3460,7 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im
}
if (sshHostAndPort.isPresent() || inferredHostAndPort != null) {
if (isWindows(node, setup)) {
- LOG.warn("Cannpy query aws-ec2 Windows instance "+node.getId()+"@"+node.getLocation()+" over ssh for its hostname; falling back to jclouds metadata for address");
+ LOG.warn("Error querying aws-ec2 Windows instance "+node.getId()+"@"+node.getLocation()+" over ssh for its hostname; falling back to jclouds metadata for address");
} else {
HostAndPort hostAndPortToUse = sshHostAndPort.isPresent() ? sshHostAndPort.get() : inferredHostAndPort;
try {
[6/6] brooklyn-server git commit: This closes #422
Posted by al...@apache.org.
This closes #422
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/d6f2c569
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/d6f2c569
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/d6f2c569
Branch: refs/heads/master
Commit: d6f2c569ef81d6effefb6cb5da9ae8712ca6dca1
Parents: 6a4ca64 c256fa9
Author: Aled Sage <al...@gmail.com>
Authored: Thu Nov 10 14:20:27 2016 +0000
Committer: Aled Sage <al...@gmail.com>
Committed: Thu Nov 10 14:20:27 2016 +0000
----------------------------------------------------------------------
.../core/effector/ssh/SshCommandEffector.java | 19 ++++++++++---------
.../sensor/PortAttributeSensorAndConfigKey.java | 2 +-
.../core/sensor/ssh/SshCommandSensor.java | 3 ++-
.../brooklyn/entity/group/DynamicCluster.java | 2 +-
.../location/ssh/SshMachineLocationTest.java | 6 +++---
.../util/core/xstream/XmlSerializerTest.java | 2 +-
.../location/jclouds/JcloudsLocation.java | 2 +-
parent/pom.xml | 5 -----
.../brooklyn/entity/AbstractEc2LiveTest.java | 16 +++++++++++++---
9 files changed, 32 insertions(+), 25 deletions(-)
----------------------------------------------------------------------