-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only consider image properties of public/community images. #724
Conversation
This should be configurable if a project is used in which there are no public or community images but only private images. Otherwise, such a project could not be used for testing. In the future, we will at least have the case that some of our projects do not contain images that are public/community. The images in the projects are still managed by us and contain all the necessary meta information. |
Tests/iaas/entropy/entropy-check.py
Outdated
@@ -428,7 +428,7 @@ def main(argv): | |||
try: | |||
logger.debug(f"Connecting to cloud '{cloud}'") | |||
with openstack.connect(cloud=cloud, timeout=32) as conn: | |||
all_images = conn.list_images() | |||
all_images = list(filter(lambda x: x.visibility == 'public' or x.visibility == 'community', conn.list_images())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT, the image-metadata check uses server-side filtering, and it only checks public images. Shall we change that as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Three points:
- Having consistency between the two checks would always be preferable.
- I did not see an obvious way to do server side filtering, but I may not have looked deeply enough. It's always preferable.
- I chose
public
andcommunity
because these are controlled by the cloud operator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, let's change both tests, then?
Wouldn't you fail the image-md check if you don't at least have a public Adding an option |
In at least one environment we have the requirement to work with private images only. It's not about efficiency there. To be as compliant as possible we make an image like the mentioned Ubuntu 22.04 available as a private image in every project of this environment so that it can be used in general. But it is neither public nor community. |
You can pass |
We may not have the luxury to test against a pristine project, so there may be prviate images or shared images from others. Only consider provider images with "public" or "community" visibility. https://wiki.openstack.org/wiki/Glance-v2-community-image-visibility-design Signed-off-by: Kurt Garloff <[email protected]>
Signed-off-by: Kurt Garloff <[email protected]>
Default is public,community. Passing --image-visibility="" will result in no filtering, same as passing -V "public,community,shared,private". Signed-off-by: Kurt Garloff <[email protected]>
Signed-off-by: Kurt Garloff <[email protected]>
Signed-off-by: Matthias Büchse <[email protected]>
48cb865
to
f5d7987
Compare
Comments on the last change:
As far as I can see, the changes are absolutely fine, though this time (unlike before), not necessarily a clear improvement. |
* Only consider image properties of public/community images. We may not have the luxury to test against a pristine project, so there may be prviate images or shared images from others. Only consider provider images with "public" or "community" visibility. https://wiki.openstack.org/wiki/Glance-v2-community-image-visibility-design Signed-off-by: Kurt Garloff <[email protected]> * Allows image filtering by visibility. Default is public,community. Passing --image-visibility="" will result in no filtering, same as passing -V "public,community,shared,private". Signed-off-by: Kurt Garloff <[email protected]> * fail if no image left after filtering, filter early, make more Pythonic Signed-off-by: Matthias Büchse <[email protected]> --------- Signed-off-by: Kurt Garloff <[email protected]> Signed-off-by: Matthias Büchse <[email protected]> Co-authored-by: Matthias Büchse <[email protected]>
* Revise entropy check to work without floating IP * Bugfix: network must be passed to create_server * Bugfix: set auto_ip=False * Only consider image properties of public/community images. (#724) ---- Signed-off-by: Matthias Büchse <[email protected]> Signed-off-by: Kurt Garloff <[email protected]> Co-authored-by: Martin Morgenstern <[email protected]> Co-authored-by: Christian Berendt <[email protected]> Co-authored-by: Kurt Garloff <[email protected]>
We may not have the luxury to test against a pristine project, so there may be private images or shared images from others. Only consider provider images with "public" or "community" visibility.
https://wiki.openstack.org/wiki/Glance-v2-community-image-visibility-design
Note: While testing PR #713, this did not fail the overall test, I saw a failed message on check-image-properties which was due to private images ... which could have been avoided.