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/05/22 11:39:24 UTC
[04/11] incubator-brooklyn git commit: chef delete uses `-y`,
and ensure validity of node name
chef delete uses `-y`, and ensure validity of node name
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/a49162f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/a49162f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/a49162f5
Branch: refs/heads/master
Commit: a49162f5bbb7a57d7b8185ecbdb2ca5e0fc16a61
Parents: 7ab18f6
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Mon May 18 11:36:08 2015 +0100
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Mon May 18 11:36:42 2015 +0100
----------------------------------------------------------------------
.../java/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a49162f5/software/base/src/main/java/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java b/software/base/src/main/java/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
index e82aaec..46b8894 100644
--- a/software/base/src/main/java/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
+++ b/software/base/src/main/java/brooklyn/entity/chef/ChefLifecycleEffectorTasks.java
@@ -101,7 +101,7 @@ public class ChefLifecycleEffectorTasks extends MachineLifecycleEffectorTasks im
// in addition to supporting hard-coded node names (which is all we support so far).
String nodeName = entity().getConfig(ChefConfig.CHEF_NODE_NAME);
- if (Strings.isNonBlank(nodeName)) return nodeName;
+ if (Strings.isNonBlank(nodeName)) return Strings.makeValidFilename(nodeName);
// node name is taken from ID of this entity, if not specified
return entity().getId();
}
@@ -306,8 +306,8 @@ public class ChefLifecycleEffectorTasks extends MachineLifecycleEffectorTasks im
// (ie allow us to actually decommission the machine)
TaskTags.markInessential(
new KnifeTaskFactory<String>("delete node and client registration at chef server")
- .add("knife node delete "+getNodeName())
- .add("knife client delete "+getNodeName())
+ .add("knife node delete "+getNodeName()+" -y")
+ .add("knife client delete "+getNodeName()+" -y")
.requiringZeroAndReturningStdout()
.newTask() ));
}