Charm should not clean older metadata that ubuntu_active points to

Bug #1799595 reported by Haw Loeung
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Ubuntu Repository Cache Charm
Triaged
High
Unassigned

Bug Description

Hi,

On a few occasions, multiple metadata sync succeeds but confused leader election prevents the ubuntu_active symlink to be updated/switched (see LP: #1797297). This results in the symlink pointing at a no longer available metadata directory.

The charm should not remove older metadata directories that the "ubuntu_archive" symlink points at. Maybe it's a bug here?

https://bazaar.launchpad.net/~cloudware-admins/ubuntu-repository-cache/trunk/view/head:/lib/ubuntu_repository_cache/metadata_sync.py#L234

Related branches

Revision history for this message
Alexandre Gomes (alejdg) wrote :

Here is an example of the link pointing to an invalid directory:
https://pastebin.canonical.com/p/BX6TvDdWmK/

And some logs of the sync failing because that directory does not exist:
https://pastebin.canonical.com/p/K4DCpmpyRd/

Revision history for this message
Haw Loeung (hloeung) wrote :
Revision history for this message
Haw Loeung (hloeung) wrote :

This is still happening:

| ubuntu@machine-0:/srv/ubuntu-repository-cache/apache/data$ ls -la
| total 20
| drwxrwxr-x 4 www-sync www-data 4096 Sep 14 22:44 .
| drwxrwxr-x 4 www-data www-data 4096 Jul 8 03:48 ..
| drwxrwxr-x 7 www-sync www-data 4096 Sep 14 21:26 ubuntu_2020-09-14_21:40:02_u0
| -rw-r--r-- 1 root root 0 Sep 14 21:43 ubuntu_2020-09-14_21:40:02_u0_good
| drwxrwxr-x 7 www-sync www-data 4096 Sep 14 21:26 ubuntu_2020-09-14_22:40:02_u0
| -rw-r--r-- 1 root root 0 Sep 14 22:43 ubuntu_2020-09-14_22:40:02_u0_good
| lrwxrwxrwx 1 www-sync www-data 70 Sep 14 22:44 ubuntu_active -> /srv/ubuntu-repository-cache/apache/data/ubuntu_2020-09-14_20:40:02_u0

We should fix this.

Changed in ubuntu-repository-cache:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Haw Loeung (hloeung)
status: Triaged → In Progress
Haw Loeung (hloeung)
Changed in ubuntu-repository-cache:
status: In Progress → Fix Committed
Haw Loeung (hloeung)
Changed in ubuntu-repository-cache:
status: Fix Committed → Fix Released
Revision history for this message
Junien F (axino) wrote :

This is still happening (see portal event 45278). Re-opening.

Changed in ubuntu-repository-cache:
status: Fix Released → Triaged
assignee: Haw Loeung (hloeung) → nobody
Revision history for this message
Haw Loeung (hloeung) wrote :

Latest LP:1973744

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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