Fix regressions in cloud functionality (build, CI, claiming) (#8568)
Fixes regressions in the configure script and build introduced by last night's patch (underhood). Improved the CI/CD to test ACLK builds + Installer changes (ferroin). Removed TLS from libmosquitto. Fixed a problem with user accounts for claiming. (amoss) Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud> Co-authored-by: Andrew Moss <1043609+amoss@users.noreply.github.com>
This commit is contained in:
parent
dd0c426940
commit
f292b0975d
|
@ -18,7 +18,6 @@ jobs:
|
|||
- 'archlinux:latest'
|
||||
- 'centos:8'
|
||||
- 'centos:7'
|
||||
- 'centos:6'
|
||||
- 'debian:bullseye'
|
||||
- 'debian:buster'
|
||||
- 'debian:stretch'
|
||||
|
@ -75,10 +74,13 @@ jobs:
|
|||
PRE: ${{ matrix.pre }}
|
||||
run: |
|
||||
echo $PRE > ./prep-cmd.sh
|
||||
docker build . -f .github/dockerfiles/Dockerfile.build_test -t build_test --build-arg BASE=${{ matrix.distro }}
|
||||
docker build . -f .github/dockerfiles/Dockerfile.build_test -t test --build-arg BASE=${{ matrix.distro }}
|
||||
- name: Regular build on ${{ matrix.distro }}
|
||||
run: |
|
||||
docker run --rm -e PRE -w /netdata build_test /bin/sh -c 'autoreconf -ivf && ./configure && make -j2'
|
||||
docker run -w /netdata test /bin/sh -c 'autoreconf -ivf && ./configure && make -j2'
|
||||
- name: netdata-installer on ${{ matrix.distro }}
|
||||
run: |
|
||||
docker run --rm -e PRE -w /netdata build_test /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it'
|
||||
docker run -w /netdata test /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --disable-cloud'
|
||||
- name: netdata-installer on ${{ matrix.distro }}
|
||||
run: |
|
||||
docker run -w /netdata test /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --require-cloud'
|
||||
|
|
|
@ -109,7 +109,7 @@ RELOAD=1
|
|||
NETDATA_USER=netdata
|
||||
[ -z "$EUID" ] && EUID="$(id -u)"
|
||||
|
||||
CONF_USER=$(grep '^[^#]*run as user[ \t]*=' "${NETDATA_USER_CONFIG_DIR}/netdata.conf" 2>/dev/null)
|
||||
CONF_USER=$(grep '^[ #]*run as user[ ]*=' "${NETDATA_USER_CONFIG_DIR}/netdata.conf" 2>/dev/null)
|
||||
if [ -n "$CONF_USER" ]; then
|
||||
NETDATA_USER=$(echo "$CONF_USER" | sed 's/^[^=]*=[ \t]*//' | sed 's/[ \t]*$//')
|
||||
fi
|
||||
|
|
37
configure.ac
37
configure.ac
|
@ -170,17 +170,13 @@ AC_ARG_ENABLE(
|
|||
[AS_HELP_STRING([--disable-cloud],
|
||||
[Disables all cloud functionality])],
|
||||
[ enable_cloud="$enableval" ],
|
||||
[ enable_cloud="yes" ]
|
||||
[ enable_cloud="detect" ]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([if cloud functionality should be enabled])
|
||||
aclk_required="${enable_cloud}"
|
||||
if test "${enable_cloud}" = "no"; then
|
||||
AC_DEFINE([DISABLE_CLOUD], [1], [disable netdata cloud functionality])
|
||||
aclk_required="no"
|
||||
else
|
||||
aclk_required="detect"
|
||||
fi
|
||||
AC_MSG_RESULT([${enable_cloud}])
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# netdata required checks
|
||||
|
@ -555,17 +551,30 @@ AM_CONDITIONAL([ENABLE_CAPABILITY], [test "${with_libcap}" = "yes"])
|
|||
# -----------------------------------------------------------------------------
|
||||
# ACLK
|
||||
|
||||
if test "$enable_cloud" = "yes"; then
|
||||
AC_MSG_CHECKING([if cloud functionality should be enabled])
|
||||
AC_MSG_RESULT([${enable_cloud}])
|
||||
if test "$enable_cloud" != "no"; then
|
||||
# just to have all messages that can fail ACLK build in one place
|
||||
# so it is easier to see why it can't be built
|
||||
if test -n "${SSL_LIBS}"; then
|
||||
OPTIONAL_SSL_CFLAGS="${SSL_CFLAGS}"
|
||||
OPTIONAL_SSL_LIBS="${SSL_LIBS}"
|
||||
else
|
||||
AC_MSG_WARN([OpenSSL required for agent-cloud-link but not found. Try installing 'libssl-dev' or 'openssl-devel'.])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if libmosquitto static lib is present (and builds)])
|
||||
if test -f "externaldeps/mosquitto/libmosquitto.a"; then
|
||||
LIBS_SAVES="$LIBS"
|
||||
LIBS="externaldeps/mosquitto/libmosquitto.a"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main (int argc, char **argv)) {
|
||||
LIBS_BKP="${LIBS}"
|
||||
LIBS="externaldeps/mosquitto/libmosquitto.a ${OPTIONAL_SSL_LIBS}"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[#include "externaldeps/mosquitto/mosquitto.h"
|
||||
int main (int argc, char **argv) {
|
||||
int m,mm,r;
|
||||
mosquitto_lib_version(&m, &mm, &r);
|
||||
}]]),
|
||||
}]])],
|
||||
[HAVE_libmosquitto_a="yes"],
|
||||
[HAVE_libmosquitto_a="no"]])
|
||||
[HAVE_libmosquitto_a="no"])
|
||||
LIBS="${LIBS_BKP}"
|
||||
else
|
||||
HAVE_libmosquitto_a="no"
|
||||
AC_DEFINE([ACLK_NO_LIBMOSQ], [1], [Libmosquitto.a was not found during build.])
|
||||
|
@ -584,7 +593,7 @@ if test "$enable_cloud" = "yes"; then
|
|||
|
||||
if test "${build_target}" = "linux" -a "${aclk_required}" != "no"; then
|
||||
if test "${have_libcap}" = "yes" -a "${with_libcap}" = "no"; then
|
||||
AC_MSG_ERROR([agent-cloud-link can't be built without libcap. Disable it by --disable-aclk or enable libcap])
|
||||
AC_MSG_ERROR([agent-cloud-link can't be built without libcap. Disable it by --disable-cloud or enable libcap])
|
||||
fi
|
||||
if test "${with_libcap}" = "yes"; then
|
||||
LWS_LIBS+=" -lcap"
|
||||
|
@ -592,7 +601,7 @@ if test "$enable_cloud" = "yes"; then
|
|||
fi
|
||||
|
||||
AC_MSG_CHECKING([if netdata agent-cloud-link can be enabled])
|
||||
if test "${HAVE_libmosquitto_a}" = "yes" -a "${HAVE_libwebsockets_a}" = "yes"; then
|
||||
if test "${HAVE_libmosquitto_a}" = "yes" -a "${HAVE_libwebsockets_a}" = "yes" -a -n "${SSL_LIBS}"; then
|
||||
can_enable_aclk="yes"
|
||||
else
|
||||
can_enable_aclk="no"
|
||||
|
|
|
@ -193,7 +193,8 @@ USAGE: ${PROGRAM} [options]
|
|||
This results in more frequent updates.
|
||||
--disable-go Disable installation of go.d.plugin.
|
||||
--enable-ebpf Enable eBPF Kernel plugin (Default: disabled, feature preview)
|
||||
--disable-cloud Disable all cloud functionality.
|
||||
--disable-cloud Disable all Netdata Cloud functionality.
|
||||
--require-cloud Fail the install if it can't build Netdata Cloud support.
|
||||
--enable-plugin-freeipmi Enable the FreeIPMI plugin. Default: enable it when libipmimonitoring is available.
|
||||
--disable-plugin-freeipmi
|
||||
--disable-https Explicitly disable TLS support
|
||||
|
@ -280,8 +281,20 @@ while [ -n "${1}" ]; do
|
|||
"--disable-go") NETDATA_DISABLE_GO=1 ;;
|
||||
"--enable-ebpf") NETDATA_ENABLE_EBPF=1 ;;
|
||||
"--disable-cloud")
|
||||
NETDATA_DISABLE_CLOUD=1
|
||||
NETDATA_CONFIGURE_OPTIONS="${NETDATA_CONFIGURE_OPTIONS//--disable-cloud/} --disable-cloud"
|
||||
if [ -n "${NETDATA_REQUIRE_CLOUD}" ] ; then
|
||||
echo "Cloud explicitly enabled, ignoring --disable-cloud."
|
||||
else
|
||||
NETDATA_DISABLE_CLOUD=1
|
||||
NETDATA_CONFIGURE_OPTIONS="${NETDATA_CONFIGURE_OPTIONS//--disable-cloud/} --disable-cloud"
|
||||
fi
|
||||
;;
|
||||
"--require-cloud")
|
||||
if [ -n "${NETDATA_DISABLE_CLOUD}" ] ; then
|
||||
echo "Cloud explicitly disabled, ignoring --require-cloud."
|
||||
else
|
||||
NETDATA_REQUIRE_CLOUD=1
|
||||
NETDATA_CONFIGURE_OPTIONS="${NETDATA_CONFIGURE_OPTIONS//--enable-cloud/} --enable-cloud"
|
||||
fi
|
||||
;;
|
||||
"--install")
|
||||
NETDATA_PREFIX="${2}/netdata"
|
||||
|
@ -502,12 +515,20 @@ bundle_libmosquitto() {
|
|||
then
|
||||
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_highlighted "Failed to build libmosquitto. The install process will continue, but you will not be able to connect this node to Netdata Cloud."
|
||||
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
|
||||
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_highlighted "Unable to fetch sources for libmosquitto. The install process will continue, but you will not be able to connect this node to Netdata Cloud."
|
||||
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
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -562,12 +583,20 @@ bundle_libwebsockets() {
|
|||
then
|
||||
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_highlighted "Failed to build libwebsockets. The install process will continue, but you may not be able to connect this node to Netdata Cloud."
|
||||
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
|
||||
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_highlighted "Unable to fetch sources for libwebsockets. The install process will continue, but you may not be able to connect this node to Netdata Cloud."
|
||||
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
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
387faaf026b86d52dcba87e80b97946eb2775bcfcfdafaabc828b6e17f7bf5ea v.1.6.8_Netdata-3.tar.gz
|
||||
6af837c388b1bcd459220936c422b70a987c60f4d5f88b09eada43d713529284 v.1.6.8_Netdata-4.tar.gz
|
||||
|
|
|
@ -1 +1 @@
|
|||
v.1.6.8_Netdata-3
|
||||
v.1.6.8_Netdata-4
|
||||
|
|
Loading…
Reference in New Issue