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
Fixes #25921 Sync Capsules before applying errata at incremental update #7946
Fixes #25921 Sync Capsules before applying errata at incremental update #7946
Conversation
|
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
2ae6fea
to
04c47ab
Compare
|
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
04c47ab
to
844c024
Compare
|
I think the test But a confirmation from somebody else would be appreciated. |
ed5839f
to
8a8c2f4
Compare
|
Current failure is some CI issue (postgres |
|
[test katello] |
|
@jlsherrill bump on this, I am looking to close out some older bugs. |
8a8c2f4
to
04bcd90
Compare
|
Rebased to current master, comments incorporated. I am not fully happy with finding nondefault proxies based on their name: that might have a simplier solution with just one |
|
[test katello] |
|
@pmoravec ping :) |
04bcd90
to
0c4dbef
Compare
|
Here's some rough draft of what tests I think we should have in test/actions/katello/content_view_test.rb#IncrementalUpdatesTest |
0c4dbef
to
33e180e
Compare
|
Updated to the For the tests: good point though I have no experience in writing or testing them. I would need to spend more time I dont have now, so I just applied the first improvement. |
|
About tests where I am pure newbie and write code without testing it: here is what the two test cases shall look like (I bet there are multiple issues so havent re-spin the PR): |
|
I'll take a shot at the tests so we can get this contribution merged in. Will get back in a day or two! |
|
@pmoravec I added some test on my own copy of this PR with some additional tweaks to the code. With this, everything should be good to go. Feel free to merge it to your branch and review that it matches your expectations as well :) |
33e180e
to
be1ae27
Compare
|
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
Identify smart proxies the Hosts are registered through, and invoke Capsule synchronization of the updated content before applying errata to those Hosts. This will make some of the automatically triggered Capsule synchronizations redundant, but such no-op is harmless and preventing it could be error-prone. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
be1ae27
to
3a8859d
Compare
|
Thanks for collaboration. I merged the 3 commits into one and rebased the PR. |
|
@jlsherrill you've looked at this PR in the past - would you mind giving it a once-over for the approach taken since pavel and I have worked together on it a bit? |
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.
Code review looks good to me!
|
@pmoravec I was giving this a final test-through and discovered that the query to look up the proxies which I pointed you to will not work as intended. I'll spare the details unless you want me to explain. @jlsherrill suggested to me that we don't try to isolate which proxies need syncing by which hosts are registered through them, but rather to sync all the proxies which have the affected environment and then run the applicable errata install as before. It's possible we'll sync a few extra proxies, but we'll still guarantee that the affected hosts can install those errata. It also occurred to us that this change could greatly increase the time it takes to perform the incremental update since the capsule sync becomes synchronous to overall execution as it's written now. We think it's a good idea to effectively mirror what is being done during CV promote in order to run capsule sync and applicable errata install asynchronous to the incremental update Example code is here:
I think we could create a new action to handle this async behavior such as Actions::Katello::ContentView::SyncAndInstallErrata (just a suggested name) I've emphasized in bold the main ideas of the changes suggested here - let me know if I've explained them well and if you agree with them. If you're not sure how to approach making the changes I can offer more guidance as needed :) |
|
I agree with the proposal of changes. Due to the holiday time and some other commitment, I can get to this in a month manner the soonest. |
|
This needs a rebase and I believe there was some feedback pending code changes |
|
@pmoravec any chance you'll be able to get back to this? Do you need us to take it over? (I see there's a BZ for it) |
|
Sorry, no time to rework the patch :( A take over would be appreciated. |
|
Thanks Pavel I'll work on it this sprint |
|
Closing this in favor of #8719 - thanks Pavel! |
Identify smart proxies the Hosts are registered through, and invoke Capsule
synchronization of the updated content before applying errata to those Hosts.
This will make some of the automatically triggered Capsule synchronizations
redundant, but such no-op is harmless and preventing it could be error-prone.
Fixes: #25921
Signed-off-by: Pavel Moravec pmoravec@redhat.com