-
Notifications
You must be signed in to change notification settings - Fork 293
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 #37600 - Add params to skip Candlepin content on repository remove #11052
base: master
Are you sure you want to change the base?
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.
Seems to work fine, ran the instructions in the PR exactly on the reproducer. Just wanted to check -- 1458 on the reproducer was also an erroring repository?
One question -- how will a user know to run this workflow? I wonder if we can catch the Unable to find content with the ID "8799".
error and tell the user to try deleting the repo with those parameters.
I am not sure the best way, we can try to find those items in candlepin and we can't find them just skip those items in the task as well as have the params I exposed if the user knows the except repos #'s. To answer your other questions, yeah any of the codebuilder repos were failing in that reproducer, prob some others but that is what was in the bug. |
What would you think about adding a rescue where the missing content error pops up and return a custom error saying something like "Try deleting the repository with blah options"? |
Otherwise I suppose we'd need to add an entry to the debugging section in the Foreman docs |
My worry there is then the task will be half complete and the repos will be out of Pulp/Katello so won't it fail the next time on the first part of the delete? Is there a way to do a dry run first before it deletes anything? |
If that's unavoidable, I could see a user hitting the error, having one messed up repo, and then going to some document teaching them how to find the rest of the broken repositories and then fixing them following the guide. I can't remember, do we have a rake task that'll find these repos that are broken and need deleting? If so, I suppose the rake task could teach the user of the new options. |
(Also, the PR needs a rebase for the tests to run) |
I missed this before, I think this totally makes sense so the user wouldn't even have to think about it. Maybe just a warning log to say that the content deletion was skipped. |
12be414
to
e118736
Compare
@chris1984 can you rebase? @ianballou mind having another look? thanks |
Ian is helping me get it working, but Sayan said it might be safe to push it to 6.17. I'll keep trying to make it work |
Based on a few of the recent occurrences of this issue, I believe I would be happy with the implementation if it would be something like this :
As long as this would be the workflow for the deletion of a repo, I am happy to have the fix delivered as soon as possible. While the issue also could happen during repo creation, 90% of the cases encountered are related to deletion only. So for now, let's fix the deletion part and make it as smooth as we can. @chris1984 @ianballou jfyi ^^ |
That works for me, I am wrapping up 2 6.16 bugs, then will get back to this one so we can get this possibly into a 6.16.z |
What are the changes introduced in this pull request?
skip_environment_update
destroy_content
these params were not exposed to the user.skip_candlepin_environment_update
which maps toskip_environment_update
andskip_candlepin_remove_content
which maps todestroy_content
What are the testing steps for this pull request?
hammer repository destroy --id 1457 --organization-id 1
cd /usr/share/gems/gems/katello-4.7.0.36
patch -p1 < <patchfile>
foreman-maintain service restart
hammer repository destroy --id 1458 --organization-id 1 --skip-candlepin-environment-update true --skip-candlepin-remove-content true
Patch file:
katello.patch