Skip to content

Improve error handling in the kickstart script when fetching files.#22424

Draft
Ferroin wants to merge 1 commit into
netdata:masterfrom
Ferroin:ks-download-error-handling
Draft

Improve error handling in the kickstart script when fetching files.#22424
Ferroin wants to merge 1 commit into
netdata:masterfrom
Ferroin:ks-download-error-handling

Conversation

@Ferroin
Copy link
Copy Markdown
Member

@Ferroin Ferroin commented May 5, 2026

Summary

This adds code to differentiate between:

  • Failures to connect to the remote server
  • TLS errors
  • Inability to actually fetch the file due to a 4xx or 5xx error
  • Everything else

That, in turn, lets us give more accurate error information when we fail to download a file.

This also adds support for systems with GNU wget2 installed that do not include a wget compatibility link or a copy of curl (these systems should be rare, but a number of distros we support do technically allow for such a setup).

Test Plan

Requires manual testing to verify that everything still works.

Additional Information

Functionally equivalent to #22422, just for the kickstart script instead of the updater.


Summary by cubic

Improves the kickstart script’s download logic by classifying failures (connection, TLS, HTTP) and showing clear, specific messages. Adds support for systems that only have wget2, and hardens GitHub/package repo checks.

  • Bug Fixes

    • Returns distinct codes and messages for connection, TLS, and HTTP errors in remote checks, downloads, and redirects.
    • Avoids misreporting “file not found” when the network is down; adds clearer GitHub guidance.
    • Fails with a clear error if the uninstaller cannot be fetched; fixes “uninstaller” progress text.
  • New Features

    • Detects and uses wget2 if wget is missing; keeps BusyBox wget handling.

Written for commit cba45ff. Summary will update on new commits.

This adds code to differentiate between:

- Failures to connect to the remote server
- TLS errors
- Inability to actually fetch the file due to a 4xx or 5xx error
- Everything else

That, in turn, lets us give more accurate error information when we fail
to download a file.

This also adds support for systems with GNU wget2 installed that do not
include a `wget` compatibility link or a copy of `curl` (these systems
should be rare, but a number of distros we support do technically allow
for such a setup).
@github-actions github-actions Bot added the area/packaging Packaging and operating systems support label May 5, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/packaging Packaging and operating systems support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant