Merge lp:~oddbloke/charms/trusty/ubuntu-repository-cache/error-message-fix into lp:charms/trusty/ubuntu-repository-cache

Proposed by Dan Watkins
Status: Work in progress
Proposed branch: lp:~oddbloke/charms/trusty/ubuntu-repository-cache/error-message-fix
Merge into: lp:charms/trusty/ubuntu-repository-cache
Diff against target: 36 lines (+8/-5)
1 file modified
lib/ubuntu_repository_cache/mirror.py (+8/-5)
To merge this branch: bzr merge lp:~oddbloke/charms/trusty/ubuntu-repository-cache/error-message-fix
Reviewer Review Type Date Requested Status
Charles Butler (community) Needs Resubmitting
Andrew McLeod (community) Needs Fixing
Review Queue (community) automated testing Needs Fixing
Nick Moffitt (community) Approve
William Grant (community) Approve
Review via email: mp+292622@code.launchpad.net

Description of the change

X-CPC-Summary-Skip: 1

To post a comment you must log in.
213. By Dan Watkins

Include "Stale Release file" check for all verification failures

No matter why verify_distribution fails, it would be useful to know that we
have a stale releases file.

Revision history for this message
William Grant (wgrant) :
review: Approve
Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

This would have helped us track down the yackety Translations mis-publish quicker today!

review: Approve
Revision history for this message
Review Queue (review-queue) wrote :

This item has failed automated testing! Results available here http://juju-ci.vapour.ws:8080/job/charm-bundle-test-aws/3953/

review: Needs Fixing (automated testing)
Revision history for this message
Review Queue (review-queue) wrote :

This item has failed automated testing! Results available here http://juju-ci.vapour.ws:8080/job/charm-bundle-test-aws/3954/

review: Needs Fixing (automated testing)
Revision history for this message
Review Queue (review-queue) wrote :

This item has failed automated testing! Results available here http://juju-ci.vapour.ws:8080/job/charm-bundle-test-lxc/3908/

review: Needs Fixing (automated testing)
Revision history for this message
Review Queue (review-queue) wrote :

This item has failed automated testing! Results available here http://juju-ci.vapour.ws:8080/job/charm-bundle-test-lxc/3909/

review: Needs Fixing (automated testing)
Revision history for this message
Andrew McLeod (admcleod) wrote :

Hi Dan,

We've noticed that the test has failed the automated testing AFTER it was approved, and when I try to run the tests (bundletester -vFl DEBUG -e AWS) basically the install hook never completes - the debug-log looks like this:

http://pastebin.ubuntu.com/17749455/

and further logs

http://pastebin.ubuntu.com/17751100/

So basically it times out - is there any obvious reason why this might be happening?

review: Needs Fixing
Revision history for this message
Andrew McLeod (admcleod) wrote :

Sorry, I jumped the gun there (by about 10 seconds apparently) so I guess the pastebins in my previous comment are irrelevant - but a timeout is the reason this fails:

EBUG:runner:Environment wasn't stood up in time
DEBUG:runner:Exit Code: 100
    100-single_unit.simple FAIL

Is there any way you could perhaps limit the repos synced for the test?

review: Needs Fixing
Revision history for this message
Charles Butler (lazypower) wrote :

Greetings Daniel,

Thank you for the contribution to the ubuntu-repository-cache charm. I've encountered some issues with the proposed fix here that goes beyond the timeout listed above.

It appears with revision 212, the branch in lp:~charmers/charms/trusty/ubuntu-repository-cache/trunk was broken. It will require an additional re-sync of charm-helpers to fix the python3 inconsistency of modules the charm expects to be installed.

Additionally, it appears the lp:~charmers/charms/trusty/ubuntu-repository-cache/trunk branch is no longer the primary point of development, and this should instead be directed at:

lp:~cloudware/charms/trusty/ubuntu-repository-cache/trunk

With these concerns outlined, I regret to inform you that I am unable to accept this merge as is, and would advise you to re-submit against the upstream charm, in lp:~cloudware

Thanks again for your contribution, and I look forward to reviewing/landing this contribution in the proper places.

If you have any questions/comments/concerns about the review contact us in #juju on irc.freenode.net or email the mailing list <email address hidden>, or ask a question tagged with "juju" on http://askubuntu.com.

review: Needs Resubmitting
Revision history for this message
Charles Butler (lazypower) wrote :

In addition to the above review, i've moved this MP's status to Work in Progress while the resubmission is sorted out.

If this MP will require additional actions, please move the status to "Needs Review" so it will show back up in the review queue

review: Needs Resubmitting

Unmerged revisions

213. By Dan Watkins

Include "Stale Release file" check for all verification failures

No matter why verify_distribution fails, it would be useful to know that we
have a stale releases file.

212. By Dan Watkins

Fix 'Stale Release file.' message

Simple typo means that the default error message would be used even when the
stale message would be more appropriate.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/ubuntu_repository_cache/mirror.py'
2--- lib/ubuntu_repository_cache/mirror.py 2015-09-28 20:43:45 +0000
3+++ lib/ubuntu_repository_cache/mirror.py 2016-04-22 10:30:34 +0000
4@@ -274,11 +274,17 @@
5 else:
6 raise
7
8+ def raise_content_bad(msg):
9+ file_mtime = os.stat(filepath).st_mtime
10+ if release['mtime'] < file_mtime:
11+ msg = ' '.join((msg, 'Stale Release file.'))
12+ raise ContentBad(msg)
13+
14 size = int(files[filename]['size'])
15 if disk_size != size:
16 msg = 'Sizes do not match for {} in {}'.format(filename,
17 release['name'])
18- raise ContentBad(msg)
19+ raise_content_bad(msg)
20
21 with open(filepath, 'rb') as infile:
22 sha256 = hashlib.sha256()
23@@ -286,12 +292,9 @@
24 sha256.update(data)
25 digest = sha256.hexdigest()
26 if digest != files[filename]['SHA256']:
27- file_mtime = os.stat(filepath).st_mtime
28 msg = 'SHA256 mismatch for {} in {}.'.format(filename,
29 release['name'])
30- if release['mtime'] < file_mtime:
31- ' '.join((msg, 'Stale Release file.'))
32- raise ContentBad(msg)
33+ raise_content_bad(msg)
34
35
36 def verify_repository(archive_root):

Subscribers

People subscribed via source and target branches

to all changes: