|
@@ -40,6 +40,24 @@ fi
|
|
|
# make sure /etc/profile does not change our current directory
|
|
|
cd "${NETDATA_SOURCE_DIR}" || exit 1
|
|
|
|
|
|
+# -----------------------------------------------------------------------------
|
|
|
+# set up handling for deferred error messages
|
|
|
+NETDATA_DEFERRED_ERRORS=""
|
|
|
+
|
|
|
+defer_error() {
|
|
|
+ NETDATA_DEFERRED_ERRORS="${NETDATA_DEFERRED_ERRORS}\n* ${1}"
|
|
|
+}
|
|
|
+
|
|
|
+print_deferred_errors() {
|
|
|
+ if [ -n "${NETDATA_DEFERRED_ERRORS}" ] ; then
|
|
|
+ echo >&2
|
|
|
+ echo >&2 "The following non-fatal errors were encountered during the installation process:"
|
|
|
+ # shellcheck disable=SC2059
|
|
|
+ printf >&2 "${NETDATA_DEFERRED_ERRORS}"
|
|
|
+ echo >&2
|
|
|
+ fi
|
|
|
+}
|
|
|
+
|
|
|
# -----------------------------------------------------------------------------
|
|
|
# load the required functions
|
|
|
|
|
@@ -480,9 +498,11 @@ bundle_libmosquitto() {
|
|
|
run_ok "libmosquitto built and prepared."
|
|
|
else
|
|
|
run_failed "Failed to build libmosquitto. The install process will continue, but you will not be able to connect this node to Netdata Cloud."
|
|
|
+ defer_error "Failed to build libmosquitto. The install process will continue, but you will not be able to connect this node to Netdata Cloud."
|
|
|
fi
|
|
|
else
|
|
|
run_failed "Unable to fetch sources for libmosquitto. The install process will continue, but you will not be able to connect this node to Netdata Cloud."
|
|
|
+ defer_error "Unable to fetch sources for libmosquitto. The install process will continue, but you will not be able to connect this node to Netdata Cloud."
|
|
|
fi
|
|
|
}
|
|
|
|
|
@@ -532,9 +552,11 @@ bundle_libwebsockets() {
|
|
|
run_ok "libwebsockets built and prepared."
|
|
|
else
|
|
|
run_failed "Failed to build libwebsockets. The install process will continue, but you may not be able to connect this node to Netdata Cloud."
|
|
|
+ defer_error "Failed to build libwebsockets. The install process will continue, but you may not be able to connect this node to Netdata Cloud."
|
|
|
fi
|
|
|
else
|
|
|
run_failed "Unable to fetch sources for libwebsockets. The install process will continue, but you may not be able to connect this node to Netdata Cloud."
|
|
|
+ defer_error "Unable to fetch sources for libwebsockets. The install process will continue, but you may not be able to connect this node to Netdata Cloud."
|
|
|
fi
|
|
|
}
|
|
|
|
|
@@ -1042,6 +1064,7 @@ install_go() {
|
|
|
|
|
|
if [ ! -f "${tmp}/${GO_PACKAGE_BASENAME}" ] || [ ! -f "${tmp}/config.tar.gz" ] || [ ! -s "${tmp}/config.tar.gz" ] || [ ! -s "${tmp}/${GO_PACKAGE_BASENAME}" ]; then
|
|
|
run_failed "go.d plugin download failed, go.d plugin will not be available"
|
|
|
+ defer_error "go.d plugin download failed, go.d plugin will not be available"
|
|
|
echo >&2 "Either check the error or consider disabling it by issuing '--disable-go' in the installer"
|
|
|
echo >&2
|
|
|
return 0
|
|
@@ -1058,6 +1081,7 @@ install_go() {
|
|
|
echo >&2
|
|
|
|
|
|
run_failed "go.d.plugin package files checksum validation failed."
|
|
|
+ defer_error "go.d.plugin package files checksum validation failed, go.d.plugin will not be available"
|
|
|
return 0
|
|
|
fi
|
|
|
|
|
@@ -1487,6 +1511,8 @@ cat << EOF > "${NETDATA_LIB_DIR}/netdata.tarball.checksum"
|
|
|
new_installation
|
|
|
EOF
|
|
|
|
|
|
+print_deferred_errors
|
|
|
+
|
|
|
# -----------------------------------------------------------------------------
|
|
|
echo >&2
|
|
|
progress "We are done!"
|