diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2021-03-19 11:04:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-19 11:04:14 +0200 |
commit | 59638f03a9a4c0a48591d31f3c0e8985c47a484c (patch) | |
tree | 5a8922c3053868d60a4c9fa759115483964b022b /streaming | |
parent | 9abaf9bd2693c1ac58a1521a9edc26775437b1f0 (diff) |
Add check for children connecting to a parent agent with unsupported memory mode (#10787)
Diffstat (limited to 'streaming')
-rw-r--r-- | streaming/receiver.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/streaming/receiver.c b/streaming/receiver.c index b538408d3c..03954064a7 100644 --- a/streaming/receiver.c +++ b/streaming/receiver.c @@ -261,6 +261,14 @@ static int rrdpush_receive(struct receiver_state *rpt) mode = rrd_memory_mode_id(appconfig_get(&stream_config, rpt->key, "default memory mode", rrd_memory_mode_name(mode))); mode = rrd_memory_mode_id(appconfig_get(&stream_config, rpt->machine_guid, "memory mode", rrd_memory_mode_name(mode))); +#ifndef ENABLE_DBENGINE + if (unlikely(mode == RRD_MEMORY_MODE_DBENGINE)) { + close(rpt->fd); + log_stream_connection(rpt->client_ip, rpt->client_port, rpt->key, rpt->machine_guid, rpt->hostname, "REJECTED -- DBENGINE MEMORY MODE NOT SUPPORTED"); + return 1; + } +#endif + health_enabled = appconfig_get_boolean_ondemand(&stream_config, rpt->key, "health enabled by default", health_enabled); health_enabled = appconfig_get_boolean_ondemand(&stream_config, rpt->machine_guid, "health enabled", health_enabled); |