Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1416690 - hammer errata list for satellite host throws error: NoMethodError: undefined method `installable_errata' for nil:NilClass
Summary: hammer errata list for satellite host throws error: NoMethodError: undefined ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.2.7
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: Unspecified
Assignee: Walden Raines
QA Contact: Kedar Bidarkar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On: 1351040
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-26 09:21 UTC by Oleksandr Shtaier
Modified: 2019-04-01 20:27 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1351040
Environment:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15564 0 None None None 2017-01-26 09:21:33 UTC

Description Oleksandr Shtaier 2017-01-26 09:21:34 UTC
Description of problem: I was just trying to list errata for all hosts and its working fine. But when I checked the errata list for satellite host itself, it failed to list with below error:

 ~]# hammer -u admin -p changeme host list
---|--------------------------------------------|------------------|------------|---------------|------------------
ID | NAME                                       | OPERATING SYSTEM | HOST GROUP | IP            | MAC              
---|--------------------------------------------|------------------|------------|---------------|------------------
1  | cloud-qe-06.idmqe.lab.eng.bos.redhat.com   | RHEL Server 6.8  |            | 10.19.34.35   | 34:40:b5:8a:43:ff


[root@cloud-qe-06 ~]# hammer -u admin -p changeme host errata list  --host-id 1
undefined method `installable_errata' for nil:NilClass


Please note that "--host-id 1" is of satellite server's itself.

Version-Release number of selected component (if applicable):
sat6.2 GA snap17

How reproducible:
always

Steps to Reproduce:
1. hammer -u admin -p changeme host errata list  --host-id <id_of_satellite_server_host>
2.
3.

Actual results:
[root@cloud-qe-06 ~]# hammer -u admin -p changeme host errata list  --host-id 1
undefined method `installable_errata' for nil:NilClass

Expected results:
no exception

Additional info:

[DEBUG 2016-06-29 01:43:18 API] 500 Internal Server Error
{
    "displayMessage" => "undefined method `installable_errata' for nil:NilClass",
            "errors" => [
        [0] "undefined method `installable_errata' for nil:NilClass"
    ]
}
[ERROR 2016-06-29 01:43:18 Exception] undefined method `installable_errata' for nil:NilClass
undefined method `installable_errata' for nil:NilClass
[ERROR 2016-06-29 01:43:18 Exception] 

RestClient::InternalServerError (500 Internal Server Error):
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:308:in `block in rest_client_call_block'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `process_result'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
    /opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:853:in `start'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:51:in `get'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:295:in `call_client'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:224:in `http_call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:174:in `call_action'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:169:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/resource.rb:14:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.10/lib/hammer_cli/apipie/command.rb:43:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.8/lib/hammer_cli_foreman/commands.rb:190:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.8/lib/hammer_cli_foreman/commands.rb:280:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.8/lib/hammer_cli_foreman/commands.rb:303:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.10/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.10/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.10/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.10/lib/hammer_cli/abstract.rb:22:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.10/bin/hammer:125:in `<top (required)>'
    /usr/bin/hammer:23:in `load'
    /usr/bin/hammer:23:in `<main>'

Comment 1 Oleksandr Shtaier 2017-01-26 09:22:25 UTC
Reproduced on 6.2.7

Comment 3 Satellite Program 2017-01-26 11:05:44 UTC
Upstream bug assigned to walden

Comment 4 Satellite Program 2017-01-26 11:05:49 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/15564 has been resolved.

Comment 5 Kedar Bidarkar 2017-09-10 20:29:42 UTC
[root@qe-sat6 ~]# hammer -u admin -p changeme host list
---|-----------------------------------------------------|------------------|-------------------------|------------|-------------------|--------------|----------------------
ID | NAME                                                | OPERATING SYSTEM | HOST GROUP              | IP         | MAC               | CONTENT VIEW | LIFECYCLE ENVIRONMENT
---|-----------------------------------------------------|------------------|-------------------------|------------|-------------------|--------------|----------------------
5  | faye-saeturn.domain.redhat.com          | RedHat 7.4       | RHEL 7 Server 64-bit HG | 10.x.x.7 | 00:1a:4a:3e:a6:2e | RHEL 7 CV    | DEV                  
1  | qe-sat6.domain.redhat.com | RedHat 7.4       |                         | 10.x.x.1 | 52:54:00:32:9e:c6 | RHEL 7 CV    | DEV                  
---|-----------------------------------------------------|------------------|-------------------------|------------|-------------------|--------------|----------------------

[root@qe-sat6 ~]# hammer -u admin -p changeme host errata list --host-id 1
---|------------|------|-------|------------
ID | ERRATUM ID | TYPE | TITLE | INSTALLABLE
---|------------|------|-------|------------


[root@qe-sat6 ~]# hammer -u admin -p changeme host info --id 1
Id:                       1
Name:                     qe-sat6.domain.redhat.com
Organization:             Default Organization
Location:                 Default Location
Environment:              production
Puppet CA Id:             1
Puppet Master Id:         1
Cert name:                qe-sat6.domain.redhat.com
Managed:                  no
Installed at:             
Last report:              2017/09/10 20:09:23
Network:                  
    IP:     10.x.x.1
    MAC:    52:54:00:32:9e:c6
    Domain: domain.redhat.com
Network interfaces:       
 1) Id:          1
    Identifier:  eth0
    Type:        interface (primary, provision)
    MAC address: 52:54:00:32:9e:c6
    IP address:  10.x.x.1
    FQDN:
Operating system:         
    Architecture:           x86_64
    Operating System:       RedHat 7.4
    Build:                  no
    Custom partition table:
Parameters:               

Additional info:          
    Owner Id:   1
    Owner Type: User
    Enabled:    yes
    Model:      Standard PC (i440FX + PIIX, 1996)
    Comment:
Content Information:      
    Content View:          RHEL 7 CV
    Lifecycle Environment: DEV
    Applicable Packages:   0
    Upgradable Packages:   0
    Applicable Errata:     
        Enhancement: 
        Bug Fix:     
        Security:
Subscription Information: 
    UUID:                          0af4e40d-0f44-498a-bcda-d2cceff7396b
    Last Checkin:                  2017-09-10 20:19:22 UTC
    Service Level:                 
    Release Version:               
    Autoheal:                      true
    Registered At:                 2017-09-10 20:19:16 UTC
    Registered by Activation Keys: 
     1) ak-rhel-7
Host Collections:
-------------------------

No, error seen when running hammer errata list, for satellite host.


VERIFIED with Sat6.3.0-snap15.0

Comment 6 Satellite Program 2018-02-21 16:51:07 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, 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-2018:0336


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