[arvados] updated: 2.4.2-8-gef6764858

git repository hosting git at public.arvados.org
Wed Aug 31 16:04:12 UTC 2022


Summary of changes:
 tools/compute-images/scripts/base.sh               |  8 +---
 .../scripts/create-ebs-volume-nvme.patch           | 49 ----------------------
 2 files changed, 2 insertions(+), 55 deletions(-)
 delete mode 100644 tools/compute-images/scripts/create-ebs-volume-nvme.patch

       via  ef67648588a87151f04d708c294ed59dba53cda0 (commit)
      from  571e3176596b852c2f1385487e459126c3d3fd04 (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 ef67648588a87151f04d708c294ed59dba53cda0
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 b6df3d3f4..f661130a6 100644
--- a/tools/compute-images/scripts/base.sh
+++ b/tools/compute-images/scripts/base.sh
@@ -188,13 +188,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