Initial metadata sync has bad permissions

Bug #1680860 reported by David Lawson
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Repository Cache Charm
Fix Released
High
Haw Loeung
ubuntu-repository-cache (Juju Charms Collection)
Won't Fix
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

Revision history for this message
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)
Changed in ubuntu-repository-cache:
status: New → Confirmed
Haw Loeung (hloeung)
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)
Changed in ubuntu-repository-cache:
importance: Undecided → High
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
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.