Skip to content

Commit

Permalink
Don’t bail early if we fail to build cloud deps with required cloud. (#…
Browse files Browse the repository at this point in the history
…11446)

* Don’t bail early if we fail to build cloud deps with required cloud.

Due to having two ACLK implementations, failing to build any arbitrary
set of cloud dependencies is not guaranteed to prevent us from building
a working cloud implementation, so we should fall back to relying on the
configure script for determining if the cloud can be built.

* add check in case both ACLKs fail

Co-authored-by: Timotej Šiškovič <timotej@netdata.cloud>
  • Loading branch information
Ferroin and underhood committed Aug 25, 2021
1 parent 73f6b53 commit 3848e97
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 40 deletions.
4 changes: 4 additions & 0 deletions configure.ac
Expand Up @@ -879,6 +879,10 @@ if test "$enable_cloud" != "no" -a "$aclk_legacy" != "no"; then
fi
fi

if test "$enable_cloud" = "yes" -a "$enable_aclk" != "yes"; then
AC_MSG_ERROR([Neither ACLK-NG nor ACLK-Legacy can be built but --enable-cloud was requested])
fi

AC_SUBST([enable_cloud])
AC_SUBST([enable_aclk])
AM_CONDITIONAL([ACLK_NG], [test "${aclk_ng}" = "yes"])
Expand Down
48 changes: 8 additions & 40 deletions netdata-installer.sh
Expand Up @@ -601,19 +601,11 @@ bundle_libmosquitto() {
run_ok "libmosquitto built and prepared."
else
run_failed "Failed to build libmosquitto."
if [ -n "${NETDATA_REQUIRE_CLOUD}" ]; then
exit 1
else
defer_error_highlighted "Unable to fetch sources for libmosquitto. You will not be able to connect this node to Netdata Cloud."
fi
defer_error_highlighted "Unable to fetch sources for libmosquitto. You will not be able to connect this node to Netdata Cloud."
fi
else
run_failed "Unable to fetch sources for libmosquitto."
if [ -n "${NETDATA_REQUIRE_CLOUD}" ]; then
exit 1
else
defer_error_highlighted "Unable to fetch sources for libmosquitto. You will not be able to connect this node to Netdata Cloud."
fi
defer_error_highlighted "Unable to fetch sources for libmosquitto. You will not be able to connect this node to Netdata Cloud."
fi
}

Expand Down Expand Up @@ -710,19 +702,11 @@ bundle_libwebsockets() {
NETDATA_CONFIGURE_OPTIONS="${NETDATA_CONFIGURE_OPTIONS} --with-bundled-lws"
else
run_failed "Failed to build libwebsockets."
if [ -n "${NETDATA_REQUIRE_CLOUD}" ]; then
exit 1
else
defer_error_highlighted "Failed to build libwebsockets. You may not be able to connect this node to Netdata Cloud."
fi
defer_error_highlighted "Failed to build libwebsockets. You may not be able to connect this node to Netdata Cloud."
fi
else
run_failed "Unable to fetch sources for libwebsockets."
if [ -n "${NETDATA_REQUIRE_CLOUD}" ]; then
exit 1
else
defer_error_highlighted "Unable to fetch sources for libwebsockets. You may not be able to connect this node to Netdata Cloud."
fi
defer_error_highlighted "Unable to fetch sources for libwebsockets. You may not be able to connect this node to Netdata Cloud."
fi
}

Expand Down Expand Up @@ -788,19 +772,11 @@ bundle_protobuf() {
NETDATA_CONFIGURE_OPTIONS="${NETDATA_CONFIGURE_OPTIONS} --with-bundled-protobuf"
else
run_failed "Failed to build protobuf."
if [ -n "${NETDATA_REQUIRE_CLOUD}" ]; then
exit 1
else
defer_error_highlighted "Failed to build protobuf. You may not be able to connect this node to Netdata Cloud."
fi
defer_error_highlighted "Failed to build protobuf. You may not be able to connect this node to Netdata Cloud."
fi
else
run_failed "Unable to fetch sources for protobuf."
if [ -n "${NETDATA_REQUIRE_CLOUD}" ]; then
exit 1
else
defer_error_highlighted "Unable to fetch sources for protobuf. You may not be able to connect this node to Netdata Cloud."
fi
defer_error_highlighted "Unable to fetch sources for protobuf. You may not be able to connect this node to Netdata Cloud."
fi
}

Expand Down Expand Up @@ -949,19 +925,11 @@ bundle_jsonc() {
run_ok "JSON-C built and prepared."
else
run_failed "Failed to build JSON-C."
if [ -n "${NETDATA_REQUIRE_CLOUD}" ]; then
exit 1
else
defer_error_highlighted "Failed to build JSON-C. Netdata Cloud support will be disabled."
fi
defer_error_highlighted "Failed to build JSON-C. Netdata Cloud support will be disabled."
fi
else
run_failed "Unable to fetch sources for JSON-C."
if [ -n "${NETDATA_REQUIRE_CLOUD}" ]; then
exit 1
else
defer_error_highlighted "Unable to fetch sources for JSON-C. Netdata Cloud support will be disabled."
fi
defer_error_highlighted "Unable to fetch sources for JSON-C. Netdata Cloud support will be disabled."
fi
}

Expand Down

0 comments on commit 3848e97

Please sign in to comment.