-
Notifications
You must be signed in to change notification settings - Fork 63
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
read image acquiring status #174
read image acquiring status #174
Conversation
0cf4f3c
to
37847a5
Compare
37847a5
to
b135d68
Compare
Some comments on commit enoodle@b135d68 spec/models/manageiq/providers/kubernetes/container_manager/scanning/job_spec.rb
|
Checked commit enoodle@b135d68 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@ilackarms @cben @yaacov Can you review please? |
What happens when we have the patch here but old image inspector? can you add a test that makes sure we do not crash in that scenario |
Nothing, Image-Inspector will exit with error and the Job will wait until this Jobs receives timeout and deletes it. The same timeout tests for Jobs apply here. |
A thought, we have this check in several places:
I think we should test if the image was archived. we would still need what you did here but would be able to report sooner before communicating with image-inspector in some cases. BTW since there is work done on pod watch we should know fast when an image originating from a pod was deleted |
@moolitayer We should do this on another PR, this one is only for reading status from Image-Inspector. |
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.
LGTM 👍
note: the LGTM above pending openshift/image-inspector#82 :-) |
looks good 👍 |
I'm fine with that, my comment is regarding the bzs mentioned here |
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.
LGTM 👍
@enoodle just making sure again, you are saying we can merge here before the image-inspector change right? |
Yes, With the happy flow
Yes, I will take care of it |
please set backport labels according to BZs. |
@miq-bot add_label gaprindashvili/yes |
Meant to report that image-inspector failed to acquire the image, this will read ImageAcquireSuccess, ImageAcquireError and abort the job if needed with the error reported from image-inspector.
Based on image-inspector change from: openshift/image-inspector#82
Currently (Before these two fixes) when Image-Inspector is failing to acquire the image it will exit and the Job on the ManageIQ side will wait until timeout is reached for the information to be served.
When the image-inspector image is updated with this change but ManageIQ is running without this patch the error message will look similar to this:
But this patch will change it to:
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1491643
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1484936