Merge lp:~freyes/simplestreams/lp1630744 into lp:simplestreams

Proposed by Felipe Reyes
Status: Rejected
Rejected by: Scott Moser
Proposed branch: lp:~freyes/simplestreams/lp1630744
Merge into: lp:simplestreams
Diff against target: 26 lines (+8/-1)
1 file modified
simplestreams/mirrors/glance.py (+8/-1)
To merge this branch: bzr merge lp:~freyes/simplestreams/lp1630744
Reviewer Review Type Date Requested Status
Scott Moser (community) Needs Information
Server Team CI bot continuous-integration Needs Fixing
Review via email: mp+312704@code.launchpad.net

Commit message

mirrors/glance: when deleting an image silently discard 404 error

This may happen when glance detected the image is not available in the
storage backend anymore and marked it as deleted. Without this patch syncing
process is aborted.

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

seems sane, one small request.

lp:~freyes/simplestreams/lp1630744 updated
450. By Felipe Reyes

Log image id and exception when delete op fails

Revision history for this message
Felipe Reyes (freyes) wrote :

Scott, pushed a new commit addressing your feedback. Thanks for reviewing this.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Scott Moser (smoser) wrote :

Is this still necessary?

review: Needs Information
Revision history for this message
Felipe Reyes (freyes) wrote :

it is, the behavior on glance side hasn't changed.

Revision history for this message
Scott Moser (smoser) wrote :

Hi.
We've moved simplestreams from bzr on launchpad to git on launchpad.
I'm going to mark this merge proposal as Rejected based only on
the fact that it is a bzr based merge proposal.

Please feel free to re-submit the merge proposal using the launchpad git.
Hopefully the cloud-init doc at
 http://cloudinit.readthedocs.io/en/latest/topics/hacking.html
should give you an idea on how to do that.

Unmerged revisions

450. By Felipe Reyes

Log image id and exception when delete op fails

449. By Felipe Reyes

mirrors/glance: when deleting an image silently discard 404 error

This may happen when glance detected the image is not available in the
storage backend anymore and marked it as deleted. Without this patch syncing
process is aborted.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'simplestreams/mirrors/glance.py'
2--- simplestreams/mirrors/glance.py 2016-06-14 20:21:05 +0000
3+++ simplestreams/mirrors/glance.py 2016-12-14 20:36:27 +0000
4@@ -25,6 +25,7 @@
5 import copy
6 import errno
7 import glanceclient
8+import glanceclient.exc
9 import json
10 import os
11 import re
12@@ -469,7 +470,13 @@
13 util.products_del(target, pedigree)
14 if 'id' in data:
15 print("removing %s: %s" % (data['id'], data['name']))
16- self.gclient.images.delete(data['id'])
17+ try:
18+ self.gclient.images.delete(data['id'])
19+ except glanceclient.exc.HTTPNotFound as ex:
20+ # This may happen when glance detected the image is not
21+ # available in the storage backend anymore and marked it
22+ # as deleted
23+ LOG.warn("Failed to delete image id=%s: %s", id, ex)
24
25 def filter_index_entry(self, data, src, pedigree):
26 return filters.filter_dict(self.index_filters, data)

Subscribers

People subscribed via source and target branches