On 2012-04-21 15:34, Daniel Pocock wrote: > The gmond binary (package ganglia-monitor) loads any independent modules > (ganglia-modules-linux) at startup time using dl_open() > > If the modules are deleted from disk (dpkg remove), the gmond binary > that is running could potentially crash immediately or some time later. > Ganglia would stop collecting any metrics for the host.
Therefore you restart in postrm remove. > The config files (removed during the purge) are read by gmond on > startup. In fact, it scans /etc/ganglia/conf.d/* - it is quite possible > that a system administrator has created extra files of their own, and > some additional config file (not removed by purge) has a dependency on > ganglia-modules-linux In that case a restart during purge seems appropriate. > The restart provides immediate feedback to the user if their overall > gmond configuration is still valid after the purge > > I agree that a `purge' operation should not result in an error. Especially not on condidions it cannot control. > However, if the gmond was working before the purge, and can't start > after the purge, how should this be communicated to the user? > > Would you agree that: > > a) the script should test if /etc/init.d/ganglia-monitor exists, and if > not, continue without any error? That's usual operation in purge. Test if non-default things are available and use them only if they exist. > b) if the script does find /etc/init.d/ganglia-monitor, it does try the > restart and potentially exits with an error? > b) (alterantive) if the script does find /etc/init.d/ganglia-monitor, it > does try the restart, it displays errors to stderr, but the return value > of postrm is 0? > I will implement the second case (displays errors, returns 0) - but > please let me know if there are other problems I should consider That's fine. Failing the purge now does not really help - all of g-m-l is already gone. g-m-l tried it's best but this error is probably out of its scope. Andreas -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

