Στις 21-01-2012, ημέρα Σαβ, και ώρα 14:00 +0100, ο/η Sven Joachim
έγραψε:
> On 2012-01-16 17:58 +0100, Sven Joachim wrote:
> 
> > It seems that we need a migration path to the single md5sums file, since
> > (with backup-manager from git master) cron spams me with mails
> > containing messages like these:
> ...
> > After BM_ARCHIVE_TTL days this will hopefully stop, but it is still not
> > acceptable to annoy everyone with those messages.
> 
> There is another problem that applies to upstream as well: md5sum hashes
> for old backups are not removed from $MD5FILE when the archives
> themselves are deleted....

Regarding the first, the possible solutions are:

*   Lower the severity of this condition to 'info' instead of 'warning'.
    Needs to patch upstream, but it is just a one-line patch.

*   Launch a background process during the package's postinst script
    to calculate the md5 hash of existing archives and store them to
    the md5 sums file. This can be tricky; we don't know the size of 
    archives beforehand, nor can we warranty that the process will not
    get interrupted.

*   Modify just the cron file to grep out that message. That means to
    add a '| grep -v "Unable to find the md5 hash"' to the template
    and also to dynamically examine and modify any existing cronfile
    during the postinst.

I am inclined to do the first of the above. The message is only issued
by the 'purge_duplicate_archives' function, thus the only harm that a
missing md5 hash can make is to miss a possible opportunity to free some
disk space before the BM_ARCHIVE_TTL period expires. 'Info' seems to me
a more appropriate severity level for such minor issues. 

Regarding the second issue, I believe the best way to solve it is to
ship a new monthly cronjob that uses the largest of BM_ARCHIVE_TTL and
BM_UPLOAD_*TTL settings, then removes all lines with older date from the
md5 sums file. It is premature to try to patch the upstream code,
because IMO the whole metadata subject needs a mild redesign.

Cheers,
George

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to