← Back to team overview

sts-sponsors team mailing list archive

[Merge] ~troyanov/maas:remove-maas-test-enlistment-script into maas:master

 

Anton Troyanov has proposed merging ~troyanov/maas:remove-maas-test-enlistment-script into maas:master.

Commit message:
chore: remove maas-test-enlistment script


Requested reviews:
  MAAS Maintainers (maas-maintainers)

For more details, see:
https://code.launchpad.net/~troyanov/maas/+git/maas/+merge/440380

This script doesn't seem to be used anywhere.
-- 
Your team MAAS Committers is subscribed to branch maas:master.
diff --git a/debian/maas-rack-controller.install b/debian/maas-rack-controller.install
index d3c6b4f..2ec2e87 100644
--- a/debian/maas-rack-controller.install
+++ b/debian/maas-rack-controller.install
@@ -1,9 +1,6 @@
 # Install maas-dhcp-helper
 package-files/usr/sbin/maas-dhcp-helper usr/sbin
 
-# Install test scripts
-package-files/usr/lib/maas/maas-test-enlistment usr/lib/maas
-
 # Install all other stuff
 debian/extras/99-maas-sudoers etc/sudoers.d
 usr/bin/maas-rack usr/sbin
diff --git a/package-files/usr/lib/maas/maas-test-enlistment b/package-files/usr/lib/maas/maas-test-enlistment
deleted file mode 100755
index e965e93..0000000
--- a/package-files/usr/lib/maas/maas-test-enlistment
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/bash -e
-
-# Copyright 2017 Canonical Ltd.  This software is licensed under the
-# GNU Affero General Public License version 3 (see the file LICENSE).
-
-# This script tests enlistment by requesting boot loader configuration from
-# MAAS, then parsing it to look for cloud-config and metadata server URLs.
-# This allows the user to sanity-check that enlisting nodes will be able
-# to reach the MAAS server. In addition, validates that required boot loader
-# binaries exist, and prints their sha256 sums.
-
-TMPDIR="$(mktemp -d)"
-
-function cleanup() {
-    rm -rf "$TMPDIR"
-}
-
-trap cleanup EXIT
-
-server=${1:-localhost}
-
-PXE_CFG_URL="tftp://$server/pxelinux.cfg/default-amd64-generic";
-curl -s "$PXE_CFG_URL" > "$TMPDIR/pxe-config"
-
-echo ""
-echo "===== BEGIN PXE CONFIG ====="
-cat "$TMPDIR/pxe-config"
-echo "===== END PXE CONFIG ====="
-
-GRUB_CFG_URL="tftp://$server/grub/grub.cfg-default-amd64-generic";
-curl -s "$GRUB_CFG_URL" > "$TMPDIR/grub-config"
-echo ""
-echo "===== BEGIN GRUB CONFIG ====="
-cat "$TMPDIR/grub-config"
-echo "===== END GRUB CONFIG ====="
-
-CONFIG_URL=$(cat "$TMPDIR/pxe-config" \
-    | grep '  APPEND.*cloud-config-url' \
-    | tr ' ' '\n' \
-    | grep cloud-config-url \
-    | cut -f2- -d=)
-echo ""
-echo "Found cloud-config-url: $CONFIG_URL"
-curl -s "$CONFIG_URL" > "$TMPDIR/enlist-config"
-
-echo ""
-echo "===== BEGIN ENLISTMENT CLOUD-CONFIG ====="
-cat "$TMPDIR/enlist-config"
-echo "===== END ENLISTMENT CLOUD-CONFIG ====="
-
-METADATA_URL=$(cat "$TMPDIR/enlist-config" \
-    | grep 'metadata_url: ' \
-    | awk '{ print $2 }')
-echo ""
-echo "Found metadata URL: $METADATA_URL"
-
-
-LOADERS="
-    tftp://$server/pxelinux.0
-    tftp://$server/chain.c32
-    tftp://$server/ifcpu64.c32
-    tftp://$server/ldlinux.c32
-    tftp://$server/libcom32.c32
-    tftp://$server/libutil.c32
-    tftp://$server/bootx64.efi
-    tftp://$server/grubx64.efi
-    tftp://$server/grubaa64.efi
-    tftp://$server/bootppc64.bin
-"
-
-set -o pipefail
-echo ""
-echo "===== BEGIN BOOT LOADER SHA256 SUMS ====="
-for loader in $LOADERS; do
-    loader_sha256=$(curl -sqf "$loader" | sha256sum | awk '{ print $1 }' || touch $TMPDIR/not-found)
-    if [ -f $TMPDIR/not-found ]; then
-        loader_sha256="[WARNING: file not found]"
-        rm $TMPDIR/not-found
-    fi
-    printf "%40s\n%10s%s\n\n" "$loader" "" "$loader_sha256"
-done
-echo "===== END BOOT LOADER SHA256 SUMS ====="

Follow ups