Browse Source

log install script before sleeping for debug

tags/v0.2.0
Jonathan Cobb 4 years ago
parent
commit
8a9b2f74c8
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      bubble-server/src/main/java/bubble/service/cloud/StandardNetworkService.java

+ 3
- 3
bubble-server/src/main/java/bubble/service/cloud/StandardNetworkService.java View File

@@ -329,7 +329,7 @@ public class StandardNetworkService implements NetworkService {
boolean setupOk = false; boolean setupOk = false;
final String nodeUser = node.getUser(); final String nodeUser = node.getUser();
final String script = getAnsibleSetupScript(automation, sshArgs, nodeUser, sshTarget); final String script = getAnsibleSetupScript(automation, sshArgs, nodeUser, sshTarget);
waitForDebugger();
waitForDebugger(script);


log.info("newNode: running script:\n"+script); log.info("newNode: running script:\n"+script);
for (int i=0; i<MAX_ANSIBLE_TRIES; i++) { for (int i=0; i<MAX_ANSIBLE_TRIES; i++) {
@@ -383,10 +383,10 @@ public class StandardNetworkService implements NetworkService {
return node; return node;
} }


public void waitForDebugger() {
public void waitForDebugger(String script) {
if (Boolean.parseBoolean(configuration.getEnvironment().get(ENV_DEBUG_NODE_INSTALL))) { if (Boolean.parseBoolean(configuration.getEnvironment().get(ENV_DEBUG_NODE_INSTALL))) {
final String msg = "waitForDebugger: debugging installation, waiting for " + abs(DEBUG_NODE_INSTALL_FILE) + " to exist"; final String msg = "waitForDebugger: debugging installation, waiting for " + abs(DEBUG_NODE_INSTALL_FILE) + " to exist";
log.info(msg);
log.info(msg+" before running script:\n"+script);
while (!DEBUG_NODE_INSTALL_FILE.exists()) { while (!DEBUG_NODE_INSTALL_FILE.exists()) {
sleep(SECONDS.toMillis(10), msg); sleep(SECONDS.toMillis(10), msg);
} }


Loading…
Cancel
Save