Skip to content

Commit

Permalink
Updated messages about checksum validation failures on install. (netd…
Browse files Browse the repository at this point in the history
…ata#10448)

* Updated messages about checksum validation failures on install.

They now explain the most common cause of the failures and suggest the
most direct way to fix the situation.

* Fix checksums.

* Clean up messages as suggested by @joelhans.
  • Loading branch information
Ferroin authored and Saruspete committed Mar 17, 2021
1 parent 141fc2b commit 98456b1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packaging/installer/kickstart-static64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ else
fi

if ! grep netdata-latest.gz.run "${TMPDIR}/sha256sum.txt" | safe_sha256sum -c - > /dev/null 2>&1; then
fatal "Static binary checksum validation failed. Stopping netdata installation and leaving binary in ${TMPDIR}"
fatal "Static binary checksum validation failed. Stopping Netdata Agent installation and leaving binary in ${TMPDIR}\nUsually this is a result of an older copy of the file being cached somewhere upstream and can be resolved by retrying in an hour."
fi

# ----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion packaging/installer/kickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ else
fi

if ! grep netdata-latest.tar.gz "${ndtmpdir}/sha256sum.txt" | safe_sha256sum -c - > /dev/null 2>&1; then
fatal "Tarball checksum validation failed. Stopping netdata installation and leaving tarball in ${ndtmpdir}"
fatal "Tarball checksum validation failed. Stopping Netdata Agent installation and leaving tarball in ${ndtmpdir}.\nUsually this is a result of an older copy of the file being cached somewhere upstream and can be resolved by retrying in an hour."
fi
run tar -xf netdata-latest.tar.gz
rm -rf netdata-latest.tar.gz > /dev/null 2>&1
Expand Down
2 changes: 1 addition & 1 deletion packaging/installer/methods/kickstart-64.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ To use `md5sum` to verify the intregity of the `kickstart-static64.sh` script yo
command above, run the following:

```bash
[ "efddf41d3c19c4988601aecf5b483e3a" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
[ "047c86a7c8905955bee39b6980a28e30" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
```

If the script is valid, this command will return `OK, VALID`.
Expand Down
2 changes: 1 addition & 1 deletion packaging/installer/methods/kickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ To use `md5sum` to verify the intregity of the `kickstart.sh` script you will do
run the following:

```bash
[ "71e0dbb4af6f2cc7e89d358a1a942341" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
[ "8df7a45b2abb336c84507b7c107bcba3" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
```

If the script is valid, this command will return `OK, VALID`.
Expand Down
4 changes: 2 additions & 2 deletions packaging/installer/netdata-updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ update() {
else
download "${NETDATA_TARBALL_URL}" "${ndtmpdir}/netdata-latest.tar.gz"
if ! grep netdata-latest.tar.gz sha256sum.txt | safe_sha256sum -c - >&3 2>&3; then
fatal "Tarball checksum validation failed. Stopping netdata upgrade and leaving tarball in ${ndtmpdir}"
fatal "Tarball checksum validation failed. Stopping netdata upgrade and leaving tarball in ${ndtmpdir}\nUsually this is a result of an older copy of the tarball or checksum file being cached somewhere upstream and can be resolved by retrying in an hour."
fi
NEW_CHECKSUM="$(safe_sha256sum netdata-latest.tar.gz 2> /dev/null | cut -d' ' -f1)"
tar -xf netdata-latest.tar.gz >&3 2>&3
Expand Down Expand Up @@ -392,7 +392,7 @@ if [ "${IS_NETDATA_STATIC_BINARY}" == "yes" ]; then
download "${NETDATA_TARBALL_CHECKSUM_URL}" "${ndtmpdir}/sha256sum.txt"
download "${NETDATA_TARBALL_URL}" "${ndtmpdir}/netdata-latest.gz.run"
if ! grep netdata-latest.gz.run "${ndtmpdir}/sha256sum.txt" | safe_sha256sum -c - > /dev/null 2>&1; then
fatal "Static binary checksum validation failed. Stopping netdata installation and leaving binary in ${ndtmpdir}"
fatal "Static binary checksum validation failed. Stopping netdata installation and leaving binary in ${ndtmpdir}\nUsually this is a result of an older copy of the file being cached somehere and can be resolved by simply retrying in an hour."
fi

# Do not pass any options other than the accept, for now
Expand Down

0 comments on commit 98456b1

Please sign in to comment.