Skip to content

Commit

Permalink
Remove pointless ENABLE_ACLK/ENABLE_CLOUD split.
Browse files Browse the repository at this point in the history
This is a holdover from years ago when we had multiple versions of the
agent-cloud link in our code. These days, everything in the code cares
only about ENABLE_ACLK, and ENABLE_CLOUD is just used in the claiming
script.
  • Loading branch information
Ferroin committed Apr 26, 2024
1 parent edc1ad5 commit ead5231
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
11 changes: 3 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ option(DEFAULT_FEATURE_STATE "Specify the default state for most optional featur
mark_as_advanced(DEFAULT_FEATURE_STATE)

# High-level features
option(ENABLE_ACLK "Enable Netdata Cloud support (ACLK)" ${DEFAULT_FEATURE_STATE})
option(ENABLE_CLOUD "Enable Netdata Cloud by default at runtime" ${DEFAULT_FEATURE_STATE})
option(ENABLE_CLOUD "Enable Netdata Cloud support" ${DEFAULT_FEATURE_STATE})
option(ENABLE_ML "Enable machine learning features" ${DEFAULT_FEATURE_STATE})
option(ENABLE_DBENGINE "Enable dbengine metrics storage" True)

Expand Down Expand Up @@ -153,6 +152,8 @@ mark_as_advanced(ENABLE_SENTRY)
cmake_dependent_option(FORCE_LEGACY_LIBBPF "Force usage of libbpf 0.0.9 instead of the latest version." False "ENABLE_PLUGIN_LIBBPF" False)
mark_as_advanced(FORCE_LEGACY_LIBBPF)

set(ENABLE_ACLK ${ENABLE_CLOUD})

if(ENABLE_ACLK OR ENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE)
set(NEED_PROTOBUF True)
else()
Expand Down Expand Up @@ -2225,12 +2226,6 @@ set(varlibdir_POST "${CMAKE_INSTALL_PREFIX}/var/lib/netdata")
set(netdata_user_POST "${NETDATA_USER}")

# netdata-claim.sh
if(ENABLE_CLOUD)
set(enable_cloud_POST "yes")
else()
set(enable_cloud_POST "no")
endif()

if(ENABLE_ACLK)
set(enable_aclk_POST "yes")
else()
Expand Down
1 change: 0 additions & 1 deletion packaging/cmake/config.cmake.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
// enabled features

#cmakedefine ENABLE_OPENSSL
#cmakedefine ENABLE_CLOUD
#cmakedefine ENABLE_ACLK
#cmakedefine ENABLE_ML
#cmakedefine ENABLE_EXPORTING_MONGODB
Expand Down
7 changes: 1 addition & 6 deletions src/claim/netdata-claim.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,9 @@ if ! command -v openssl >/dev/null 2>&1 ; then
exit 3
fi

# shellcheck disable=SC2050
if [ "@enable_cloud_POST@" = "no" ]; then
echo >&2 "This agent was built with --disable-cloud and cannot be claimed"
exit 3
fi
# shellcheck disable=SC2050
if [ "@enable_aclk_POST@" != "yes" ]; then
echo >&2 "This agent was built without the dependencies for Cloud and cannot be claimed"
echo >&2 "This agent was built without Netdata Cloud support and cannot be claimed"
exit 3
fi

Expand Down

0 comments on commit ead5231

Please sign in to comment.