Project

General

Profile

Actions

Bug #5613

closed

Cannot get information from system by its ID

Added by dustin tsang almost 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

https://bugzilla.redhat.com/show_bug.cgi?id=1084722

Description of problem:

Trying to fetch the information from an existing system using the CLI generates a stacktrace. Using the system's UUID however works

[root@qetello01 ~]# hammer -v --csv system create --name=foobar --organization-id='ACME_Corporation'
Message,Id,Name
System created,2,foobar

[root@qetello01 ~]# hammer -v --csv system list --organization-id='ACME_Corporation'
ID,Name
f69e0a84-5cb7-4b0a-ab7a-3da71f619ab2,foobar
33a362dd-a1be-467d-ab91-a85ba17dddd9,foo

[root@qetello01 ~]# hammer -v --csv system info --id=2
[ERROR 2014-04-05 19:31:02 Exception] Error: 400 Bad Request
Error: 400 Bad Request
[ERROR 2014-04-05 19:31:02 Exception]

RestClient::BadRequest (400 Bad Request):
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:48:in `return!'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:220:in `process_result'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:169:in `transmit'
/usr/lib/ruby/1.8/net/http.rb:543:in `start'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:166:in `transmit'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:31:in `execute'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/resource.rb:54:in `get'
/usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.6/lib/apipie_bindings/api.rb:196:in `send'
/usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.6/lib/apipie_bindings/api.rb:196:in `http_call'
/usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.6/lib/apipie_bindings/api.rb:155:in `call'
/usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.6/lib/apipie_bindings/resource.rb:14:in `call'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/read_command.rb:19:in `retrieve_data'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.0/lib/hammer_cli_foreman/commands.rb:165:in `retrieve_data'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/read_command.rb:8:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/bin/hammer:100
/usr/bin/hammer:19:in `load'
/usr/bin/hammer:19

[root@qetello01 ~]# hammer -v system info --id f69e0a84-5cb7-4b0a-ab7a-3da71f619ab2
Name: foobar
ID: 2
UUID: f69e0a84-5cb7-4b0a-ab7a-3da71f619ab2
Description: Initial Registration Params
Location: None
Lifecycle Environment: Library
Content View: Default Organization View
Entitlement Status: valid
Release Version:
Autoheal: true

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

  • apr-util-ldap-1.3.9-3.el6_0.1.x86_64
  • candlepin-0.8.33-1.el6.noarch
  • candlepin-selinux-0.8.33-1.el6.noarch
  • candlepin-tomcat6-0.8.33-1.el6.noarch
  • elasticsearch-0.90.10-4.el6.noarch
  • foreman-1.5.0-0.develop.201404041450git869bbff.el6.noarch
  • foreman-compute-1.5.0-0.develop.201404041450git869bbff.el6.noarch
  • foreman-libvirt-1.5.0-0.develop.201404041450git869bbff.el6.noarch
  • foreman-postgresql-1.5.0-0.develop.201404041450git869bbff.el6.noarch
  • foreman-proxy-1.5.0-0.develop.201404021018git3824d18.el6.noarch
  • foreman-release-1.5.0-0.develop.201404041450git869bbff.el6.noarch
  • foreman-selinux-1.5.0-0.develop.201402261344git2f43f94.el6.noarch
  • katello-1.5.0-14.201404041741git6e31336.el6.noarch
  • katello-apache-1.0-1.noarch
  • katello-ca-1.0-1.noarch
  • katello-certs-tools-1.5.2-1.git.1.edab2c4.el6.noarch
  • katello-installer-0.0.19-1.201404021805git6ac0e9a.el6.noarch
  • katello-repos-1.5.1-1.git.14.0868bd1.el6.noarch
  • openldap-2.4.23-31.el6.x86_64
  • pulp-katello-plugins-0.2-1.el6.noarch
  • pulp-nodes-common-2.3.1-1.el6.noarch
  • pulp-nodes-parent-2.3.1-1.el6.noarch
  • pulp-puppet-plugins-2.3.1-1.el6.noarch
  • pulp-rpm-plugins-2.3.1-1.el6.noarch
  • pulp-selinux-2.3.1-1.el6.noarch
  • pulp-server-2.3.1-1.el6.noarch
  • python-ldap-2.3.10-1.el6.x86_64
  • ruby193-rubygem-ldap_fluff-0.2.2-2.el6.noarch
  • ruby193-rubygem-net-ldap-0.3.1-1.el6.noarch
  • ruby193-rubygem-runcible-1.0.8-1.el6.noarch
  • rubygem-hammer_cli-0.1.0-1.201404021454git4336787.git.0.070e774.el6.noarch
  • rubygem-hammer_cli_foreman-0.1.0-1.201404011518git2abbfd3.git.0.37211af.el6.noarch
  • rubygem-hammer_cli_foreman_tasks-0.0.2-1.201403312028gitdf60592.git.0.b4ebd5a.el6.noarch
  • rubygem-hammer_cli_katello-0.0.3-1.201404041801gitd850831.git.0.cf29b20.el6.noarch

How reproducible:

Steps to Reproduce:
1. Create a new system using the hammer cli
2. Try to get the system information via hammer cli using the system's id
3.

Actual results:

Stacktrace

Expected results:

Additional info:

Also affects hammer system tasks

[root@qetello01 ~]# hammer -v system tasks --id 2
[ERROR 2014-04-05 19:47:06 Exception] Error: 400 Bad Request
Error: 400 Bad Request
[ERROR 2014-04-05 19:47:06 Exception]

RestClient::BadRequest (400 Bad Request):
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:48:in `return!'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:220:in `process_result'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:169:in `transmit'
/usr/lib/ruby/1.8/net/http.rb:543:in `start'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:166:in `transmit'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:31:in `execute'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/resource.rb:54:in `get'
/usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.6/lib/apipie_bindings/api.rb:196:in `send'
/usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.6/lib/apipie_bindings/api.rb:196:in `http_call'
/usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.6/lib/apipie_bindings/api.rb:155:in `call'
/usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.6/lib/apipie_bindings/resource.rb:14:in `call'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/read_command.rb:19:in `retrieve_data'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.0/lib/hammer_cli_foreman/commands.rb:95:in `retrieve_data'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.0/lib/hammer_cli_foreman/commands.rb:140:in `retrieve_and_print'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.0/lib/hammer_cli_foreman/commands.rb:115:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
/usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.0/bin/hammer:100
/usr/bin/hammer:19:in `load'
/usr/bin/hammer:19
[root@qetello01 ~]# hammer -v system tasks --id f69e0a84-5cb7-4b0a-ab7a-3da71f619ab2
No data.

Also affects hammer system update

[root@qetello01 ~]# hammer system update --id 2 --name baz
Could not update system:
Error: 400 Bad Request
[root@qetello01 ~]# hammer system update --id f69e0a84-5cb7-4b0a-ab7a-3da71f619ab2 --name baz
System updated

Delete also is affected

[root@qetello01 ~]# hammer system delete --id 2
Could not delete system:
Error: 400 Bad Request
[root@qetello01 ~]# hammer system delete --id f69e0a84-5cb7-4b0a-ab7a-3da71f619ab2
System deleted

Actions #2

Updated by dustin tsang almost 10 years ago

  • Status changed from New to Closed
Actions #4

Updated by Eric Helms almost 10 years ago

  • Target version set to 44
Actions #5

Updated by Eric Helms almost 10 years ago

  • Triaged changed from No to Yes
Actions #6

Updated by Eric Helms over 9 years ago

  • translation missing: en.field_release set to 13
Actions

Also available in: Atom PDF