[arvados] updated: 2.1.0-2867-g83deb3f45

git repository hosting git at public.arvados.org
Thu Sep 1 21:02:49 UTC 2022


Summary of changes:
 tools/compute-images/arvados-images-aws.json       |  4 --
 tools/compute-images/scripts/base.sh               |  8 +---
 .../scripts/create-ebs-volume-nvme.patch           | 49 ----------------------
 ...nsure-encrypted-partitions-aws-ebs-autoscale.sh |  4 +-
 .../usr-local-bin-ensure-encrypted-partitions.sh   |  4 +-
 5 files changed, 6 insertions(+), 63 deletions(-)
 delete mode 100644 tools/compute-images/scripts/create-ebs-volume-nvme.patch

       via  83deb3f45fac5dff0ea8739532064484b757592e (commit)
       via  0d80c586d7477b3aec5c53a9d9bda458a4448516 (commit)
       via  ecfa53f5d61a709787cae8f771bc346817466b49 (commit)
      from  6f020ee8e060d44811e92f5b3faa1b1cba876b42 (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 83deb3f45fac5dff0ea8739532064484b757592e
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Thu Sep 1 16:47:02 2022 -0400

    Use "systemctl disable" instead of "service docker stop" refs #19439
    
    "service docker stop" stops the daemon but it can be restarted from
    prematurely by socket activation.  Whoops!
    
    We need to use "systemctl disable" it so that it doesn't wake up
    during the scratch space surgery on the /tmp directory.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/tools/compute-images/scripts/usr-local-bin-ensure-encrypted-partitions-aws-ebs-autoscale.sh b/tools/compute-images/scripts/usr-local-bin-ensure-encrypted-partitions-aws-ebs-autoscale.sh
index 4b73c8bc4..abc63a2e9 100644
--- a/tools/compute-images/scripts/usr-local-bin-ensure-encrypted-partitions-aws-ebs-autoscale.sh
+++ b/tools/compute-images/scripts/usr-local-bin-ensure-encrypted-partitions-aws-ebs-autoscale.sh
@@ -24,7 +24,7 @@ if [ -d /etc/sv/docker.io ]
 then
   sv stop docker.io || service stop docker.io || true
 else
-  service docker stop || true
+  systemctl disable --now docker.service docker.socket || true
 fi
 
 ensure_umount "$MOUNTPATH/docker/aufs"
@@ -44,7 +44,7 @@ then
   ## runit
   sv up docker.io
 else
-  service docker start
+  systemctl enable --now docker.service docker.socket
 fi
 
 end=$((SECONDS+60))
diff --git a/tools/compute-images/scripts/usr-local-bin-ensure-encrypted-partitions.sh b/tools/compute-images/scripts/usr-local-bin-ensure-encrypted-partitions.sh
index 462158e04..a76dc1210 100644
--- a/tools/compute-images/scripts/usr-local-bin-ensure-encrypted-partitions.sh
+++ b/tools/compute-images/scripts/usr-local-bin-ensure-encrypted-partitions.sh
@@ -121,7 +121,7 @@ if [ -d /etc/sv/docker.io ]
 then
   sv stop docker.io || service stop docker.io || true
 else
-  service docker stop || true
+  systemctl disable --now docker.service docker.socket || true
 fi
 
 ensure_umount "$MOUNTPATH/docker/aufs"
@@ -143,7 +143,7 @@ then
   ## runit
   sv up docker.io
 else
-  service docker start
+  systemctl enable --now docker.service docker.socket || true
 fi
 
 end=$((SECONDS+60))

commit 0d80c586d7477b3aec5c53a9d9bda458a4448516
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Wed Aug 31 12:55:51 2022 -0400

    Don't include the patch any more, refs #19439
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/tools/compute-images/arvados-images-aws.json b/tools/compute-images/arvados-images-aws.json
index 9e07b461c..505f60ed7 100644
--- a/tools/compute-images/arvados-images-aws.json
+++ b/tools/compute-images/arvados-images-aws.json
@@ -83,10 +83,6 @@
     "type": "file",
     "source": "scripts/usr-local-bin-ensure-encrypted-partitions-aws-ebs-autoscale.sh",
     "destination": "/tmp/usr-local-bin-ensure-encrypted-partitions-aws-ebs-autoscale.sh"
-  },{
-    "type": "file",
-    "source": "scripts/create-ebs-volume-nvme.patch",
-    "destination": "/tmp/create-ebs-volume-nvme.patch"
   },{
     "type": "file",
     "source": "{{user `public_key_file`}}",

commit ecfa53f5d61a709787cae8f771bc346817466b49
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Wed Aug 31 11:59:40 2022 -0400

    Pull our fork of amazon-ebs-autoscale for nvme support, refs #19439
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/tools/compute-images/scripts/base.sh b/tools/compute-images/scripts/base.sh
index 816036f38..d186f4c52 100644
--- a/tools/compute-images/scripts/base.sh
+++ b/tools/compute-images/scripts/base.sh
@@ -187,13 +187,9 @@ else
   unzip -q /tmp/awscliv2.zip -d /tmp && $SUDO /tmp/aws/install
   # Pinned to v2.4.5 because we apply a patch below
   #export EBS_AUTOSCALE_VERSION=$(curl --silent "https://api.github.com/repos/awslabs/amazon-ebs-autoscale/releases/latest" | jq -r .tag_name)
-  export EBS_AUTOSCALE_VERSION="v2.4.5"
-  cd /opt && $SUDO git clone https://github.com/awslabs/amazon-ebs-autoscale.git
+  export EBS_AUTOSCALE_VERSION="5ca6e24e05787b8ae1184c2a10db80053ddd3038"
+  cd /opt && $SUDO git clone https://github.com/arvados/amazon-ebs-autoscale.git
   cd /opt/amazon-ebs-autoscale && $SUDO git checkout $EBS_AUTOSCALE_VERSION
-  $SUDO patch -p1 < /tmp/create-ebs-volume-nvme.patch
-
-  # This script really requires bash and the shebang line is wrong
-  $SUDO sed -i 's|^#!/bin/sh|#!/bin/bash|' /opt/amazon-ebs-autoscale/bin/ebs-autoscale
 
   # Set up the cloud-init script that makes use of the AWS EBS autoscaler
   $SUDO mv /tmp/usr-local-bin-ensure-encrypted-partitions-aws-ebs-autoscale.sh /usr/local/bin/ensure-encrypted-partitions.sh
diff --git a/tools/compute-images/scripts/create-ebs-volume-nvme.patch b/tools/compute-images/scripts/create-ebs-volume-nvme.patch
deleted file mode 100644
index 79ce487d5..000000000
--- a/tools/compute-images/scripts/create-ebs-volume-nvme.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-
-Make the create-ebs-volume script work with nvme devices.
-
-diff --git a/bin/create-ebs-volume b/bin/create-ebs-volume
-index 6857564..e3122fa 100755
---- a/bin/create-ebs-volume
-+++ b/bin/create-ebs-volume
-@@ -149,10 +149,11 @@ function get_next_logical_device() {
-     for letter in ${alphabet[@]}; do
-         # use /dev/xvdb* device names to avoid contention for /dev/sd* and /dev/xvda names
-         # only supported by HVM instances
--        if [ ! -b "/dev/xvdb${letter}" ]; then
-+        if [[ $created_volumes =~ .*/dev/xvdb${letter}.* ]]; then
-+            continue
-+        fi
-             echo "/dev/xvdb${letter}"
-             break
--        fi
-     done
- }
- 
-@@ -323,8 +324,13 @@ function create_and_attach_volume() {
- 
-     logthis "waiting for volume $volume_id on filesystem"
-     while true; do
--        if [ -e "$device" ]; then
--            logthis "volume $volume_id on filesystem as $device"
-+        # AWS returns e.g. vol-00338247831716a7b4, the kernel changes that to vol00338247831716a7b
-+        valid_volume_id=`echo $volume_id |sed -e 's/[^a-zA-Z0-9]//'`
-+        # example lsblk output:
-+        # nvme4n1                     259:7    0  150G  0 disk            vol00338247831716a7b
-+        if LSBLK=`lsblk -o NAME,SERIAL |grep $valid_volume_id`; then
-+            nvme_device=/dev/`echo $LSBLK|cut -f1 -d' '`
-+            logthis "volume $volume_id on filesystem as $nvme_device (aws device $device)"
-             break
-         fi
-         sleep 1
-@@ -338,7 +344,7 @@ function create_and_attach_volume() {
-     > /dev/null
-     logthis "volume $volume_id DeleteOnTermination ENABLED"
- 
--    echo $device
-+    echo "$nvme_device"
- }
- 
- create_and_attach_volume

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list