Commit 5d453688 authored by Michele Tartara's avatar Michele Tartara
Browse files

Add confd as a dependency of monitoring



Some data collectors require confd data information. Therefore, monitoring is
dependent on confd, but this was not checked.

This commit introduces such a check and partially fixes Issue 441.
Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent c42fbe28
...@@ -582,8 +582,13 @@ if test "$enable_monitoring" != no; then ...@@ -582,8 +582,13 @@ if test "$enable_monitoring" != no; then
MONITORING_PKG= MONITORING_PKG=
AC_GHC_PKG_CHECK([attoparsec], [], AC_GHC_PKG_CHECK([attoparsec], [],
[MONITORING_PKG="$MONITORING_PKG attoparsec"]) [MONITORING_PKG="$MONITORING_PKG attoparsec"])
MONITORING_DEP=
if test "$has_confd" = False; then
MONITORING_DEP="$MONITORING_DEP confd"
fi
has_monitoring_pkg=False
if test -z "$MONITORING_PKG"; then if test -z "$MONITORING_PKG"; then
has_monitoring=True has_monitoring_pkg=True
elif test "$enable_monitoring" = check; then elif test "$enable_monitoring" = check; then
AC_MSG_WARN(m4_normalize([The required extra libraries for the monitoring AC_MSG_WARN(m4_normalize([The required extra libraries for the monitoring
agent were not found ($MONITORING_PKG), agent were not found ($MONITORING_PKG),
...@@ -593,8 +598,22 @@ if test "$enable_monitoring" != no; then ...@@ -593,8 +598,22 @@ if test "$enable_monitoring" != no; then
required libraries were not found: required libraries were not found:
$MONITORING_PKG])) $MONITORING_PKG]))
fi fi
has_monitoring_dep=False
if test -z "$MONITORING_DEP"; then
has_monitoring_dep=True
elif test "$enable_monitoring" = check; then
AC_MSG_WARN(m4_normalize([The optional Ganeti components required for the
monitoring agent were not enabled
($MONITORING_DEP), monitoring disabled]))
else
AC_MSG_FAILURE(m4_normalize([The monitoring functionality was requested, but
required optional Ganeti components were not
found: $MONITORING_DEP]))
fi
fi fi
if test "$has_monitoring" = True; then if test "$has_monitoring_pkg" = True -a "$has_monitoring_dep" = True; then
has_monitoring=True
AC_MSG_NOTICE([Enabling the monitoring agent usage]) AC_MSG_NOTICE([Enabling the monitoring agent usage])
fi fi
AC_SUBST(ENABLE_MONITORING, $has_monitoring) AC_SUBST(ENABLE_MONITORING, $has_monitoring)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment