Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .github/buildomat/jobs/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion tools/dtrace/get-ds-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/dtrace/get-lr-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/dtrace/get-up-state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 21 additions & 12 deletions tools/make-dtrace.sh → tools/make-utils.sh
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down Expand Up @@ -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