Skip to content

Commit fa70367

Browse files
leftwoAlan Hanson
andauthored
Rename crucible-dtrace -> crucible-utils (#1803)
This changes the name of the "additional" tarball we stuff into the global zone. This will allow other utilities to be added to the same package and show up in the GZ as well, but not be under the "dtrace" directory. --------- Co-authored-by: Alan Hanson <[email protected]>
1 parent 3b6819c commit fa70367

File tree

5 files changed

+34
-24
lines changed

5 files changed

+34
-24
lines changed

.github/buildomat/jobs/build-release.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@
4444
#:
4545
#: [[publish]]
4646
#: series = "image"
47-
#: name = "crucible-dtrace.tar"
48-
#: from_output = "/out/crucible-dtrace.tar"
47+
#: name = "crucible-utils.tar"
48+
#: from_output = "/out/crucible-utils.tar"
4949
#:
5050
#: [[publish]]
5151
#: series = "image"
52-
#: name = "crucible-dtrace.sha256.txt"
53-
#: from_output = "/out/crucible-dtrace.sha256.txt"
52+
#: name = "crucible-utils.sha256.txt"
53+
#: from_output = "/out/crucible-utils.sha256.txt"
5454
#:
5555

5656
set -o errexit
@@ -110,17 +110,18 @@ banner nightly
110110
banner copy
111111
mv out/crucible-nightly.tar.gz /out/crucible-nightly.tar.gz
112112

113-
# Build the dtrace archive file which should include all the dtrace scripts.
113+
# Build the utils archive file which should include all the dtrace scripts
114+
# along with other tools we want to include on the sled.
114115
# This needs the ./out directory created above
115-
banner dtrace
116-
./tools/make-dtrace.sh
116+
banner utils
117+
./tools/make-utils.sh
117118

118119
banner copy
119-
mv out/crucible-dtrace.tar /out/crucible-dtrace.tar
120+
mv out/crucible-utils.tar /out/crucible-utils.tar
120121

121122
banner checksum
122123
cd /out
123124
digest -a sha256 crucible.tar.gz > crucible.sha256.txt
124125
digest -a sha256 crucible-pantry.tar.gz > crucible-pantry.sha256.txt
125126
digest -a sha256 crucible-nightly.tar.gz > crucible-nightly.sha256.txt
126-
digest -a sha256 crucible-dtrace.tar > crucible-dtrace.sha256.txt
127+
digest -a sha256 crucible-utils.tar > crucible-utils.sha256.txt

tools/dtrace/get-ds-state.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ filename='/tmp/get-ds-state.out'
77
# Clear out any previous state
88
echo "" > "$filename"
99
# Gather state on all running propolis servers, record summary to a file
10-
dtrace -s /opt/oxide/crucible_dtrace/get-ds-state.d | sort -n | uniq | awk 'NF' > "$filename"
10+
dtrace -s /opt/oxide/crucible_utils/get-ds-state.d | sort -n | uniq | awk 'NF' > "$filename"
1111
# Walk the lines in the file, append the zone name to each line.
1212
while read -r p; do
1313
# For each line in the file, pull out the PID we are looking at and

tools/dtrace/get-lr-state.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ filename='/tmp/get-lr-state.out'
77
# Clear out any previous state
88
echo "" > "$filename"
99
# Gather state on all running propolis servers, record summary to a file
10-
dtrace -s /opt/oxide/crucible_dtrace/get-lr-state.d | sort -n | uniq | awk 'NF' > "$filename"
10+
dtrace -s /opt/oxide/crucible_utils/get-lr-state.d | sort -n | uniq | awk 'NF' > "$filename"
1111
# Walk the lines in the file, append the zone name to each line.
1212
while read -r p; do
1313
# For each line in the file, pull out the PID we are looking at and

tools/dtrace/get-up-state.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ final='/tmp/get-up-state.final'
77
echo "" > $final
88

99
# Gather our output first.
10-
dtrace -Z -s /opt/oxide/crucible_dtrace/get-up-state.d | awk 'NF' > "$filename"
10+
dtrace -Z -s /opt/oxide/crucible_utils/get-up-state.d | awk 'NF' > "$filename"
1111
if [[ $? -ne 0 ]]; then
1212
exit 1
1313
fi

tools/make-dtrace.sh renamed to tools/make-utils.sh

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
#!/bin/bash
22
#
3-
# Build a tar archive with selected DTrace scripts.
3+
# Build a tar archive with selected DTrace scripts and other utilities
4+
# deemed useful to contain on the sled.
45
# This archive is used to install DTrace scripts on the global zone of each
56
# sled. As such, the scripts here should match the probes that exist for
67
# any consumer of the upstairs, like propolis, the pantry, or crucible agent.
78
set -eux
89

9-
rm -f out/crucible-dtrace.tar 2> /dev/null
10+
rm -f out/crucible-utils.tar 2> /dev/null
1011

1112
mkdir -p out
1213

1314

14-
echo "$(date) Create DTrace archive on $(hostname)" > /tmp/dtrace-info.txt
15-
echo "git log -1:" >> dtrace-info.txt
16-
git log -1 >> dtrace-info.txt
17-
echo "git status:" >> dtrace-info.txt
18-
git status >> dtrace-info.txt
19-
mv dtrace-info.txt tools/dtrace
15+
echo "$(date) Create tools archive on $(hostname)" > utils-info.txt
16+
echo "git log -1:" >> utils-info.txt
17+
git log -1 >> utils-info.txt
18+
echo "git status:" >> utils-info.txt
19+
git status >> utils-info.txt
20+
mv utils-info.txt tools/dtrace
2021

22+
# Add all the DTrace scripts and tools
2123
pushd tools/dtrace
22-
tar cvf ../../out/crucible-dtrace.tar \
23-
dtrace-info.txt \
24+
tar cvf ../../out/crucible-utils.tar \
25+
utils-info.txt \
2426
README.md \
2527
all_downstairs.d \
2628
downstairs_count.d \
@@ -52,6 +54,13 @@ tar cvf ../../out/crucible-dtrace.tar \
5254
upstairs_raw.d \
5355
upstairs_repair.d
5456

55-
rm dtrace-info.txt
57+
rm utils-info.txt
5658
popd
57-
ls -l out/crucible-dtrace.tar
59+
60+
# Add crucible-verify-raw
61+
pushd target/release
62+
tar -rf ../../out/crucible-utils.tar \
63+
crucible-verify-raw
64+
popd
65+
66+
ls -l out/crucible-utils.tar

0 commit comments

Comments
 (0)