Merge branch '3052-crunch-log-stdout' closes #3052
[arvados.git] / docker / arvdock
index 17b63b8a01c17aac5f48a981976edf96f4ae1ea2..e36e5cfd597cb06c7f0a89646eb6838177a0655a 100755 (executable)
@@ -83,11 +83,11 @@ function start_container {
     #echo "  $DOCKER run --dns=127.0.0.1 $args $image"
     echo "  $DOCKER run $args $image"
     container=`$DOCKER run $args $image`
-    if [[ "$?" != "0" ]]; then
+    if [ "$?" != "0" -o "$container" = "" ]; then
       echo "Unable to start container"
       exit 1
     fi
-    if [[ "$name" == "compute" || $ENABLE_SSH ]];
+    if [ "$name" == "compute" -o "$ENABLE_SSH" != "false" ];
     then
       ip=$(ip_address $container )
       echo
@@ -95,6 +95,8 @@ function start_container {
       echo
       echo "    ssh root@$ip"
       echo
+    else
+      echo "Started container: $container"
     fi
 
     if [[ "$name" == "doc_server" ]]; then
@@ -254,22 +256,12 @@ function do_start {
     then
       # We rely on skydock and skydns for dns discovery between the slurm controller and compute nodes,
       # so make sure they are running
-      $DOCKER images | grep skydns >/dev/null
-      if [[ "$?" != "0" ]]; then
-        echo "Downloading crosbymichael/skydns..."
-        $DOCKER pull crosbymichael/skydns
-      fi
       $DOCKER ps | grep skydns >/dev/null
       if [[ "$?" != "0" ]]; then
         echo "Starting crosbymichael/skydns container..."
         $DOCKER rm "skydns" 2>/dev/null
         $DOCKER run -d -p 172.17.42.1:53:53/udp --name skydns crosbymichael/skydns -nameserver 8.8.8.8:53 -domain arvados
       fi
-      $DOCKER images | grep skydock >/dev/null
-      if [[ "$?" != "0" ]]; then
-        echo "Downloading crosbymichael/skydock..."
-        $DOCKER pull crosbymichael/skydock
-      fi
       $DOCKER ps | grep skydock >/dev/null
       if [[ "$?" != "0" ]]; then
         echo "Starting crosbymichael/skydock container..."
@@ -295,11 +287,11 @@ function do_start {
             [ -f $v/keep/.metadata.yml ] && sudo rm $v/keep/.metadata.yml
         done
         start_container "25107:25107" "keep_server_0" \
-            "${keep_volumes[0]}:/dev/keep-0" \
+            "${keep_volumes[0]}:/keep-data" \
             "api_server:api" \
             "arvados/keep"
         start_container "25108:25107" "keep_server_1" \
-            "${keep_volumes[1]}:/dev/keep-0" \
+            "${keep_volumes[1]}:/keep-data" \
             "api_server:api" \
             "arvados/keep"
     fi