[collectd] Bug#631167: On purge, deletes RRD databases without prompting.
Trent W. Buck
trentbuck at gmail.com
Thu Jan 12 02:01:57 CET 2012
Sebastian Harl wrote:
> However, policy does not talk about anything else (besides log files
> which should be removed as well) in that respect. *Imho*, "purge" is
> meant to be "remove any trace of the package in question" which includes
> generated data as well. Anyway, for now I'm downgrading the severity of
> this bug, since there is no clear requirement for any behavior.
I can see your point; I was pretty grumpy when I filed the report --
not least because as well as deleting /var/lib/collectd/rrd/ it also
deleted all my /var/lib/collectd/rrd_YYYY-MM-DD.sq backups.
>> This is *not cool*. I suppose it's reasonable to clean up /var/lib
>> after oneself, but collectd-core should follow the example of RDBMSs
>> and ask the user (via debconf) for confirmation before doing so.
>
> This is not handled consistently across different RDBMSs: while
> MySQL prompts the user (and defaults to "keep the data") PostgreSQL
> unconditionally removes all databases on "purge" as well.
I apologize; I didn't know that.
> Anyway, prompting the user in case of purging databases seems to be a
> commonly accepted behavior. I currently tend to prompt the user on
> "purge" using a debconf question of priority "high" but default to
> remove the data. This seems like the best approach to me; taking into
> account the arguments of both sides. Also, imho, that's in the spirit of
> "with a chance to preserve the data" as mentioned above.
>
> Does that sound reasonable to you?
That's ideal, thanks.
> I've Cc'ed the collectd mailing list, hoping for some more user
> feedback.
IIRC that list is subscriber-only, but hopefully I have successfully
spoofed my From to my subscribed address, and it won't be held for
moderation there :-)
More information about the collectd
mailing list