[ARVADOS] updated: 1.1.2-51-g79309a1

Git user git at public.curoverse.com
Wed Jan 10 10:24:04 EST 2018


Summary of changes:
 tools/arvbox/bin/arvbox                                  |  4 ++--
 tools/arvbox/lib/arvbox/docker/Dockerfile.base           | 11 ++++-------
 tools/arvbox/lib/arvbox/docker/common.sh                 |  7 +++----
 tools/arvbox/lib/arvbox/docker/runit/1                   |  7 +++++++
 tools/arvbox/lib/arvbox/docker/runit/2                   | 10 ++++++++++
 tools/arvbox/lib/arvbox/docker/runit/3                   | 14 ++++++++++++++
 tools/arvbox/lib/arvbox/docker/runit/ctrlaltdel          | 13 +++++++++++++
 tools/arvbox/lib/arvbox/docker/service/docker/run        | 10 ++++++++--
 tools/arvbox/lib/arvbox/docker/service/ready/run-service |  3 ---
 tools/arvbox/lib/arvbox/docker/service/workbench/run     |  4 +++-
 10 files changed, 64 insertions(+), 19 deletions(-)
 create mode 100755 tools/arvbox/lib/arvbox/docker/runit/1
 create mode 100755 tools/arvbox/lib/arvbox/docker/runit/2
 create mode 100755 tools/arvbox/lib/arvbox/docker/runit/3
 create mode 100755 tools/arvbox/lib/arvbox/docker/runit/ctrlaltdel

       via  79309a1e149b8d3e62810a32769de30e71be7688 (commit)
       via  8e4fe3e615430ed48631ce15bd3ba3b0864ab03e (commit)
       via  99bc798d924e267cb71d5176fd6cde1edfe9b344 (commit)
       via  94b8d1c4a4152a0b0f1cd531d396eb49e738d6c7 (commit)
      from  7bfb9fd099ada6b7466ec3531caebbd5ac0970ba (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 79309a1e149b8d3e62810a32769de30e71be7688
Merge: 7bfb9fd 8e4fe3e
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Wed Jan 10 10:23:10 2018 -0500

    Merge branch '12940-arvbox-runit' closes #12940
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>


commit 8e4fe3e615430ed48631ce15bd3ba3b0864ab03e
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Tue Jan 9 17:49:07 2018 -0500

    12940: Fix fallback when overlay2 isn't available for docker-in-docker
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/tools/arvbox/lib/arvbox/docker/Dockerfile.base b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
index f667bc1..83d507b 100644
--- a/tools/arvbox/lib/arvbox/docker/Dockerfile.base
+++ b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
@@ -92,9 +92,6 @@ ADD crunch-setup.sh gitolite.rc \
     application_yml_override.py api-setup.sh \
     /usr/local/lib/arvbox/
 
-RUN mkdir /etc/docker
-ADD daemon.json /etc/docker/
-
 ADD runit /etc/runit
 
 # Start the supervisor.
diff --git a/tools/arvbox/lib/arvbox/docker/service/docker/run b/tools/arvbox/lib/arvbox/docker/service/docker/run
index cbc8486..b6dbaf1 100755
--- a/tools/arvbox/lib/arvbox/docker/service/docker/run
+++ b/tools/arvbox/lib/arvbox/docker/service/docker/run
@@ -100,6 +100,12 @@ rm -rf /var/run/docker.pid
 read pid cmd state ppid pgrp session tty_nr tpgid rest < /proc/self/stat
 trap "kill -TERM -$pgrp; exit" EXIT TERM KILL SIGKILL SIGTERM SIGQUIT
 
-if ! docker daemon --storage-driver=overlay $DOCKER_DAEMON_ARGS ; then
-    docker daemon $DOCKER_DAEMON_ARGS
+mkdir /etc/docker
+# Prefer overlay2
+echo '{"storage-driver": "overlay2"}' > /etc/docker/daemon.json
+
+if ! dockerd ; then
+    # Oops overlay2 didn't work, let docker choose a default.
+    echo '{}' > /etc/docker/daemon.json
+    dockerd
 fi

commit 99bc798d924e267cb71d5176fd6cde1edfe9b344
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Tue Jan 9 17:02:49 2018 -0500

    12940: Fix bundler issues
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/tools/arvbox/lib/arvbox/docker/common.sh b/tools/arvbox/lib/arvbox/docker/common.sh
index c5e1523..2cb8473 100644
--- a/tools/arvbox/lib/arvbox/docker/common.sh
+++ b/tools/arvbox/lib/arvbox/docker/common.sh
@@ -46,17 +46,16 @@ run_bundler() {
     else
         frozen=""
     fi
-    if ! test -x bundle ; then
+    if ! test -x /var/lib/gems/bin/bundler ; then
         bundlergem=$(ls -r $GEM_HOME/cache/bundler-*.gem 2>/dev/null | head -n1 || true)
         if test -n "$bundlergem" ; then
             flock /var/lib/gems/gems.lock gem install --local --no-document $bundlergem
         else
             flock /var/lib/gems/gems.lock gem install --no-document bundler
         fi
-        ln -sf /var/lib/gems/bin/bundle /usr/local/bin
     fi
-    if ! flock /var/lib/gems/gems.lock bundle install --path $GEM_HOME --local --no-deployment $frozen "$@" ; then
-        flock /var/lib/gems/gems.lock bundle install --path $GEM_HOME --no-deployment $frozen "$@"
+    if ! flock /var/lib/gems/gems.lock bundler install --path $GEM_HOME --local --no-deployment $frozen "$@" ; then
+        flock /var/lib/gems/gems.lock bundler install --path $GEM_HOME --no-deployment $frozen "$@"
     fi
 }
 
diff --git a/tools/arvbox/lib/arvbox/docker/runit/2 b/tools/arvbox/lib/arvbox/docker/runit/2
index eae8c82..6b092ea 100755
--- a/tools/arvbox/lib/arvbox/docker/runit/2
+++ b/tools/arvbox/lib/arvbox/docker/runit/2
@@ -2,5 +2,9 @@
 
 PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
 
+echo
+echo "Arvados-in-a-box starting"
+echo
+
 exec env - PATH=$PATH \
 runsvdir -P $SVDIR
diff --git a/tools/arvbox/lib/arvbox/docker/runit/ctrlaltdel b/tools/arvbox/lib/arvbox/docker/runit/ctrlaltdel
new file mode 100755
index 0000000..02bb2ea
--- /dev/null
+++ b/tools/arvbox/lib/arvbox/docker/runit/ctrlaltdel
@@ -0,0 +1,13 @@
+#!/bin/sh
+exec 2>&1
+
+PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin
+
+LAST=0
+test -x /run/runit.reboot && LAST=6
+
+echo 'Waiting for services to stop...'
+sv -w196 force-stop $SVDIR/*
+sv exit $SVDIR/*
+
+echo 'Shutdown...'
diff --git a/tools/arvbox/lib/arvbox/docker/service/ready/run-service b/tools/arvbox/lib/arvbox/docker/service/ready/run-service
index 3c7eff6..6d5fe24 100755
--- a/tools/arvbox/lib/arvbox/docker/service/ready/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/ready/run-service
@@ -8,9 +8,6 @@
 set -eu -o pipefail
 
 if ! [[ -d /tmp/arvbox-ready ]] ; then
-   echo
-   echo "Arvados-in-a-box starting"
-   echo
    echo "Note: if this is a fresh arvbox installation, it may take 10-15 minutes (or longer) to download and"
    echo "install dependencies.  Use \"arvbox log\" to monitor the progress of specific services."
    echo
diff --git a/tools/arvbox/lib/arvbox/docker/service/workbench/run b/tools/arvbox/lib/arvbox/docker/service/workbench/run
index a41922b..d90a2e2 100755
--- a/tools/arvbox/lib/arvbox/docker/service/workbench/run
+++ b/tools/arvbox/lib/arvbox/docker/service/workbench/run
@@ -1,10 +1,12 @@
-#!/bin/sh
+#!/bin/bash
 # Copyright (C) The Arvados Authors. All rights reserved.
 #
 # SPDX-License-Identifier: AGPL-3.0
 
 set -e
 
+.  /usr/local/lib/arvbox/common.sh
+
 /usr/local/lib/arvbox/runsu.sh $0-service $1
 
 cd /usr/src/arvados/apps/workbench

commit 94b8d1c4a4152a0b0f1cd531d396eb49e738d6c7
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Tue Jan 9 15:39:21 2018 -0500

    12940: Use runit directly instead of runsvinit
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/tools/arvbox/bin/arvbox b/tools/arvbox/bin/arvbox
index f4a65da..234d15a 100755
--- a/tools/arvbox/bin/arvbox
+++ b/tools/arvbox/bin/arvbox
@@ -220,8 +220,8 @@ run() {
                        "--volume=$PIPCACHE:/var/lib/pip:rw" \
                        "--volume=$NPMCACHE:/var/lib/npm:rw" \
                        "--volume=$GOSTUFF:/var/lib/gopath:rw" \
-                       arvados/arvbox-dev$TAG \
-                       /usr/local/bin/runsvinit -svdir=/etc/test-service
+		       "--env=SVDIR=/etc/test-service" \
+                       arvados/arvbox-dev$TAG
 
                 docker exec -ti \
                        $ARVBOX_CONTAINER \
diff --git a/tools/arvbox/lib/arvbox/docker/Dockerfile.base b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
index f29066e..f667bc1 100644
--- a/tools/arvbox/lib/arvbox/docker/Dockerfile.base
+++ b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
@@ -62,10 +62,6 @@ RUN mkdir -p /etc/apt/sources.list.d && \
 
 RUN rm -rf /var/lib/postgresql && mkdir -p /var/lib/postgresql
 
-RUN cd /root && \
-    GOPATH=$PWD go get github.com/curoverse/runsvinit && \
-    install bin/runsvinit /usr/local/bin
-
 ENV PJSVERSION=1.9.8
 # bitbucket is the origin, but downloads fail sometimes, so use our own mirror instead.
 #ENV PJSURL=https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-${PJSVERSION}-linux-x86_64.tar.bz2
@@ -99,5 +95,9 @@ ADD crunch-setup.sh gitolite.rc \
 RUN mkdir /etc/docker
 ADD daemon.json /etc/docker/
 
+ADD runit /etc/runit
+
 # Start the supervisor.
-CMD ["/usr/local/bin/runsvinit"]
+ENV SVDIR /etc/service
+STOPSIGNAL SIGINT
+CMD ["/sbin/runit"]
diff --git a/tools/arvbox/lib/arvbox/docker/runit/1 b/tools/arvbox/lib/arvbox/docker/runit/1
new file mode 100755
index 0000000..fea9cf6
--- /dev/null
+++ b/tools/arvbox/lib/arvbox/docker/runit/1
@@ -0,0 +1,7 @@
+#!/bin/sh
+# system one time tasks
+
+PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin
+
+touch /run/runit.stopit
+chmod 0 /run/runit.stopit
diff --git a/tools/arvbox/lib/arvbox/docker/runit/2 b/tools/arvbox/lib/arvbox/docker/runit/2
new file mode 100755
index 0000000..eae8c82
--- /dev/null
+++ b/tools/arvbox/lib/arvbox/docker/runit/2
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
+
+exec env - PATH=$PATH \
+runsvdir -P $SVDIR
diff --git a/tools/arvbox/lib/arvbox/docker/runit/3 b/tools/arvbox/lib/arvbox/docker/runit/3
new file mode 100755
index 0000000..525b96b
--- /dev/null
+++ b/tools/arvbox/lib/arvbox/docker/runit/3
@@ -0,0 +1,14 @@
+#!/bin/sh
+exec 2>&1
+
+PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin
+
+LAST=0
+test -x /run/runit.reboot && LAST=6
+
+echo 'Waiting for services to stop...'
+sv -w196 force-stop /service/*
+sv exit /service/*
+
+echo 'Shutdown...'
+/etc/init.d/rc $LAST

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list