gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 124/141: use kameleon nfs image


From: gnunet
Subject: [taler-grid5k] 124/141: use kameleon nfs image
Date: Thu, 18 Nov 2021 14:51:05 +0100

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit 0e3d06438ae798efd04db9c2106a3c3a1de0a3a2
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Thu Nov 11 15:30:41 2021 +0100

    use kameleon nfs image
---
 experiment/experiment-specification.yml            |  1 +
 experiment/scripts/wallet.sh                       |  3 ++
 experiment/setup.sh                                |  4 +-
 image/grid5000/debian11-x64-common.yaml            |  2 +-
 image/grid5000/debian11-x64-min.yaml               | 27 -----------
 image/grid5000/debian11-x64-nfs.yaml               | 24 ++++++++++
 .../steps/data/helpers/export_appliance.py         |  0
 .../steps/data/helpers/netinstall_iso_finder.py    |  0
 .../steps/data/helpers/simple_http_server.py       |  0
 .../files/std/g5k-manager/g5k-disk-manager-backend | 54 +++++++++++++++-------
 .../env/manifests/base/configure_omnipath.pp       |  7 +++
 .../env/manifests/big/configure_nvidia_gpu/cuda.pp |  8 ++++
 .../env/manifests/big/install_g5k_jupyterlab.pp    |  5 +-
 .../env/manifests/common/software_versions.pp      | 16 +++++--
 image/grid5000/steps/export/export_g5k.yaml        |  7 ++-
 .../setup/debian/clean_unnecessary_packages.yaml   |  9 ----
 image/taler-debian11.yaml                          | 11 +++--
 17 files changed, 108 insertions(+), 70 deletions(-)

diff --git a/experiment/experiment-specification.yml 
b/experiment/experiment-specification.yml
index aa18601..11f8e3f 100755
--- a/experiment/experiment-specification.yml
+++ b/experiment/experiment-specification.yml
@@ -7,6 +7,7 @@ upload:
     permission: "774"
   - bundled: taler-perf.sh
     permission: "700"
+  # Contains information about allocated nodes
   - meta: experiment-info.json
 execute:
   # Setup DNS and Environment config
diff --git a/experiment/scripts/wallet.sh b/experiment/scripts/wallet.sh
index ca84b7e..d2990b7 100755
--- a/experiment/scripts/wallet.sh
+++ b/experiment/scripts/wallet.sh
@@ -25,6 +25,9 @@ RUNNING=$(ps -aux | grep "[wallet]-cli" | wc -l)
 
 case "$1" in
   stop)
+    if [[ "${NUM_PROCESSES}" = "logging" ]]; then
+      systemctl stop taler-wallet@logging.service
+    fi
     let "START=${RUNNING}-${NUM_PROCESSES}+1"
     for i in $(seq ${START} ${RUNNING})
     do
diff --git a/experiment/setup.sh b/experiment/setup.sh
index b376a04..cfdf365 100644
--- a/experiment/setup.sh
+++ b/experiment/setup.sh
@@ -39,8 +39,8 @@ fi
 systemctl daemon-reload
 systemctl restart dnsmasq
 
-exec ~/scripts/createusers.sh
-
 mv ~/taler-perf.sh /usr/local/bin/taler-perf
 
+source ~/scripts/createusers.sh
+
 exit 0
diff --git a/image/grid5000/debian11-x64-common.yaml 
b/image/grid5000/debian11-x64-common.yaml
index b2af6d3..6b53d71 100644
--- a/image/grid5000/debian11-x64-common.yaml
+++ b/image/grid5000/debian11-x64-common.yaml
@@ -24,7 +24,7 @@ global:
   g5k_tar_compression: "zstd"
   g5k_postinst_path: server:///grid5000/postinstalls/g5k-postinstall.tgz
   g5k_postinst_compression: "gzip"
-  g5k_postinst_script: g5k-postinstall --net debian
+  g5k_postinst_script: g5k-postinstall --net debian --disk-aliases
   g5k_kernel_params: ""
   deb_backports: true
   # grub-efi-amd64-bin has to be installed if we want to support both mbr and
diff --git a/image/grid5000/debian11-x64-min.yaml 
b/image/grid5000/debian11-x64-min.yaml
deleted file mode 100644
index 969fd3b..0000000
--- a/image/grid5000/debian11-x64-min.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
-#==============================================================================
-# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
-#==============================================================================
-#
-# DESCRIPTION: Debian bullseye (11) x64 min Grid'5000 environment
-#
-#==============================================================================
----
-extend: ./debian11-x64-common.yaml
-
-global:
-  # Grid'5000 environment variant
-  g5k_variant: min
-  # clean_unnecessary_packages step settings (packages debfoster must keep)
-  default_packages_no_clean: 
g5k-meta-packages-$${distrib}$${release_number}-$${g5k_variant} tgz-g5k gnupg 
linux-image-$${deb_arch} console-setup rsync locales firmware-bnx2 
firmware-bnx2x firmware-qlogic
-  arch_packages_no_clean: grub-pc grub-efi-amd64-bin
-  other_packages_no_clean:
-
-bootstrap:
-  - "@base"
-
-setup:
-  - clean_unnecessary_packages
-  - "@base"
-
-export:
-  - "@base"
diff --git a/image/grid5000/debian11-x64-nfs.yaml 
b/image/grid5000/debian11-x64-nfs.yaml
new file mode 100644
index 0000000..09a450d
--- /dev/null
+++ b/image/grid5000/debian11-x64-nfs.yaml
@@ -0,0 +1,24 @@
+#==============================================================================
+# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
+#==============================================================================
+#
+# DESCRIPTION: Debian bullseye (11) x64 nfs Grid'5000 environment
+#
+#==============================================================================
+---
+extend: ./debian11-x64-common.yaml
+
+global:
+  # Grid'5000 environment variant
+  g5k_variant: nfs
+  # Grid'5000 Kadeploy environment parameters
+  g5k_postinst_script: g5k-postinstall --net debian --fstab nfs 
--restrict-user current --disk-aliases
+
+bootstrap:
+  - "@base"
+
+setup:
+  - "@base"
+
+export:
+  - "@base"
diff --git a/image/grid5000/steps/data/helpers/export_appliance.py 
b/image/grid5000/steps/data/helpers/export_appliance.py
old mode 100755
new mode 100644
diff --git a/image/grid5000/steps/data/helpers/netinstall_iso_finder.py 
b/image/grid5000/steps/data/helpers/netinstall_iso_finder.py
old mode 100755
new mode 100644
diff --git a/image/grid5000/steps/data/helpers/simple_http_server.py 
b/image/grid5000/steps/data/helpers/simple_http_server.py
old mode 100755
new mode 100644
diff --git 
a/image/grid5000/steps/data/setup/puppet/modules/env/files/std/g5k-manager/g5k-disk-manager-backend
 
b/image/grid5000/steps/data/setup/puppet/modules/env/files/std/g5k-manager/g5k-disk-manager-backend
index 97192ea..16c8e28 100644
--- 
a/image/grid5000/steps/data/setup/puppet/modules/env/files/std/g5k-manager/g5k-disk-manager-backend
+++ 
b/image/grid5000/steps/data/setup/puppet/modules/env/files/std/g5k-manager/g5k-disk-manager-backend
@@ -14,6 +14,9 @@ ENABLE_LAST_DELAY = 2
 
 def main
   options = parse_cmdline
+  if duplicate_scsi_ids?
+    error(1, 'Multiple disks have the same scsi_id in their by_path: we cannot 
identify them correctly to run megacli')
+  end
   start
   if options[:on_boot]
     startup_service(options[:force])
@@ -35,7 +38,7 @@ end
 def parse_cmdline
   options = {}
   OptionParser.new do |opts|
-    opts.banner = 'Usage: g5k-disk-manager-backend [--enable 1,2,3] [--disable 
4,5]'
+    opts.banner = 'Usage: g5k-disk-manager-backend [--enable 
disk1,disk2,disk3] [--disable disk4,disk5]'
     opts.on('--on-boot', 'Enable all disks at boot time') do |v|
       options[:on_boot] = v
     end
@@ -57,7 +60,7 @@ def parse_cmdline
 end
 
 # The aim of this function is to activate all disks of the node in a predefined
-# order, so that sdb, sdc, ... devices names are always given to the same
+# order, so that disk1, disk2, ... devices names are always given to the same
 # physical disks.
 # It must be done just before g5k-checks is launched on the node, to avoid
 # g5k-checks errors.
@@ -65,7 +68,7 @@ end
 def startup_service(force)
   _status, hostname = sh('hostname')
 
-  unless reservable_disks?
+  if RESERVABLE_DISKS.empty?
     notice "This cluster doesn't have reservable disks: exit service"
     close
   end
@@ -92,8 +95,8 @@ def startup_service(force)
     close
   end
 
-  # Remove the first disk from the list (first disk is the main disk sda)
-  physical_disks.shift
+  # Remove the main disk from the list
+  physical_disks.delete_if { |pd| pd[:device_id] == 
MAIN_DISK['by_path'].gsub(/.*\d+:\d+:(\d+):\d+$/,'\1').to_i }
 
   # Disable then enable the disks
   disable(physical_disks)
@@ -132,24 +135,20 @@ end
 def disks_locations(physical_disks, ids)
   return [] if ids.nil?
 
-  ids = ids.split(',').map { |e| e.strip.to_i }
+  ids = ids.split(',').map { |e| e.strip }
+  error(4, "Too much disk ids in argument") if ids.length >= 
physical_disks.length
   disks = []
   ids.each do |id|
-    # id == 0 corresponds to the main disk sda
-    error(4, "Wrong disk id: #{id}") if id <= 0 || id >= physical_disks.length
-    disks.push(physical_disks[id])
+    # id == disk0 corresponds to the main disk
+    error(4, "Wrong disk id: #{id}") if id == 'disk0'
+    # We assume that the device ID used by megacli is this captured digit in 
by_path
+    # See: 
https://github.com/eLvErDe/hwraid/blob/master/wrapper-scripts/megaclisas-status#L301
+    device_id = 
RESERVABLE_DISKS[id]['by_path'].gsub(/.*\d+:\d+:(\d+):\d+$/,'\1').to_i
+    disks.push(physical_disks.select { |x| x[:device_id] == device_id }.first)
   end
   disks
 end
 
-# Clusters with reservable disks are clusters whose
-# reference-repository storage_devices property contains property
-# reservation: true
-def reservable_disks?
-  ref_api = File.read('/etc/grid5000/ref-api.json')
-  JSON.parse(ref_api)['storage_devices'].select { |sd| sd['reservation'] }.any?
-end
-
 def megacli_compliant?
   # Get the number or RAID controllers supported by megacli
   # The return code of the command is the number of controllers supported
@@ -276,9 +275,30 @@ def disable(physical_disks)
   num_disable_errors
 end
 
+# Clusters with reservable disks are clusters whose
+# reference-repository storage_devices property contains property
+# reservation: true
+# The main disk is the one with id 'disk0'
+def g5k_disks
+  ref_api = File.read('/etc/grid5000/ref-api.json')
+  reservable_disks = JSON.parse(ref_api)['storage_devices'].select { |sd| 
sd['reservation'] }
+    .map { |sd| [sd['id'], sd] }.to_h
+  main_disk = JSON.parse(ref_api)['storage_devices'].select { |sd| sd['id'] == 
'disk0' }.first
+  [reservable_disks, main_disk]
+end
+
+# We assume that the by-path of a disk is containing the device ID used by 
megacli
+# to enable or disable it. However, if for some reason this ID can be the same
+# for multiple disks, we prefer to fail and investiguate the issue.
+def duplicate_scsi_ids?
+  ids = RESERVABLE_DISKS.map { |_id, rd| 
rd['by_path'].gsub(/.*\d+:\d+:(\d+):\d+$/,'\1') }
+  (ids - ids.uniq).any?
+end
+
 # Main program
 
 MEGACLI = '/usr/sbin/megacli'.freeze
+RESERVABLE_DISKS, MAIN_DISK = g5k_disks
 
 _status, TMPDIR = sh('mktemp -d /tmp/tmp.g5k-disk-manager-backend.XXXXXX')
 main
diff --git 
a/image/grid5000/steps/data/setup/puppet/modules/env/manifests/base/configure_omnipath.pp
 
b/image/grid5000/steps/data/setup/puppet/modules/env/manifests/base/configure_omnipath.pp
index d13058f..35defd9 100644
--- 
a/image/grid5000/steps/data/setup/puppet/modules/env/manifests/base/configure_omnipath.pp
+++ 
b/image/grid5000/steps/data/setup/puppet/modules/env/manifests/base/configure_omnipath.pp
@@ -27,6 +27,13 @@ class env::base::configure_omnipath(){
           ensure => present
         })
       }
+      file {
+        # Fix PSM2, see #13470
+        '/lib/udev/rules.d/60-rdma-persistent-naming.rules':
+          ensure  => 'file',
+          content => 'ACTION=="add", SUBSYSTEM=="infiniband", 
PROGRAM="rdma_rename %k NAME_KERNEL"',
+          require => Package['rdma-core'];
+      }
     }
     'buster': {
       $opapackages = ['opa-address-resolution', 'opa-fastfabric', 
'libopamgt0', 'libopasadb1',
diff --git 
a/image/grid5000/steps/data/setup/puppet/modules/env/manifests/big/configure_nvidia_gpu/cuda.pp
 
b/image/grid5000/steps/data/setup/puppet/modules/env/manifests/big/configure_nvidia_gpu/cuda.pp
index 9e886bf..9ea131a 100644
--- 
a/image/grid5000/steps/data/setup/puppet/modules/env/manifests/big/configure_nvidia_gpu/cuda.pp
+++ 
b/image/grid5000/steps/data/setup/puppet/modules/env/manifests/big/configure_nvidia_gpu/cuda.pp
@@ -95,6 +95,10 @@ class env::big::configure_nvidia_gpu::cuda () {
               ensure    => installed;
           } -> package {
             'libhwloc-contrib-plugins':
+              install_options => ['-t', 'bullseye-backports'],
+              ensure    => installed;
+            'hwloc':
+              install_options => ['-t', 'bullseye-backports'],
               ensure    => installed;
           }
         }
@@ -108,6 +112,10 @@ class env::big::configure_nvidia_gpu::cuda () {
               ensure    => installed;
           } -> package {
             'libhwloc-contrib-plugins':
+              install_options => ['-t', 'bullseye-backports'],
+              ensure    => installed;
+            'hwloc':
+              install_options => ['-t', 'bullseye-backports'],
               ensure    => installed;
           }
         }
diff --git 
a/image/grid5000/steps/data/setup/puppet/modules/env/manifests/big/install_g5k_jupyterlab.pp
 
b/image/grid5000/steps/data/setup/puppet/modules/env/manifests/big/install_g5k_jupyterlab.pp
index 8cc0fd5..cb200a2 100644
--- 
a/image/grid5000/steps/data/setup/puppet/modules/env/manifests/big/install_g5k_jupyterlab.pp
+++ 
b/image/grid5000/steps/data/setup/puppet/modules/env/manifests/big/install_g5k_jupyterlab.pp
@@ -1,13 +1,14 @@
 class env::big::install_g5k_jupyterlab {
   case $operatingsystem {
     'Debian': {
-      if "${::lsbdistcodename}" != "stretch" {
+      if "${::lsbdistcodename}" != 'stretch' {
 
         include env::common::software_versions
 
         env::common::g5kpackages {
           'g5k-jupyterlab':
-            ensure => $::env::common::software_versions::g5k_jupyterlab;
+            ensure  => "${::env::common::software_versions::g5k_jupyterlab}",
+            release => "${::lsbdistcodename}";
         }
       }
     }
diff --git 
a/image/grid5000/steps/data/setup/puppet/modules/env/manifests/common/software_versions.pp
 
b/image/grid5000/steps/data/setup/puppet/modules/env/manifests/common/software_versions.pp
index 36c421a..0a6ae11 100644
--- 
a/image/grid5000/steps/data/setup/puppet/modules/env/manifests/common/software_versions.pp
+++ 
b/image/grid5000/steps/data/setup/puppet/modules/env/manifests/common/software_versions.pp
@@ -4,25 +4,31 @@ class env::common::software_versions {
   $g5k_subnets                 = '1.4.2'
   $g5k_meta_packages           = '0.7.46'
   $tgz_g5k                     = '2.0.17'
-  $g5k_checks                  = '0.11.2'
-  $sudo_g5k                    = '1.11'
+  $g5k_checks                  = '0.11.5'
+  $sudo_g5k                    = '1.12'
   $ganglia_monitor             = '3.6.0-7.1'
   $libguestfs_backport_arm64   = '1:1.40.2-7~bpog5k10+1'
   $libguestfs_backport_ppc64el = '1:1.40.2-7~bpog5k10+1'
   $lmod                        = '6.6-0.3g5k1'
-  $g5k_jupyterlab              = '0.6'
+  $g5k_jupyterlab              = '0.9'
   $rocm_version                = '4.3.1'
 
-  case "$env::deb_arch" {
+  case "${env::deb_arch}" {
     'amd64': {
       $nvidia_driver_arch         = 'x86_64'
       case $lsbdistcodename {
-        'stretch', 'buster': {
+        'stretch': {
           $nvidia_driver          = '450.119.04'
           $nvidia_cuda            = '10.1.243_418.87.00_linux'
           $datacenter_gpu_manager = '1:1.7.2'
           $dcgm_exporter          = '2.0.0-rc.11'
         }
+        'buster': {
+          $nvidia_driver          = '460.91.03'
+          $nvidia_cuda            = '10.1.243_418.87.00_linux'
+          $datacenter_gpu_manager = '1:1.7.2'
+          $dcgm_exporter          = '2.0.0-rc.11'
+        }
         'bullseye': {
           $nvidia_driver          = '460.91.03'
           $nvidia_cuda            = '11.2.2_460.32.03_linux'
diff --git a/image/grid5000/steps/export/export_g5k.yaml 
b/image/grid5000/steps/export/export_g5k.yaml
index 04b1358..3362908 100644
--- a/image/grid5000/steps/export/export_g5k.yaml
+++ b/image/grid5000/steps/export/export_g5k.yaml
@@ -10,6 +10,7 @@
 - g5k_destructive: "false"
 - g5k_tar_compression: "gzip"
 - g5k_postinst_compression: "gzip"
+- g5k_description: $${distrib} $${release_number} ($${release}) for 
$${g5k_image_arch} - $${g5k_variant}
 
 # - save_as_tgz:
 #   - check_cmd_local: guestfish
@@ -28,8 +29,9 @@
       cat << EOF > $${output}.dsc
       $${dashes}
       name: $${kameleon_recipe_name}
+      arch: $${arch}
       version: $${g5k_version}
-      description: $${distrib} $${release_number} ($${release}) for 
$${g5k_image_arch} - $${g5k_variant}
+      description: $${g5k_description}
       author: $${g5k_author}
       visibility: $${g5k_visibility}
       destructive: $${g5k_destructive}
@@ -54,8 +56,9 @@
       cat << EOF > $${output}.dsc
       $${dashes}
       name: $${kameleon_recipe_name}
+      arch: $${arch}
       version: $${g5k_version}
-      description: $${distrib} $${release_number} ($${release}) for 
$${g5k_image_arch} - $${g5k_variant}
+      description: $${g5k_description}
       author: $${g5k_author}
       visibility: $${g5k_visibility}
       destructive: $${g5k_destructive}
diff --git a/image/grid5000/steps/setup/debian/clean_unnecessary_packages.yaml 
b/image/grid5000/steps/setup/debian/clean_unnecessary_packages.yaml
deleted file mode 100644
index f9cfa37..0000000
--- a/image/grid5000/steps/setup/debian/clean_unnecessary_packages.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-- default_packages_no_clean: gnupg linux-image-$${deb_arch} console-setup 
rsync locales firmware-bnx2 firmware-bnx2x firmware-qlogic
-- arch_packages_no_clean: grub-pc grub-efi-amd64-bin
-- other_packages_no_clean:
-
-- clean_unnecessary_packages:
-    - on_setup_clean:
-        - exec_in: apt-get update && apt-get install -y debfoster
-        - exec_in: yes | debfoster --quiet --force -o MaxPriority=standard 
-oUseRecommends=yes $${default_packages_no_clean} $${arch_packages_no_clean} 
$${other_packages_no_clean} || true
-        - apt-get_in: clean
diff --git a/image/taler-debian11.yaml b/image/taler-debian11.yaml
index 13f651c..a251a5b 100644
--- a/image/taler-debian11.yaml
+++ b/image/taler-debian11.yaml
@@ -2,15 +2,17 @@
 # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
 #==============================================================================
 #
-# DESCRIPTION: Customization of a Debian 10 image with GNU Taler repositories.
+# DESCRIPTION: Recipe extending a Grid'5000 environment recipe supported by
+# the technical team. The build will be similar to the one of the supported
+# environments, involving puppet notably.
 #
 #==============================================================================
 # This recipe extends another. To look at the step involed, run:
-#   kameleon dryrun debian10_custom.yaml
+#   kameleon dryrun taler-debian11.yaml
 # To see the variables that you can override, use the following command:
-#   kameleon info debian10_custom.yaml
+#   kameleon info taler-debian11.yaml
 ---
-extend: grid5000/debian11-x64-min.yaml
+extend: grid5000/debian11-x64-nfs.yaml
 
 global:
   ### Uncomment and adapt the global variables below as needed
@@ -40,7 +42,6 @@ global:
   taler_build_packages: "recutils autoconf uncrustify autopoint libtool 
python3-pip libgcrypt20-dev libjansson-dev libcurl4-gnutls-dev libsodium-dev 
libidn2-dev libunistring-dev libmicrohttpd-dev libsqlite3-dev libqrencode-dev 
valgrind libpq-dev texinfo gdb make npm zip python3-distutils pkg-config"
   taler_packages: "nginx postgresql-13 postgresql-contrib curl jq bc sudo git 
zile dnsutils prometheus-postgres-exporter prometheus-nginx-exporter net-tools 
netcat parallel nodejs tshark dnsmasq"
   taler_packages_no_recommends: "prometheus prometheus-node-exporter"
-  other_packages_no_clean: "$${taler_packages} 
$${taler_packages_no_recommends} $${taler_build_packages}" 
   taler_disable_services: "nginx postgresql prometheus 
prometheus-postgres-exporter prometheus-nginx-exporter prometheus-node-exporter"
   taler_loki_version: "v2.4.0"
   gnunet_tar: gnunet.tar.gz

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]