Description
In case when there are no new data available from munin-async when munin master connects to the target node and gets the due spoolfetch data, the graphs for which the new data were not produced become excluded from the content generated by munin-httpd, both html and graphs themselves.
Steps to reproduce:
- set up munin-master with a node in an asynchronous configuration (munin-async+munin-asyncd)
- wait until the spoolfetch dir gets populated with some data gathered from munin-node
- remove all generated files from /var/lib/munin on the master server
- run munin-cron
- visit the munin-httpd page and see that all the graphs are present and displayed correctly
- immediately run munin-cron again before the next munin-asyncd run pulls new data from munin-node
- visit the munin-httpd page again and see that there are now no graphs whatsoever
- run munin-cron after munin-asyncd has pulled some new data and see that the graphs reappear.
It appears that it is a political rather than technical question of what we want to do about the graphs for which there is no recent data: hide them altogether or display them with empty space for which there are no data (yet).
To me it sounds like the best solution would be to always display all graphs even when their data are stale until they reach a certain (ideally user-configurable) age of not being updated.
A curious consequence of current behavior is the race condition which I encountered during testing a single-node munin master + munin-node with munin-async/spoolfetch setup.
Currently munin-asynd launches its data gathering runs on multiples of 5 minutes: 00, 05, 10 etc. At the same time, munin-cron is by default configured with the same crontab schedule: " /5 * * * * ".
Sure thing, it so happens that munin-update connects to the target node (self in my case) and runs munin-async to fetch the spooldir data at the very moment that the same spooldir is being populated by munin-asyncd.
This results in an incomplete data set received by munin-update and consequently missing graphs. In my case it was a curious behavior like "everything is fine after the first munin-cron run, but some graphs become missing starting from the second run and never reappear".
In my setup I solved this by changing the munin-cron schedule to " 1-59/ * * * * " so that it runs one minute after munin-asyncd runs, by which time all spoolfetch data should usually be ready.