Job invocation installs all the installable errata if incorrect `Job Template` is used
Description of problem:
Job invocation installs all the installable errata if incorrect `Job Template` is used.
Version-Release number of selected component (if applicable):
Satellite 7.0.0-13.0 RHEL7,RHEL8
Steps to Reproduce:
1. Sync repos with errata, create lce,cv(promote it),ak
2. Register host and install some packages so that errata is created. (I used 5 errata)
3. Monitor > Jobs > Run Job > Job Category = Katello > Job template = Install errata by search query - Katello SSH Default > Search Query = <registered host> > Errata search query = errataID_1,errataID_2,errataID_3 > Submit
4. You should get a success. Goto Preview templates of the job ran and toggle the job ran.
Under "#Action"(from step 4), you can see `yum -y update-minimal`. That means all the errata have been installed. But only 3 errata were supposed to be installed.
It should have been `yum -y update-minimal --advisory=errataID_1 --advisory=errataID_2 --advisory=errataID_3` so that only the mentioned errata is installed.
Yes, When using `Install errata by search query - Katello SSH Default` to install errata, you're supposed to use it as `id ^ (errataID...)` but incase the customer does not notice it, this step will install all the installable errata for that host(s). Which they might not want.
Adding a searchquery format checker or just let job should fail?
#1 Updated by The Foreman Bot about 1 year ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/10026 added
#2 Updated by The Foreman Bot 12 months ago
- Fixed in Releases Katello 4.5.0 added
#3 Updated by Anonymous 12 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|bbecd8d788fc8c872d396d45e956b62785485639.
#4 Updated by Ryan Verdile 12 months ago
- Triaged changed from No to Yes
- Target version set to Katello 4.5.0
Fixes #34638 - Fail if errata search query matches nothing