[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
check_depend() bug-report & fix
From: |
Philipp Berndt |
Subject: |
check_depend() bug-report & fix |
Date: |
Sat, 10 Dec 2005 16:34:24 +0100 |
User-agent: |
KMail/1.8.3 |
Hi,
the dependency checking in monit-4.6 falsely assumes that the inter-service
dependencies constitute a TREE.
With a simple configuration like this
snip
check file A with path /tmp/A
check file B with path /tmp/B
depends on A
check file C with path /tmp/C
depends on A
check file D with path /tmp/D
depends on B, C
snap
this leads monit to believe there was a dependency loop:
$ monit -t
monit: Error: Found a depend loop in the control file involving the service
'B'
Instead, the dependency structure forms a directed acyclic graph (dag).
In the attached patch I have replaced check_depend(), validate_depend() and
order_depend() by an implementation that does a topological sort of the
dependency dag, thereby finding any (real) cycles and putting the services in
the required order.
Regards,
Philipp Berndt
monit-4.6.toposort.patch
Description: Text Data
- check_depend() bug-report & fix,
Philipp Berndt <=