-
Notifications
You must be signed in to change notification settings - Fork 297
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 #38163 - Pass installable advisories only to install command #11290
Fixes #38163 - Pass installable advisories only to install command #11290
Conversation
I'm concerned that this fix here doesn't get to the root issue -- why were there so many advisories being added to the dnf call that it caused an The search for applicable errata in the job template was specifically set to false so that As is, this change likely reverts the fix for https://projects.theforeman.org/issues/37831. If a user recently changed repository sets and tries applying some errata via the UI, they're going to find that the errata they choose in the UI differ from what the job tempate will let them do, which is a confusing user experience. This is due to the fact that changing repository sets, by design, does not update the host's |
|
Where does the "Argument list too long" come from? I remember testing DNF with over 5000 arguments and it worked. |
Thanks for the feedback. I think i understand the regression i've introduced. I also checked back with the colleague that initially ran into the issue, I might be able to narrow down how selecting all errata instead of applicable errata can be triggered. We are applying errata via the errata tab in content: If we select all the errata by using the "select all" checkbox at the top right, we get the argument list too long error. Before applying them the selection looks like this: Applying then generates the failing Job named "Install errata". If we select the errata individually by checking the box on each row, the the generated Job is called "Install errata errata_id ^ (ALSA-2025:0334,ALSA-2025:0377)" and works as intended. The UI looks the same before applying the job. I'm not sure if looping over the errata to generate multiple dnf command will work. I would assume that such a job would take very long and do a ton of no-op dnf calls. I'd be happy to contribute a fix, but will have to dig a bit deeper to find the code paths that lead to selecting all errata from the whole system. As it is looking like frontend code could be involved, this might take me a while. Would you like me to prepare a revert commit in the meantime? |
Also, i quickly analyzed the failing output. When we initially encountered this, it was trying to apply 17872 erratas. |
Thanks for the further analysis, @hairmare !
With the info you provided here, I think the bug is as follows:
I think we have two options. Either:
The situation here is trickier than I expected, so I think we can wait on reverting until we're more clear on the fix strategy. |
This won't work because the UI doesn't have all the errata IDs when you select all. It only has those from the current page, since our API is paginated and doesn't give you all of the thousands of results. I think the fix should go here -->
and should be based on applicable_for_hosts rather than |
Let's use https://projects.theforeman.org/issues/38175 for the new fix |
It looks like |
What are the changes introduced in this pull request?
Filter Errata via
check_installable_for_host
before passing them to the install command.Prevents generating a command with all the errata that will result in "Argument list too long".
Considerations taken when implementing this change?
The arg was just added in Sept 2024 in ec14209, I'm only changing it for Ansible because puppet probably works as intended.
What are the testing steps for this pull request?