From 5e463b84dcb34707ae1603ef4cf1d189062bf855 Mon Sep 17 00:00:00 2001 From: Tyler Date: Mon, 20 Jul 2020 13:18:29 -0400 Subject: [PATCH] mon: Verify version consistency across daemons Add a function called check_daemon_versions() Made minor changes based on pull request comments Changed the way versions are checked along with some other minor modifications Made minor modification to the error message Modifications to include the hostname in the error message Fixes: https://tracker.ceph.com/issues/46264 Signed-off-by: Tyler Remove time since health errors aren't preserved if not set every time Rename health error to DAEMON_OLD_VERSION Reoganize code so that we can get versions from other daemon types Change to map of version (key), a list of daemons (value) Get actual daemon names from get_versions() requests Fix message output based on how many daemons and how many versions Add a config to be able to turn off this features Give HEALTH_ERR if more than one older version exists Fix minor indentation problem with health detail Signed-off-by: David Zafman --- src/common/options.cc | 5 +++++ src/mon/HealthMonitor.cc | 41 ++++++++++++++++++++++++++++++++++++++++ src/mon/Monitor.cc | 17 +++++++++++++++++ src/mon/Monitor.h | 3 +++ 4 files changed, 66 insertions(+) diff --git a/src/common/options.cc b/src/common/options.cc index 28ad9c7922789..8165692f95a83 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -2228,6 +2228,11 @@ std::vector