On 21/04/12 14:59, Andreas Beckmann wrote: > Package: ganglia-modules-linux > Version: 1.3.4-4 > Severity: important > User: [email protected] > Usertags: piuparts > > Hi, > > during a test with piuparts I noticed your package failed to purge. > According to policy 7.2 you cannot rely on the > depends being available during purge, only the essential packages are > available for sure. > >>From the attached log (scroll to the bottom...): > > Removing ganglia-modules-linux ... > Purging configuration files for ganglia-modules-linux ... > invoke-rc.d: unknown initscript, /etc/init.d/ganglia-monitor not found. > dpkg: error processing ganglia-modules-linux (--purge): > subprocess installed post-removal script returned error exit status 100 > Errors were encountered while processing: > ganglia-modules-linux > > do you really need to restart something during purge? this is already done > during remove, isn't that sufficient?
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. 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 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. 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? b) if the script does find /etc/init.d/ganglia-monitor, it does try the restart and potentially exits with an error? or 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 -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

