Bug 1979239 - Warnings should be improved for hammer host errata apply, when not passing errata_ids
Summary: Warnings should be improved for hammer host errata apply, when not passing er...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Errata Management
Version: 6.10.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: 6.10.0
Assignee: Lucy Fu
QA Contact: Akhil Jha
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-05 10:43 UTC by Gaurav Talreja
Modified: 2021-11-16 14:12 UTC (History)
1 user (show)

Fixed In Version: tfm-rubygem-katello-4.1.1.17-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:12:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33182 0 Normal New Warnings should be improved for hammer host errata apply, when not passing errata_ids 2021-07-29 15:47:57 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:12:40 UTC

Description Gaurav Talreja 2021-07-05 10:43:36 UTC
Description of problem:


Version-Release number of selected component (if applicable):
Satellite 6.10.0 Snap 7.0

How reproducible:
always

Steps to Reproduce:
1. # hammer host errata apply --host-id <host-id>
This command uses katello agent and will be removed in favor of remote execution in a future release.
The remote execution equivalent is `hammer job-invocation create --feature katello_errata_install`.
Could not apply errata:
  no implicit conversion of nil into String
2. # echo $?
70


Actual results:
no implicit conversion of nil into String

Expected results:
A warning should exist to pass errata_ids, like when not passing --errata to command `hammer host-collection erratum install --id 1 --organization-id 1`

Additional info:
On Satellite 6.9.3 Snap 5.0 
# hammer host errata apply --host-id 3
Could not apply errata:
  undefined method `[]' for nil:NilClass

Comment 1 Brad Buckingham 2021-07-08 12:26:27 UTC
Hi Gaurav,

Can you attach the stack trace from the production.log when the error occurs?  Thanks!

Comment 3 Lucy Fu 2021-07-29 15:47:55 UTC
Created redmine issue https://projects.theforeman.org/issues/33182 from this bug

Comment 4 Maria 2021-08-26 10:05:27 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33182 has been resolved.

Comment 6 Akhil Jha 2021-09-27 18:08:37 UTC
Verified.
Satellite 6.10.0 Snap 20.0

Step:
```
hammer host errata apply --host-id 3
This command uses katello agent and will be removed in favor of remote execution in a future release.
The remote execution equivalent is `hammer job-invocation create --feature katello_errata_install`.
Could not apply errata:
  Missing arguments for '--errata-ids'.
``` 
Observation: Missing argument is show to the user.

Comment 9 errata-xmlrpc 2021-11-16 14:12:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4702


Note You need to log in before you can comment on or make changes to this bug.