Handle partial metadata sync scenario

Bug #2023948 reported by Haw Loeung
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Repository Cache Charm
Triaged
High
Haw Loeung

Bug Description

Hi,

We have this scenario where the leader unit successfully synced and verified a snapshot of the archive metadata, it syncs to it's peers but is then interrupted. On next sync, we see this:

| 2023-06-15 00:10:34,973 - Syncing /srv/ubuntu-repository-cache/apache/data/ubuntu_2023-06-14_23:04:01_u2/ to ubuntu-repository-cache/1 (192.168.0.5) www-sync@192.168.0.5:/srv/ubuntu-repository-cache/apache/data/ubuntu_2023-06-15_00:04:01_u2.
| 2023-06-15 00:10:34,973 - timeout 3600 /usr/bin/rsync -r --quiet --recursive --links --perms --chmod=g+w --times --compress --delete --delete-before --timeout=300 -e sudo -u www-sync ssh -l www-sync --link-dest=/srv/ubuntu-repository-cache/apache/data/ubuntu_active/ /srv/ubuntu-repository-cache/apache/data/ubuntu_2023-06-14_23:04:01_u2/ www-sync@192.168.0.5:/srv/ubuntu-repository-cache/apache/data/ubuntu_2023-06-15_00:04:01_u2

From the above, `ubuntu_active` is still pointing at `ubuntu_2023-06-14_23:04:01_u2` but on pushing to it's peers, it's pushed to `ubuntu_2023-06-15_00:04:01_u2` - that's 00:04 vs. 23:04. Then the `ubuntu_active` symlink is synced across and that points to an invalid or non-existent metadata snapshot.

Full logs - https://pastebin.canonical.com/p/rNNNKvs9mN/ and https://pastebin.canonical.com/p/mnv9xnztfP/

We should handle this by making sure the synced destination matches the source (or timestamp/meta_ver `ubuntu_active` currently points to).

Haw Loeung (hloeung)
Changed in ubuntu-repository-cache:
assignee: nobody → Haw Loeung (hloeung)
importance: Undecided → High
status: New → In Progress
Haw Loeung (hloeung)
Changed in ubuntu-repository-cache:
status: In Progress → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.