GlanceMirror item filters are hardcoded
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
simplestreams |
Fix Released
|
Undecided
|
Unassigned | ||
simplestreams (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
[Impact]
The GlanceMirror class has a hard-coded filter for items to be
downloaded.
Anyone using it directly or via the script in
tools/sstream-
will end up with a large number of images, at least one for each of
the available release series, and only x86_64 or amd64.
It is likely that users will want to be able to limit the images they
download to just one release, and may want to be able to download
images for other architectures, such as arm*.
The attached diff simply exposes the existing filter mechanism as a
config option, using the previous hardcoded values as defaults.
This config option is used (currently it is just ignored by the
published simplestreams code) in an charm that is released on the
charm store for trusty, 'glance-
OpenStack on Trusty are likely to want the option to control image
downloads via that charm.
[Test Case]
In an openstack cloud, with proper openstack env vars (OS_USERNAME,
OS_PASSWORD, OS_REGION etc), run the sstream-
download images locally:
from the source tree top directory,
PYTHONPATH=. tools/sstream-
images/ --cloud-name test_cloud --content-id test_content \
--keyring /usr/share/
http://
verify that it downloads many images. This may take a while. If you
like, you can just check that it will download an image for an old
series like raring or quantal.
Clean up after it by removing the images/ directory.
Then with the update applied, from the source tree top dir:
PYTHONPATH=. tools/sstream-
images/ --cloud-name test_cloud --content-id test_content \
--keyring /usr/share/
--item-
http://
and verify that it downloads only one matching image, trusty on arm64.
[Regression Potential]
This has very limited regression potential, because anyone relying on
the existing behavior will still get it because the previous behavior
is retained via defaults.
Related branches
- Scott Moser: Pending requested
-
Diff: 104 lines (+31/-6)3 files modifiedsimplestreams/filters.py (+6/-1)
simplestreams/mirrors/glance.py (+14/-4)
tools/sstream-mirror-glance (+11/-1)
Changed in simplestreams: | |
status: | New → Fix Committed |
tags: | added: cloud-installer |
Changed in simplestreams (Ubuntu): | |
importance: | Undecided → Critical |
importance: | Critical → High |
description: | updated |
description: | updated |
Changed in simplestreams (Ubuntu): | |
status: | Confirmed → Fix Committed |
tags: |
added: verification-done removed: verification-needed |
Status changed to 'Confirmed' because the bug affects multiple users.