Github user neykov commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/370#discussion_r23770643
--- Diff:
software/base/src/main/java/brooklyn/entity/brooklynnode/effector/BrooklynNodeUpgradeEffectorBody.java
---
@@ -132,44 +193,34 @@ public Void call(ConfigBag parametersO) {
Predicates.equalTo(ManagementNodeState.HOT_STANDBY),
Duration.FIVE_MINUTES));
// 3 stop new version
- // 4 stop old version
- ConfigBag stopParameters = ConfigBag.newInstance();
- stopParameters.put(StopSoftwareParameters.STOP_MACHINE,
Boolean.FALSE);
- DynamicTasks.queue(Tasks.builder().name("shutdown original and
transient nodes")
- .add(Effectors.invocation(dryRunChild,
BrooklynNode.STOP_NODE_BUT_LEAVE_APPS, stopParameters))
- .add(Effectors.invocation(entity(),
BrooklynNode.STOP_NODE_BUT_LEAVE_APPS, stopParameters))
+ DynamicTasks.queue(Tasks.builder().name("shutdown transient node")
+ .add(Effectors.invocation(dryRunChild,
BrooklynNode.STOP_NODE_BUT_LEAVE_APPS,
ImmutableMap.of(StopSoftwareParameters.STOP_MACHINE, Boolean.FALSE)))
.build());
- // 5 move old files, and move new files
- DynamicTasks.queue(Tasks.builder().name("setup new
version").body(new Runnable() {
- @Override
- public void run() {
- String runDir =
entity().getAttribute(SoftwareProcess.RUN_DIR);
- String bkDir = Urls.mergePaths(runDir, "..",
Urls.getBasename(runDir)+"-backups", dryRunNodeUid);
- String dryRunDir =
Preconditions.checkNotNull(dryRunChild.getAttribute(SoftwareProcess.RUN_DIR));
- log.debug(this+" storing backup of previous version in
"+bkDir);
- DynamicTasks.queue(SshEffectorTasks.ssh(
- "cd "+runDir,
- "mkdir -p "+bkDir,
- "mv * "+bkDir,
- "cd "+dryRunDir,
- "mv * "+runDir
--- End diff --
If I remember correctly, this was done on purpose to force the customize
step and regenerate the local-brooklyn.properties. Definitely worth a comment.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---