-
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
Option needed for new ems_refresh.openshift.store_unused_images setting #11
Conversation
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
@simon3z @blomquisg @agrare please review/merge... |
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 👍
The relevant BZ is probably https://bugzilla.redhat.com/show_bug.cgi?id=1436176 "OPenShift Refresh duration exceeds default two hour timeout and grows > 8GB never fully completing" |
I believe this is ready |
@miq-bot add-label enhancement |
75820e2
to
bfde9d4
Compare
ping @simon3z. |
@cben let's focus on the graph refresh for now. |
Sure, but is anything stopping this from being merged?
|
@cben yes capacity in supporting different flows of collection for images (that both needs to be tested). |
@simon3z @enoodle I'm closing these for now, if you'll want to revive them, it should be a simple rebase. Good point that this would increase exposure to #103 (issue extracted from ManageIQ/manageiq#14808). |
Allows to still get_container_images=true, but instead of saving metadata (labels etc) on all images openshift gave us, save it only for images that have been mentioned by pods. Here called store_new_images because this function doesn't have the context to understand which images are "used". For store_unused_images=false, it'll be called twice: - from parse_pods with true, adding all images - from parse_openshift_image with false, only enriching previous images
Reviving, @enoodle @agrare PTAL. (openshift PR WIP, will reopen soon) @simon3z: yes it will increase image disconnection (#103) but so will |
@cben 👍 from me |
@cben ok on the idea but I wish we had a better code solution (I wish we had two different methods to call, one to just enrich and one to add new found images, of course they could reuse some common code). I don't want to block this if it's urgent but I really hope we can improve it. |
bfde9d4
to
004437c
Compare
Checked commit cben@004437c with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb
|
Ack, I'd love to refactor the image code. => For now this is small and backportable, I'd like to merge it, and do a followup after I think more... |
@@ -1100,7 +1100,8 @@ def parse_container_state(state_hash) | |||
res | |||
end | |||
|
|||
def parse_container_image(image, imageID) | |||
# may return nil if store_new_images = false | |||
def parse_container_image(image, imageID, store_new_images: true) |
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.
store_new_images or store_unused_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.
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.
This function doesn't have the context to understand what's used.
It gets called twice, first adding images from pods, second maybe not adding images from openshift registry.
Everybody asked this. OK, I see I better rewrite this.
reusing BZ https://bugzilla.redhat.com/show_bug.cgi?id=1436176, same as get_container_images and other band-aids? |
@cben that BZ is already in post so I think we should open a new BZ |
ManageIQ/manageiq-providers-kubernetes#11, ManageIQ/manageiq-providers-openshift#9 Option needed for new ems_refresh.openshift.store_unused_images setting (cherry picked from ManageIQ/manageiq-providers-kubernetes@0046549) Add ems_refresh.openshift.store_unused_images setting https://bugzilla.redhat.com/show_bug.cgi?id=1486483 (partially cherry picked from ManageIQ/manageiq-providers-openshift@6a62bb2: omitted the graph refresh test skip, passing options explicitly - constructor didn't set `@options` on fine, adjusted for different test method signature :connected vs :archived)
ManageIQ/manageiq-providers-kubernetes#11, ManageIQ/manageiq-providers-openshift#9 Option needed for new ems_refresh.openshift.store_unused_images setting (cherry picked from ManageIQ/manageiq-providers-kubernetes@0046549) Add ems_refresh.openshift.store_unused_images setting (partially cherry picked from ManageIQ/manageiq-providers-openshift@6a62bb2: omitted the graph refresh test skip, passing options explicitly - constructor didn't set `@options` on euwe, adjusted for different test method signature :connected vs :archived, simulating missing stub_settings_merge, adjusted for different VCR cassette) https://bugzilla.redhat.com/show_bug.cgi?id=1486483
Backported to Euwe via ManageIQ/manageiq#15917 |
Backported to Fine via ManageIQ/manageiq#15907 |
ManageIQ/manageiq-providers-kubernetes#11, ManageIQ/manageiq-providers-openshift#9 Option needed for new ems_refresh.openshift.store_unused_images setting (cherry picked from ManageIQ/manageiq-providers-kubernetes@0046549) Add ems_refresh.openshift.store_unused_images setting https://bugzilla.redhat.com/show_bug.cgi?id=1486483 (partially cherry picked from ManageIQ/manageiq-providers-openshift@6a62bb2: omitted the graph refresh test skip, passing options explicitly - constructor didn't set `@options` on fine, adjusted for different test method signature :connected vs :archived)
#kubernetes part of ManageIQ/manageiq#14662 after repo split.
This will have to be merged before openshift part ManageIQ/manageiq-providers-openshift#9.
Strawman alternative/baseline for ManageIQ/manageiq#14628.
Will allow to still get_container_images=true, but instead of saving metadata (labels etc) on all images openshift gave us, save it only for images that have been mentioned by pods.
Here called
store_new_images
because this function doesn't have the context to understand which images are "used".For
store_unused_images
=false setting, it'll be called twice:cc @agrare @enoodle @zeari