Bug 1657197 - [Hammer] - package list --host fails with an error
Summary: [Hammer] - package list --host fails with an error
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer - Content
Version: 6.5.0
Hardware: All
OS: All
unspecified
low vote
Target Milestone: Released
Assignee: Samir Jha
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-07 12:31 UTC by Omkar Khatavkar
Modified: 2019-10-07 17:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-29 12:16:32 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Omkar Khatavkar 2018-12-07 12:31:15 UTC
Description of problem:
package list --host fails with an error 

Version-Release number of selected component (if applicable):
6.5 Snap 6

exist in 6.4 as well 

How reproducible:
always 

Steps to Reproduce:
root@sgi-uv20-01 ~]# hammer -d package list --host-id 5
[ INFO 2018-12-07T07:28:24 Init] Initialization of Hammer CLI (0.15.1) has started...
[DEBUG 2018-12-07T07:28:24 Init] Running at ruby 2.5.3-p105
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/csv.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_admin.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_admin_logging_core.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_admin_logging_katello.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_ansible.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_bootdisk.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_discovery.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_docker.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_openscap.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_remote_execution.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_tasks.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_templates.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_virt_who_configure.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /root/.hammer/defaults.yml has been loaded
[ INFO 2018-12-07T07:28:24 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded
[DEBUG 2018-12-07T07:28:25 SSLoptions] SSL options: {
    :ssl_ca_file => "/etc/pki/katello/certs/katello-server-ca.crt",
     :verify_ssl => true
}
[DEBUG 2018-12-07T07:28:25 API] Global headers: {
        :content_type => "application/json",
              :accept => "application/json;version=2",
    "Accept-Language" => "en"
}
[DEBUG 2018-12-07T07:28:25 API] Follow redirects: never
[DEBUG 2018-12-07T07:28:25 Connection] Registered: foreman
[ INFO 2018-12-07T07:28:25 Modules] Extension module hammer_cli_foreman (0.15.1) loaded.
[ INFO 2018-12-07T07:28:25 Modules] Extension module hammer_cli_foreman_admin (0.0.8) loaded.
[ INFO 2018-12-07T07:28:25 Modules] Extension module hammer_cli_foreman_bootdisk (0.1.3.3) loaded.
[ INFO 2018-12-07T07:28:25 Modules] Extension module hammer_cli_foreman_discovery (1.0.0) loaded.
[ INFO 2018-12-07T07:28:25 Modules] Extension module hammer_cli_foreman_openscap (0.1.6) loaded.
[ INFO 2018-12-07T07:28:25 Modules] Extension module hammer_cli_foreman_templates (0.1.2) loaded.
[ INFO 2018-12-07T07:28:25 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2018-12-07T07:28:25 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2018-12-07T07:28:26 Modules] Extension module hammer_cli_katello (0.15.0) loaded.
[DEBUG 2018-12-07T07:28:26 Init] Using locale 'en'
[DEBUG 2018-12-07T07:28:26 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1/locale'
[DEBUG 2018-12-07T07:28:26 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.15.1/locale'
[DEBUG 2018-12-07T07:28:26 Init] 'mo' files for locale domain 'hammer-cli-csv' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_csv-2.3.1/locale'
[DEBUG 2018-12-07T07:28:26 Init] 'mo' files for locale domain 'hammer_cli_foreman_docker' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman_docker-0.0.6/locale'
[DEBUG 2018-12-07T07:28:26 Init] 'mo' files for locale domain 'hammer-cli-foreman-virt-who-configure' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman_virt_who_configure-0.0.3/locale'
[DEBUG 2018-12-07T07:28:26 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.15.0/locale'
[ INFO 2018-12-07T07:28:26 HammerCLI::MainCommand] Called with options: {"option_debug"=>true}
[ INFO 2018-12-07T07:28:26 HammerCLIKatello::PackageCommand] Called with options: {}
[ INFO 2018-12-07T07:28:26 HammerCLIKatello::PackageCommand::ListCommand] Custom default value 24 was used for attribute --organization-id
[ INFO 2018-12-07T07:28:26 HammerCLIKatello::PackageCommand::ListCommand] Called with options: {"option_organization_id"=>"24", "option_host_id"=>5}
[ INFO 2018-12-07T07:28:26 API] Server: https://sgi-uv20-01.rhts.eng.bos.redhat.com
[ INFO 2018-12-07T07:28:26 API] GET /katello/api/packages
[DEBUG 2018-12-07T07:28:26 API] Params: {
    "organization_id" => "24",
            "host_id" => 5,
               "page" => 1,
           "per_page" => 1000
}
[DEBUG 2018-12-07T07:28:26 API] Headers: {
    :params => {
        "organization_id" => "24",
                "host_id" => 5,
                   "page" => 1,
               "per_page" => 1000
    }
}
[DEBUG 2018-12-07T07:28:26 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[ERROR 2018-12-07T07:28:26 API] 500 Internal Server Error
[DEBUG 2018-12-07T07:28:26 API] {
    "displayMessage" => "undefined method `where' for #<Array:0x00007f1dbcd10818>",
            "errors" => [
        [0] "undefined method `where' for #<Array:0x00007f1dbcd10818>"
    ]
}
[DEBUG 2018-12-07T07:28:26 Exception] Using exception handler HammerCLIKatello::ExceptionHandler#handle_internal_error
[ERROR 2018-12-07T07:28:26 Exception] undefined method `where' for #<Array:0x00007f1dbcd10818>
undefined method `where' for #<Array:0x00007f1dbcd10818>
[ERROR 2018-12-07T07:28:26 Exception] 

RestClient::InternalServerError (500 Internal Server Error):
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/abstract_response.rb:223:in `exception_with_response'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/abstract_response.rb:103:in `return!'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.2/lib/apipie_bindings/api.rb:353:in `block in rest_client_call_block'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:807:in `process_result'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:725:in `block in transmit'
    /opt/rh/rh-ruby25/root/usr/share/ruby/net/http.rb:910:in `start'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:715:in `transmit'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:145:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/request.rb:52:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.1/lib/restclient/resource.rb:51:in `get'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.2/lib/apipie_bindings/api.rb:327:in `call_client'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.2/lib/apipie_bindings/api.rb:240:in `http_call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.2/lib/apipie_bindings/api.rb:190:in `call_action'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.2/lib/apipie_bindings/api.rb:185:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.2/lib/apipie_bindings/resource.rb:21:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1/lib/hammer_cli/apipie/command.rb:51:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.15.1/lib/hammer_cli_foreman/commands.rb:168:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.15.1/lib/hammer_cli_foreman/commands.rb:224:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.15.1/lib/hammer_cli_foreman/commands.rb:259:in `retrieve_all'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.15.1/lib/hammer_cli_foreman/commands.rb:243:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.15.1/bin/hammer:147:in `<top (required)>'
    /usr/bin/hammer:23:in `load'
    /usr/bin/hammer:23:in `<main>'

Actual results:
package list --host fails with an error 

Expected results:
package list --host should not fail 

Additional info:

Comment 6 Brad Buckingham 2019-01-29 12:16:32 UTC
Closing since this no longer appears to be reproducible.  If this is incorrect, please re-open and provide the appropriate details.


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