diff --git a/aws-experiment-launch/experiment/commander/main.go b/aws-experiment-launch/experiment/commander/main.go index ced3fa07b..63f9d903c 100644 --- a/aws-experiment-launch/experiment/commander/main.go +++ b/aws-experiment-launch/experiment/commander/main.go @@ -94,7 +94,7 @@ func dictateNode(addr string, command string) { log.Printf("Failed to send command to %s", addr) return } - log.Printf("Send: %s", command) + log.Printf("Send \"%s\" to %s", command, addr) // read response buff := make([]byte, 1024) diff --git a/aws-experiment-launch/experiment/soldier/main.go b/aws-experiment-launch/experiment/soldier/main.go index b40461c53..7aa8d9a7f 100644 --- a/aws-experiment-launch/experiment/soldier/main.go +++ b/aws-experiment-launch/experiment/soldier/main.go @@ -96,6 +96,10 @@ func handleCommand(command string, w *bufio.Writer) { { handleKillCommand(w) } + case "ping": + { + handlePingCommand(w) + } } } @@ -142,6 +146,11 @@ func handleKillCommand(w *bufio.Writer) { logAndReply(w, "Kill command done.") } +func handlePingCommand(w *bufio.Writer) { + log.Println("Ping command") + logAndReply(w, "I'm alive") +} + func logAndReply(w *bufio.Writer, message string) { log.Println(message) w.Write([]byte(message))