diff --git a/.github/buildomat/jobs/build-release.sh b/.github/buildomat/jobs/build-release.sh index a99d2fafb..32697afb0 100644 --- a/.github/buildomat/jobs/build-release.sh +++ b/.github/buildomat/jobs/build-release.sh @@ -44,13 +44,13 @@ #: #: [[publish]] #: series = "image" -#: name = "crucible-dtrace.tar" -#: from_output = "/out/crucible-dtrace.tar" +#: name = "crucible-utils.tar" +#: from_output = "/out/crucible-utils.tar" #: #: [[publish]] #: series = "image" -#: name = "crucible-dtrace.sha256.txt" -#: from_output = "/out/crucible-dtrace.sha256.txt" +#: name = "crucible-utils.sha256.txt" +#: from_output = "/out/crucible-utils.sha256.txt" #: set -o errexit @@ -110,17 +110,18 @@ banner nightly banner copy mv out/crucible-nightly.tar.gz /out/crucible-nightly.tar.gz -# Build the dtrace archive file which should include all the dtrace scripts. +# Build the utils archive file which should include all the dtrace scripts +# along with other tools we want to include on the sled. # This needs the ./out directory created above -banner dtrace -./tools/make-dtrace.sh +banner utils +./tools/make-utils.sh banner copy -mv out/crucible-dtrace.tar /out/crucible-dtrace.tar +mv out/crucible-utils.tar /out/crucible-utils.tar banner checksum cd /out digest -a sha256 crucible.tar.gz > crucible.sha256.txt digest -a sha256 crucible-pantry.tar.gz > crucible-pantry.sha256.txt digest -a sha256 crucible-nightly.tar.gz > crucible-nightly.sha256.txt -digest -a sha256 crucible-dtrace.tar > crucible-dtrace.sha256.txt +digest -a sha256 crucible-utils.tar > crucible-utils.sha256.txt diff --git a/tools/dtrace/get-ds-state.sh b/tools/dtrace/get-ds-state.sh index d7d28d5ca..7d3a79d8b 100755 --- a/tools/dtrace/get-ds-state.sh +++ b/tools/dtrace/get-ds-state.sh @@ -7,7 +7,7 @@ filename='/tmp/get-ds-state.out' # Clear out any previous state echo "" > "$filename" # Gather state on all running propolis servers, record summary to a file -dtrace -s /opt/oxide/crucible_dtrace/get-ds-state.d | sort -n | uniq | awk 'NF' > "$filename" +dtrace -s /opt/oxide/crucible_utils/get-ds-state.d | sort -n | uniq | awk 'NF' > "$filename" # Walk the lines in the file, append the zone name to each line. while read -r p; do # For each line in the file, pull out the PID we are looking at and diff --git a/tools/dtrace/get-lr-state.sh b/tools/dtrace/get-lr-state.sh index 537036591..858025b80 100755 --- a/tools/dtrace/get-lr-state.sh +++ b/tools/dtrace/get-lr-state.sh @@ -7,7 +7,7 @@ filename='/tmp/get-lr-state.out' # Clear out any previous state echo "" > "$filename" # Gather state on all running propolis servers, record summary to a file -dtrace -s /opt/oxide/crucible_dtrace/get-lr-state.d | sort -n | uniq | awk 'NF' > "$filename" +dtrace -s /opt/oxide/crucible_utils/get-lr-state.d | sort -n | uniq | awk 'NF' > "$filename" # Walk the lines in the file, append the zone name to each line. while read -r p; do # For each line in the file, pull out the PID we are looking at and diff --git a/tools/dtrace/get-up-state.sh b/tools/dtrace/get-up-state.sh index 619005cb4..d5ac60664 100755 --- a/tools/dtrace/get-up-state.sh +++ b/tools/dtrace/get-up-state.sh @@ -7,7 +7,7 @@ final='/tmp/get-up-state.final' echo "" > $final # Gather our output first. -dtrace -Z -s /opt/oxide/crucible_dtrace/get-up-state.d | awk 'NF' > "$filename" +dtrace -Z -s /opt/oxide/crucible_utils/get-up-state.d | awk 'NF' > "$filename" if [[ $? -ne 0 ]]; then exit 1 fi diff --git a/tools/make-dtrace.sh b/tools/make-utils.sh similarity index 59% rename from tools/make-dtrace.sh rename to tools/make-utils.sh index 43444e396..061de0911 100755 --- a/tools/make-dtrace.sh +++ b/tools/make-utils.sh @@ -1,26 +1,28 @@ #!/bin/bash # -# Build a tar archive with selected DTrace scripts. +# Build a tar archive with selected DTrace scripts and other utilities +# deemed useful to contain on the sled. # This archive is used to install DTrace scripts on the global zone of each # sled. As such, the scripts here should match the probes that exist for # any consumer of the upstairs, like propolis, the pantry, or crucible agent. set -eux -rm -f out/crucible-dtrace.tar 2> /dev/null +rm -f out/crucible-utils.tar 2> /dev/null mkdir -p out -echo "$(date) Create DTrace archive on $(hostname)" > /tmp/dtrace-info.txt -echo "git log -1:" >> dtrace-info.txt -git log -1 >> dtrace-info.txt -echo "git status:" >> dtrace-info.txt -git status >> dtrace-info.txt -mv dtrace-info.txt tools/dtrace +echo "$(date) Create tools archive on $(hostname)" > utils-info.txt +echo "git log -1:" >> utils-info.txt +git log -1 >> utils-info.txt +echo "git status:" >> utils-info.txt +git status >> utils-info.txt +mv utils-info.txt tools/dtrace +# Add all the DTrace scripts and tools pushd tools/dtrace -tar cvf ../../out/crucible-dtrace.tar \ - dtrace-info.txt \ +tar cvf ../../out/crucible-utils.tar \ + utils-info.txt \ README.md \ all_downstairs.d \ downstairs_count.d \ @@ -52,6 +54,13 @@ tar cvf ../../out/crucible-dtrace.tar \ upstairs_raw.d \ upstairs_repair.d -rm dtrace-info.txt +rm utils-info.txt popd -ls -l out/crucible-dtrace.tar + +# Add crucible-verify-raw +pushd target/release +tar -rf ../../out/crucible-utils.tar \ + crucible-verify-raw +popd + +ls -l out/crucible-utils.tar