diff options
author | Dmitrijs Goloscapovs <dmitrijs.goloscapovs@zabbix.com> | 2022-06-20 15:00:58 +0300 |
---|---|---|
committer | Dmitrijs Goloscapovs <dmitrijs.goloscapovs@zabbix.com> | 2022-06-20 15:00:58 +0300 |
commit | 2179d2ecb082922990c1720a264bf3f416b259f8 (patch) | |
tree | e787bd7cfdc460ad5d4afbf4e924fd9e4ff3a537 | |
parent | eca08a567e24f3a7421c4135957e0a0c59f702a3 (diff) |
.......PS. [ZBX-20638] fixed suggention to enable AllowUnsupported on server db < min_hard
-rw-r--r-- | src/libs/zbxdbhigh/db.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/libs/zbxdbhigh/db.c b/src/libs/zbxdbhigh/db.c index 509966688fd..5440adddeb0 100644 --- a/src/libs/zbxdbhigh/db.c +++ b/src/libs/zbxdbhigh/db.c @@ -836,12 +836,14 @@ int DBcheck_version_info(struct zbx_db_version_info_t *info, int allow_unsupport DB_VERSION_HIGHER_THAN_MAXIMUM == info->flag || DB_VERSION_LOWER_THAN_MINIMUM == info->flag) { const char *program_type_s; + int server_db_deprecated; program_type_s = get_program_type_string(program_type); - if (0 == allow_unsupported || (DB_VERSION_LOWER_THAN_MINIMUM == info->flag && - 0 == (program_type & ZBX_PROGRAM_TYPE_PROXY) - && 1 == allow_unsupported)) + server_db_deprecated = (DB_VERSION_LOWER_THAN_MINIMUM == info->flag && + 0 == (program_type & ZBX_PROGRAM_TYPE_PROXY)); + + if (0 == allow_unsupported || 0 != server_db_deprecated) { zabbix_log(LOG_LEVEL_ERR, " "); zabbix_log(LOG_LEVEL_ERR, "Unable to start Zabbix %s due to unsupported %s database" @@ -861,8 +863,13 @@ int DBcheck_version_info(struct zbx_db_version_info_t *info, int allow_unsupport } zabbix_log(LOG_LEVEL_ERR, "Use of supported database version is highly recommended."); - zabbix_log(LOG_LEVEL_ERR, "Override by setting AllowUnsupportedDBVersions=1" - " in Zabbix %s configuration file at your own risk.", program_type_s); + + if (0 == server_db_deprecated) + { + zabbix_log(LOG_LEVEL_ERR, "Override by setting AllowUnsupportedDBVersions=1" + " in Zabbix %s configuration file at your own risk.", program_type_s); + } + zabbix_log(LOG_LEVEL_ERR, " "); return FAIL; |