diff options
author | Andrew Moss <1043609+amoss@users.noreply.github.com> | 2020-03-31 21:19:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-31 21:19:34 +0200 |
commit | 8fe7485a600f60be9ac20af923a61d516cb0335e (patch) | |
tree | 875658393d501b764eb8694d44488dbe9b64cf29 /claim | |
parent | ef2bd3956b2797de31008ddffab671b9675f070d (diff) |
Switching over to soft feature flag (#8545)
Preparing for the cloud release. This changes how we handle the feature flag so that it no longer requires installer switches and can be set from the config file. This still requires internal access to use and is not ready for public access yet.
Diffstat (limited to 'claim')
-rw-r--r-- | claim/claim.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/claim/claim.c b/claim/claim.c index aabcc18a23..6e14cea658 100644 --- a/claim/claim.c +++ b/claim/claim.c @@ -41,11 +41,12 @@ extern struct registry registry; /* rrd_init() must have been called before this function */ void claim_agent(char *claiming_arguments) { -#ifndef ENABLE_CLOUD - info("The claiming feature has been disabled"); - return; -#endif + if (!netdata_cloud_setting) { + error("Refusing to claim agent -> cloud functionality has been disabled"); + return; + } +#ifndef DISABLE_CLOUD int exit_code; pid_t command_pid; char command_buffer[CLAIMING_COMMAND_LENGTH + 1]; @@ -106,6 +107,7 @@ void claim_agent(char *claiming_arguments) } error("Agent failed to be claimed with the following error message:"); error("\"%s\"", claiming_errors[exit_code]); +#endif } void load_claiming_state(void) |