Merge lp:~pjdc/glance-simplestreams-sync-charm/image-modifier-hook into lp:glance-simplestreams-sync-charm
Status: | Merged |
---|---|
Merge reported by: | Paul Collins |
Merged at revision: | not available |
Proposed branch: | lp:~pjdc/glance-simplestreams-sync-charm/image-modifier-hook |
Merge into: | lp:glance-simplestreams-sync-charm |
Diff against target: |
210 lines (+95/-9) 5 files modified
config.yaml (+25/-0) hooks/hooks.py (+34/-3) metadata.yaml (+3/-0) scripts/glance-simplestreams-sync.py (+29/-6) templates/mirrors.yaml (+4/-0) |
To merge this branch: | bzr merge lp:~pjdc/glance-simplestreams-sync-charm/image-modifier-hook |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike McCracken (community) | Needs Fixing | ||
Review via email: mp+226242@code.launchpad.net |
Description of the change
Canonical IS uses glance-
We have made some changes to g-s-s support this project, as follows:
* add a new hook, image-modifier, using a new interface, script-provider
We use this hook to relate a subordinate charm that contains
scripts used to pre-process images as they are synced to support
our use cases. (One of these use cases involves spawning
single-use instances to perform jobs that may take less than a
minute, so we pre-install daemon packages, etc. to avoid losing too
much time to things that be done to the image ahead of time.)
* add a subclass of GlanceMirror, FilteredGlanceM
GlanceMirror's filtering logic is hardcoded to a value that does
not cover all of our anticipated use cases.
* add two new config items, name_prefix and content_id_template
name_prefix is used by our image-selection logic, and
content_
images can be mirrored from the same source without interfering
with each other. For example, one set of images via a g-s-s
deployed with an image-modifier subordinate charm (see above) and a
second g-s-s mirroring unmodified vanilla images.
* run exec.d/
Please let me know what you think.
Hi Paul, thanks for the work on this, I'm glad it's proving useful for you in IS.
Sorry for the slow response, this MP got buried in email at first.
The LP repo is a mirror - the main development of the sync charm is on github here: /github. com/Ubuntu- Solutions- Engineering/ glance- simplestreams- sync-charm
https:/
If you're comfortable using git/github, it'd be easiest to merge things via PR's there.
If you'd prefer to use bzr&lp, I have no problems with reviewing
branches here and doing the patches myself in git.
As a general comment, I'd prefer to review separate branches for
separate changes: eg, one for adding the image-modifier relation and
one for adding filter config, etc. It makes it easier to approve one
change and get it merged while asking for feedback or changes on the others.
- The image modifier script subordinate charm is a nice approach, we
were thinking about how to support modify_hook here, and did not
like the possibility of writing scripts quoted inside the yaml
config.
- As for the item filter, that subclass is a solid workaround for /bugs.launchpad .net/simplestre ams/+bug/ 1339842 (Your
simplestreams not supporting it, but we probably don't need it - I
fixed it in simplestreams upstream, so GlanceMirror in
simplestreams in utopic now does pay attention to the item_filter
args, while I'm pushing an SRU through to trusty to get it added
there: https:/
adding a comment there might be useful to help push it, I'm not
familiar with the process) If you need it on any other series,
let's discuss.
I also have a trusty build with that change (and one other, to /launchpad. net/~cloud- installer/ +archive/ ubuntu/ simplestreams- testing
support per-file download progress updates in glancemirror) in this
PPA:
https:/
- It's nice to have the prefix and content-id settings fixed by
someone who knows what they need there. Thanks!
- Thanks for adding the execd support, too. I wasn't aware of its
existence.