Initial metadata sync has bad permissions

Bug #1680860 reported by David Lawson on 2017-04-07
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Repository Cache Charm
High
Haw Loeung
ubuntu-repository-cache (Juju Charms Collection)
Undecided
Unassigned

Bug Description

It appears that the initial metadata sync has permissions that do not allow subsequent syncs to remove that initial tree, preventing the sync from finishing fully. I merged some of the upstream fixes into the IS maintained version of the charm last week and deployed it into a pair of test regions in AWS, both regions synced correctly on install and then failed to sync fully thereafter. Running:

sudo chown -R www-sync:www-data /srv/ubuntu-repository-cache/apache/data/

On the u-r-c leader in both regions fixed the sync problems and they were able to sync correctly after that. It's possible this is fixed in the CPC branch in revisions later than the ones I merged into the IS branch, if so just let me know where and I'll pull that in until we can de-duplicate those branches.

Related branches

Francis Ginther (fginther) wrote :

The initial metadata sync is done within the context of a charm hook with nothing to modify the user performing the rsync call. As result, the rsync is performed by root, and the metadata files synced are owned by root.

The fix should be to perform the initial rsync as the 'www-sync' user.

Haw Loeung (hloeung) on 2019-07-02
Changed in ubuntu-repository-cache:
status: New → Confirmed
Haw Loeung (hloeung) on 2020-07-09
Changed in ubuntu-repository-cache:
assignee: nobody → Haw Loeung (hloeung)
status: Confirmed → In Progress
Changed in ubuntu-repository-cache (Juju Charms Collection):
status: New → Incomplete
status: Incomplete → Won't Fix
Haw Loeung (hloeung) on 2020-07-09
Changed in ubuntu-repository-cache:
importance: Undecided → High
Haw Loeung (hloeung) on 2020-07-09
Changed in ubuntu-repository-cache:
status: In Progress → Fix Committed
Haw Loeung (hloeung) on 2020-07-09
Changed in ubuntu-repository-cache:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers