Merge branch 'master' into 15531-logincluster-migrate
authorPeter Amstutz <pamstutz@veritasgenetics.com>
Mon, 23 Sep 2019 21:35:07 +0000 (17:35 -0400)
committerPeter Amstutz <pamstutz@veritasgenetics.com>
Mon, 23 Sep 2019 21:35:07 +0000 (17:35 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>

12 files changed:
apps/workbench/test/integration_helper.rb
apps/workbench/test/test_helper.rb
build/package-build-dockerfiles/centos7/Dockerfile
build/package-test-dockerfiles/centos7/Dockerfile
build/run-build-packages.sh
build/run-tests.sh
doc/admin/upgrading.html.textile.liquid
services/dockercleaner/arvados-docker-cleaner.service
services/nodemanager/setup.py
tools/arvbox/lib/arvbox/docker/Dockerfile.demo
tools/arvbox/lib/arvbox/docker/service/composer/run-service
tools/crunchstat-summary/crunchstat_summary/summarizer.py

index 0c66e59c8cce0d3e03ed90e9952be8ff264c647e..7209f2b6c968f0285d0a71d8df4a2c22777068ef 100644 (file)
@@ -206,7 +206,7 @@ class ActionDispatch::IntegrationTest
   end
 
   teardown do
-    if not passed?
+    if !passed? && !skipped?
       screenshot
     end
     if Capybara.current_driver == :selenium
index 1d26deefa38bbe7c593d07d47dfe0d7d409cf49d..28a7fa51375bfd15acd9fc8b178eac7541376842 100644 (file)
@@ -348,3 +348,29 @@ end
 
 # Reset fixtures now (i.e., before any tests run).
 ActiveSupport::TestCase.reset_api_fixtures_now
+
+module Minitest
+  class Test
+    def capture_exceptions *args
+      begin
+        n = 0
+        begin
+          yield
+        rescue *PASSTHROUGH_EXCEPTIONS
+          raise
+        rescue Exception => e
+          n += 1
+          raise if n > 2 || e.is_a?(Skip)
+          STDERR.puts "Test failed, retrying (##{n})"
+          retry
+        end
+      rescue *PASSTHROUGH_EXCEPTIONS
+        raise
+      rescue Assertion => e
+        self.failures << e
+      rescue Exception => e
+        self.failures << UnexpectedError.new(e)
+      end
+    end
+  end
+end
index 3d3ea6f0f82798953c2d3eac7a646fa1240735a9..916c4abbb0037562c34e2dd1ecc46a6cb0ed1f77 100644 (file)
@@ -18,6 +18,17 @@ RUN gpg --import --no-tty /tmp/mpapis.asc && \
     /usr/local/rvm/bin/rvm alias create default ruby-2.5 && \
     /usr/local/rvm/bin/rvm-exec default gem install fpm --version 1.10.2
 
+# Install Bash 4.4.12 // see https://dev.arvados.org/issues/15612
+RUN cd /usr/local/src \
+&& wget http://ftp.gnu.org/gnu/bash/bash-4.4.12.tar.gz \
+&& wget http://ftp.gnu.org/gnu/bash/bash-4.4.12.tar.gz.sig \
+&& tar xzf bash-4.4.12.tar.gz \
+&& cd bash-4.4.12 \
+&& ./configure --prefix=/usr/local/$( basename $( pwd ) ) \
+&& make \
+&& make install \
+&& ln -sf /usr/local/src/bash-4.4.12/bash /bin/bash
+
 # Install golang binary
 ADD generated/go1.12.7.linux-amd64.tar.gz /usr/local/
 RUN ln -s /usr/local/go/bin/go /usr/local/bin/
@@ -28,8 +39,8 @@ RUN ln -s /usr/local/node-v6.11.2-linux-x64/bin/* /usr/local/bin/
 
 # Need to "touch" RPM database to workaround bug in interaction between
 # overlayfs and yum (https://bugzilla.redhat.com/show_bug.cgi?id=1213602)
-RUN touch /var/lib/rpm/* && yum -q -y install rh-python35
-RUN scl enable rh-python35 "easy_install-3.5 pip" && easy_install-2.7 pip
+RUN touch /var/lib/rpm/* && yum -q -y install rh-python36
+RUN scl enable rh-python36 "easy_install-3.6 pip" && easy_install-2.7 pip
 
 # Add epel, we need it for the python-pam dependency
 RUN wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
@@ -41,4 +52,4 @@ RUN git clone --depth 1 git://git.curoverse.com/arvados.git /tmp/arvados && cd /
 RUN pip install --upgrade setuptools
 
 ENV WORKSPACE /arvados
-CMD ["scl", "enable", "rh-python35", "/usr/local/rvm/bin/rvm-exec default bash /jenkins/run-build-packages.sh --target centos7"]
+CMD ["scl", "enable", "rh-python36", "/usr/local/rvm/bin/rvm-exec default bash /jenkins/run-build-packages.sh --target centos7"]
index 0bfe80b70d87178619d0e9a8049cfa23f61a0acd..49d04aa7444a89f03cea6e838d2703eba5319ad3 100644 (file)
@@ -18,6 +18,17 @@ RUN touch /var/lib/rpm/* && \
     /usr/local/rvm/bin/rvm install 2.3 && \
     /usr/local/rvm/bin/rvm alias create default ruby-2.3
 
+# Install Bash 4.4.12  // see https://dev.arvados.org/issues/15612
+RUN cd /usr/local/src \
+&& wget http://ftp.gnu.org/gnu/bash/bash-4.4.12.tar.gz \
+&& wget http://ftp.gnu.org/gnu/bash/bash-4.4.12.tar.gz.sig \
+&& tar xzf bash-4.4.12.tar.gz \
+&& cd bash-4.4.12 \
+&& ./configure --prefix=/usr/local/$( basename $( pwd ) ) \
+&& make \
+&& make install \
+&& ln -sf /usr/local/src/bash-4.4.12/bash /bin/bash
+
 # Add epel, we need it for the python-pam dependency
 RUN wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
 RUN rpm -ivh epel-release-latest-7.noarch.rpm
index bebcae0653ef0c54ea37cd5b50c06f03c8590520..fd313cf10ef8801d822245a7dcbd2876b5cf80e8 100755 (executable)
@@ -127,7 +127,7 @@ case "$TARGET" in
         PYTHON2_INSTALL_LIB=lib/python$PYTHON2_VERSION/site-packages
         PYTHON3_PACKAGE=$(rpm -qf "$(which python$PYTHON3_VERSION)" --queryformat '%{NAME}\n')
         PYTHON3_PKG_PREFIX=$PYTHON3_PACKAGE
-        PYTHON3_PREFIX=/opt/rh/rh-python35/root/usr
+        PYTHON3_PREFIX=/opt/rh/rh-python36/root/usr
         PYTHON3_INSTALL_LIB=lib/python$PYTHON3_VERSION/site-packages
         export PYCURL_SSL_LIBRARY=nss
         ;;
index d70722272cf70f9de8e4ff4a2384b7e89366eb8a..0c7909c6ae55693459c3266e218c17deb6ae3971 100755 (executable)
@@ -739,6 +739,7 @@ do_test() {
             ;;
         *)
             if ! start_services; then
+                checkexit 1 "$1 tests"
                 title "test $1 -- failed to start services"
                 return 1
             fi
@@ -1051,7 +1052,7 @@ test_govendor() {
 test_services/api() {
     rm -f "$WORKSPACE/services/api/git-commit.version"
     cd "$WORKSPACE/services/api" \
-        && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test TESTOPTS='-v -d' ${testargs[services/api]}
+        && eval env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake test TESTOPTS=\'-v -d\' ${testargs[services/api]}
 }
 
 test_sdk/ruby() {
@@ -1088,47 +1089,32 @@ test_services/nodemanager_integration() {
 
 test_apps/workbench_units() {
     local TASK="test:units"
-    if [[ -n "${testargs[apps/workbench]}" ]] || [[ -n "${testargs[apps/workbench_units]}" ]]; then
-        TASK="test"
-    fi
     cd "$WORKSPACE/apps/workbench" \
-        && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake ${TASK} TESTOPTS='-v -d' ${testargs[apps/workbench]} ${testargs[apps/workbench_units]}
+        && eval env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake ${TASK} TESTOPTS=\'-v -d\' ${testargs[apps/workbench]} ${testargs[apps/workbench_units]}
 }
 
 test_apps/workbench_functionals() {
     local TASK="test:functionals"
-    if [[ -n "${testargs[apps/workbench]}" ]] || [[ -n "${testargs[apps/workbench_functionals]}" ]]; then
-        TASK="test"
-    fi
     cd "$WORKSPACE/apps/workbench" \
-        && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake ${TASK} TESTOPTS='-v -d' ${testargs[apps/workbench]} ${testargs[apps/workbench_functionals]}
+        && eval env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake ${TASK} TESTOPTS=\'-v -d\' ${testargs[apps/workbench]} ${testargs[apps/workbench_functionals]}
 }
 
 test_apps/workbench_integration() {
     local TASK="test:integration"
-    if [[ -n "${testargs[apps/workbench]}" ]] || [[ -n "${testargs[apps/workbench_integration]}" ]]; then
-        TASK="test"
-    fi
     cd "$WORKSPACE/apps/workbench" \
-        && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake ${TASK} TESTOPTS='-v -d' ${testargs[apps/workbench]} ${testargs[apps/workbench_integration]}
+        && eval env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake ${TASK} TESTOPTS=\'-v -d\' ${testargs[apps/workbench]} ${testargs[apps/workbench_integration]} 
 }
 
 test_apps/workbench_benchmark() {
     local TASK="test:benchmark"
-    if [[ -n "${testargs[apps/workbench]}" ]] || [[ -n "${testargs[apps/workbench_benchmark]}" ]]; then
-        TASK="test"
-    fi
     cd "$WORKSPACE/apps/workbench" \
-        && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake ${TASK} ${testargs[apps/workbench_benchmark]}
+        && eval env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake ${TASK} ${testargs[apps/workbench_benchmark]}
 }
 
 test_apps/workbench_profile() {
     local TASK="test:profile"
-    if [[ -n "${testargs[apps/workbench]}" ]] || [[ -n "${testargs[apps/workbench_profile]}" ]]; then
-        TASK="test"
-    fi
     cd "$WORKSPACE/apps/workbench" \
-        && env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake ${TASK} ${testargs[apps/workbench_profile]}
+        && eval env RAILS_ENV=test ${short:+RAILS_TEST_SHORT=1} bundle exec rake ${TASK} ${testargs[apps/workbench_profile]}
 }
 
 install_deps() {
index e1e29ed128fb77ae4d238c6c12911fd35a9b081e..ddb52fc23aa8313e8c1a38045063eac8f98f6b33 100644 (file)
@@ -98,6 +98,12 @@ h4. Migrating to centralized config.yml
 
 See "Migrating Configuration":config-migration.html for notes on migrating legacy per-component configuration files to the new centralized @/etc/arvados/config.yml@.  To ensure a smooth transition, the per-component config files continue to be read, and take precedence over the centralized configuration.
 
+h3(#v1_4_1). v1.4.1 (2019-09-20)
+
+h4. Centos7 Python 3 dependency upgraded to rh-python36
+
+The Python 3 dependency for Centos7 Arvados packages was upgraded from rh-python35 to rh-python36.
+
 h3(#v1_4_0). v1.4.0 (2019-06-05)
 
 h4. Populating the new file_count and file_size_total columns on the collections table
index 29697e440a3dfb5a76f3752b97185301248cdb70..fca8d8b1266eab91aa81ba47b5c06744c6a38e84 100644 (file)
@@ -23,7 +23,7 @@ RestartPreventExitStatus=2
 # This unwieldy ExecStart command detects at runtime whether
 # arvados-docker-cleaner is installed with the Python 3.3 Software
 # Collection, and if so, invokes it with the "scl" wrapper.
-ExecStart=/bin/sh -c 'if [ -e /opt/rh/rh-python35/root/bin/arvados-docker-cleaner ]; then exec scl enable rh-python35 arvados-docker-cleaner; else exec arvados-docker-cleaner; fi'
+ExecStart=/bin/sh -c 'if [ -e /opt/rh/rh-python36/root/bin/arvados-docker-cleaner ]; then exec scl enable rh-python36 arvados-docker-cleaner; else exec arvados-docker-cleaner; fi'
 
 # systemd<=219 (centos:7, debian:8, ubuntu:trusty) obeys StartLimitInterval in the [Service] section
 StartLimitInterval=0
index fcfd36339a1550c24fde0ea6d53d3bcb72a523ea..a2b9a0ca92458a5c3b7b2b4af414b5451b922b75 100644 (file)
@@ -40,7 +40,7 @@ setup(name='arvados-node-manager',
           ('share/doc/arvados-node-manager', ['agpl-3.0.txt', 'README.rst', 'arvados-node-manager.service']),
       ],
       install_requires=[
-          'apache-libcloud>=2.3.1.dev1',
+          'apache-libcloud==2.5.0', # 2.6.0 cannot create azure nodes, #15649
           'arvados-python-client{}'.format(pysdk_dep),
           'future',
           'pykka < 2',
@@ -48,15 +48,12 @@ setup(name='arvados-node-manager',
           'setuptools',
           'subprocess32>=3.5.1',
       ],
-      dependency_links=[
-          "https://github.com/curoverse/libcloud/archive/apache-libcloud-2.3.1.dev1.zip"
-      ],
       test_suite='tests',
       tests_require=[
           'requests',
           'pbr<1.7.0',
           'mock>=1.0',
-          'apache-libcloud>=2.3.1.dev1',
+          'apache-libcloud==2.5.0',
           'subprocess32>=3.5.1',
       ],
       zip_safe=False
index dbfa3f1124e167ccb4a5898897d36fb1bfa6534d..e6caa4624eaaabe82143856879f44a11d5f20adf 100644 (file)
@@ -5,18 +5,22 @@
 FROM arvados/arvbox-base
 ARG arvados_version
 ARG sso_version=master
-ARG composer_version=master
+ARG composer_version=arvados-fork
 ARG workbench2_version=master
 
 RUN cd /usr/src && \
     git clone --no-checkout https://github.com/curoverse/arvados.git && \
     git -C arvados checkout ${arvados_version} && \
+    git -C arvados pull && \
     git clone --no-checkout https://github.com/curoverse/sso-devise-omniauth-provider.git sso && \
     git -C sso checkout ${sso_version} && \
+    git -C sso pull && \
     git clone --no-checkout https://github.com/curoverse/composer.git && \
     git -C composer checkout ${composer_version} && \
+    git -C composer pull && \
     git clone --no-checkout https://github.com/curoverse/arvados-workbench2.git workbench2 && \
-    git -C workbench2 checkout ${workbench2_version}
+    git -C workbench2 checkout ${workbench2_version} && \
+    git -C workbench2 pull
 
 ADD service/ /var/lib/arvbox/service
 RUN ln -sf /var/lib/arvbox/service /etc
index fffa3daba825d226babdb91ba419b7a1723b0cab..f0733e0c2b86ded24445a968670169ca80c953eb 100755 (executable)
@@ -18,5 +18,7 @@ if test "$1" = "--only-deps" ; then
     exit
 fi
 
-echo "API_HOST: ${localip}:${services[controller-ssl]}" > /usr/src/composer/src/composer.yml
-exec node_modules/.bin/ng serve --host 0.0.0.0 --port 4200 --env=webdev
+cat >/usr/src/composer/src/composer.yml <<EOF
+API_HOST: ${localip}:${services[controller-ssl]}
+EOF
+exec node_modules/.bin/ng serve --host 0.0.0.0 --port 4200 --env=webdev --ssl=true --sslCert="${server_cert}" --sslKey="${server_cert_key}"
index d99d3c1cf8324c4dd33f9bcdd72a15fa4f015d7c..2c49dcae62f1a30be179735e15d42a6b1e148934 100644 (file)
@@ -105,7 +105,7 @@ class Summarizer(object):
                                        self.label, uuid)
                         continue
                     logger.debug('%s: follow %s', self.label, uuid)
-                    child_summarizer = ProcessSummarizer(uuid)
+                    child_summarizer = NewSummarizer(uuid)
                     child_summarizer.stats_max = self.stats_max
                     child_summarizer.task_stats = self.task_stats
                     child_summarizer.tasks = self.tasks
@@ -526,7 +526,7 @@ def NewSummarizer(process_or_uuid, **kwargs):
 
 
 class ProcessSummarizer(Summarizer):
-    """Process is a job, pipeline, container, or container request."""
+    """Process is a job, pipeline, or container request."""
 
     def __init__(self, process, label=None, **kwargs):
         rdr = None
@@ -535,17 +535,16 @@ class ProcessSummarizer(Summarizer):
             label = self.process.get('name', self.process['uuid'])
         # Pre-Arvados v1.4 everything is in 'log'
         # For 1.4+ containers have no logs and container_requests have them in 'log_uuid', not 'log'
-        log_collection = self.process.get('log')
-        if not log_collection:
-            log_collection = self.process.get('log_uuid')
-        if log_collection:
+        log_collection = self.process.get('log', self.process.get('log_uuid'))
+        if log_collection and self.process.get('state') != 'Uncommitted': # arvados.util.CR_UNCOMMITTED:
             try:
                 rdr = crunchstat_summary.reader.CollectionReader(log_collection)
             except arvados.errors.NotFoundError as e:
                 logger.warning("Trying event logs after failing to read "
                                "log collection %s: %s", self.process['log'], e)
         if rdr is None:
-            rdr = crunchstat_summary.reader.LiveLogReader(self.process['uuid'])
+            uuid = self.process.get('container_uuid', self.process.get('uuid'))
+            rdr = crunchstat_summary.reader.LiveLogReader(uuid)
             label = label + ' (partial)'
         super(ProcessSummarizer, self).__init__(rdr, label=label, **kwargs)
         self.existing_constraints = self.process.get('runtime_constraints', {})