~ballot/ubuntu-repository-cache/rsync_before

Viewing all changes in revision 267.

  • Committer: Benjamin Allot
  • Date: 2020-04-14 09:40:39 UTC
  • Revision ID: benjamin.allot@canonical.com-20200414094039-5ui6rewlq9r8h7cv
Delete the old metadata items befoire syncing the new ones.

The rationale behind this change is to avoid filling the disks on the non-leader
peers.
The cache size is quite aggrssive (and rightly so) but we keep the current metadata
and the previous one.
On the leader node, the metadata are cleansed after the sync is done.
However, on the others nodes, the cache size might be a bit different, resulting
in reaching 100% space used and preventing the sync to be effective, breaking squid.
Since the leader is the source of truth, and we keep the previous good metadata repository,
we can safely remove before proceeding with the copy.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: