Skip to content
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

Container image post refresh from openshift #14628

Conversation

enoodle
Copy link

@enoodle enoodle commented Apr 4, 2017

This will enable container images to grab information from openshift (refresh_openshift_information) and will hook this in the queue for each new image after the refresh. This makes sense after #14606 when skiping openshift image refresh.

@enoodle enoodle changed the title Container image post refresh from openshift [WIP] Container image post refresh from openshift Apr 4, 2017
@miq-bot miq-bot added the wip label Apr 4, 2017
@enoodle
Copy link
Author

enoodle commented Apr 4, 2017

cc @bazulay @simon3z @agrare @cben
This assumes #14606 disabled the collection of images from Openshift.

  • We might want to condition the images refresh from Openshift on the same/similar flag.
  • We might want to add a timestamp of the last refresh of Openshift data on the images and recollect this data after some time has passed instead of only doing it on new images.

Please advise on both. I will start working on the second point but would like your input.

@enoodle enoodle force-pushed the container_image_post_refresh_from_openshift branch from 8d0e1fc to d592de7 Compare April 5, 2017 09:15
@enoodle enoodle force-pushed the container_image_post_refresh_from_openshift branch 2 times, most recently from ebc927a to 4ab902a Compare April 5, 2017 09:24
@enoodle
Copy link
Author

enoodle commented Apr 5, 2017

Added last_openshift_refresh field to save the last time the image was refreshed from Openshift. Using this field and a time in days configured in the settings images can be re-scanned from Openshift after a certain time period.

@enoodle enoodle force-pushed the container_image_post_refresh_from_openshift branch from 4ab902a to d51d42a Compare April 5, 2017 13:41
@miq-bot
Copy link
Member

miq-bot commented Apr 5, 2017

This pull request is not mergeable. Please rebase and repush.

@enoodle enoodle force-pushed the container_image_post_refresh_from_openshift branch from d51d42a to bf3d4ee Compare April 5, 2017 16:26
@enoodle enoodle changed the title [WIP] Container image post refresh from openshift Container image post refresh from openshift Apr 5, 2017
@enoodle enoodle force-pushed the container_image_post_refresh_from_openshift branch 3 times, most recently from ed9f9f0 to ef398d0 Compare April 6, 2017 08:35
@enoodle enoodle force-pushed the container_image_post_refresh_from_openshift branch from ef398d0 to edc0e72 Compare April 13, 2017 10:38
EmsRefresh.save_labels_inventory(self,
openshift_image_data.delete(:labels))
EmsRefresh.save_docker_labels_inventory(self,
openshift_image_data.delete(:docker_labels))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cben I changed here to use "save_inventory" functions in accordance to our discussion about this. PTAL

@enoodle enoodle force-pushed the container_image_post_refresh_from_openshift branch from edc0e72 to bc6a105 Compare April 13, 2017 10:44
@miq-bot
Copy link
Member

miq-bot commented Apr 13, 2017

Checked commits enoodle/manageiq@059bf79~...bc6a105 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
6 files checked, 0 offenses detected
Everything looks good. ⭐

@miq-bot
Copy link
Member

miq-bot commented Apr 21, 2017

This pull request is not mergeable. Please rebase and repush.

@chessbyte
Copy link
Member

@simon3z rebase and repush?

@enoodle
Copy link
Author

enoodle commented Jun 15, 2017

@simon3z @chessbyte IIUC this kind of solution is less relevant with the graph refresh on its way to us.

@enoodle enoodle closed this Jun 15, 2017
@cben
Copy link
Contributor

cben commented Aug 28, 2017

For the record, we saw fetching just a single image metadata with oc describe image sha256:... get stuck for minutes on a customer's openshift 4.2.
=> This makes this direction impractical. If a single image is slow similarly to getting all images, we can get nothing or all at once.
The slowness might be specific to that environment (old openshift, ~63000 images in openshift registry), but refresh performance in that the enviroment motivated this work in the first place...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants