Actions
Bug #8677
closedContent view create fails with Couldn't find Katello::Product with id=
Difficulty:
Triaged:
Yes
Description
Content view create fails with "Couldn't find Katello::Product with id= " even when no product name was specified on the command line.
[root@katello-centos6 ~]# hammer -u admin -p SrFdrEWNZXo5qNJQ --debug content-view create --organization="Default Organization" --name="Test CV" [ INFO 2014-12-11 14:27:40 Init] Initialization of Hammer CLI (0.1.4) has started... [DEBUG 2014-12-11 14:27:40 Init] Running at ruby 1.8.7-p374 [ INFO 2014-12-11 14:27:40 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded [ INFO 2014-12-11 14:27:40 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded [ INFO 2014-12-11 14:27:40 Init] Configuration from the file /etc/hammer/cli.modules.d/import.yml has been loaded [ INFO 2014-12-11 14:27:40 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:68: warning: already initialized constant DEFAULT_LABEL_INDENT [DEBUG 2014-12-11 14:27:40 Connection] Registered: foreman [DEBUG 2014-12-11 14:27:40 API] Global headers: { :content_type => "application/json", "Accept-Language" => "en", :accept => "application/json;version=2" } [ INFO 2014-12-11 14:27:40 Modules] Extension module hammer_cli_foreman (0.1.4) loaded [ INFO 2014-12-11 14:27:40 Modules] Extension module hammer_cli_import (0.10.4) loaded [ INFO 2014-12-11 14:27:40 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed. [ INFO 2014-12-11 14:27:40 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created. [ INFO 2014-12-11 14:27:40 Modules] Extension module hammer_cli_katello (0.0.6) loaded [DEBUG 2014-12-11 14:27:40 Init] Using locale 'en' [DEBUG 2014-12-11 14:27:40 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/locale' [DEBUG 2014-12-11 14:27:40 Init] 'mo' files for locale domain 'hammer-cli@system' loaded from '/usr/share/locale' [DEBUG 2014-12-11 14:27:40 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/locale' [DEBUG 2014-12-11 14:27:40 Init] 'mo' files for locale domain 'hammer-cli-foreman@system' loaded from '/usr/share/locale' [DEBUG 2014-12-11 14:27:40 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_katello-0.0.6/locale' [ INFO 2014-12-11 14:27:40 HammerCLI::MainCommand] Called with options: {"option_username"=>"admin", "option_password"=>"***", "option_debug"=>true} [ INFO 2014-12-11 14:27:41 HammerCLIKatello::ContentView] Called with options: {} [ INFO 2014-12-11 14:27:41 HammerCLIKatello::ContentView::CreateCommand] Called with options: {"option_name"=>"Test CV", "option_organization_name"=>"Default Organization"} [ INFO 2014-12-11 14:27:41 API] GET /katello/api/organizations [DEBUG 2014-12-11 14:27:41 API] Params: { :search => "name = \"Default Organization\"" } [DEBUG 2014-12-11 14:27:41 API] Headers: { :params => { :search => "name = \"Default Organization\"" } } [DEBUG 2014-12-11 14:27:41 API] Response: { "sort" => { "by" => nil, "order" => nil }, "results" => [ [0] { "title" => "Default Organization", "updated_at" => "2014-12-11T13:02:59Z", "label" => "Default_Organization", "id" => 1, "created_at" => "2014-12-11T13:02:54Z", "description" => nil, "name" => "Default Organization" } ], "per_page" => 20, "page" => 1, "subtotal" => 1, "search" => "name = \"Default Organization\"", "total" => 1 } [DEBUG 2014-12-11 14:27:41 API] Response headers: { :set_cookie => [ [0] "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWI4NjUwOTBjNGQ2MzdlOWM2MzY5YWVhYzkzNTA0MTJlBjsAVEkiC2xvY2FsZQY7AEYiB2Vu--0bebbc105c73599b270c86c6df927b1294b89232; path=/; HttpOnly" ], :x_request_id => "54aeee5877c1a0df3b7fce43e114bc6b", :status => "200 OK", :content_type => "application/json; charset=utf-8", :cache_control => "must-revalidate, private, max-age=0", :foreman_api_version => "2", :x_runtime => "0.035868", :connection => "close", :transfer_encoding => "chunked", :foreman_version => "1.8.0-develop", :date => "Thu, 11 Dec 2014 14:27:41 GMT", :x_rack_cache => "miss", :x_ua_compatible => "IE=Edge,chrome=1", :apipie_checksum => "29f8f0672def7a3044a9a8937714ec10", :server => "Apache/2.2.15 (CentOS)", :x_powered_by => "Phusion Passenger 4.0.18", :etag => "\"e280285c249b7d5b7ce8ae71cf991201\"" } [ INFO 2014-12-11 14:27:41 API] GET /katello/api/organizations [DEBUG 2014-12-11 14:27:41 API] Params: { :search => "name = \"Default Organization\"" } [DEBUG 2014-12-11 14:27:41 API] Headers: { :params => { :search => "name = \"Default Organization\"" } } [DEBUG 2014-12-11 14:27:41 API] Response: { "sort" => { "by" => nil, "order" => nil }, "results" => [ [0] { "title" => "Default Organization", "updated_at" => "2014-12-11T13:02:59Z", "label" => "Default_Organization", "id" => 1, "created_at" => "2014-12-11T13:02:54Z", "description" => nil, "name" => "Default Organization" } ], "per_page" => 20, "page" => 1, "subtotal" => 1, "search" => "name = \"Default Organization\"", "total" => 1 } [DEBUG 2014-12-11 14:27:41 API] Response headers: { :set_cookie => [ [0] "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWExMWE5MjI5ODdlYjY3MGIxYzNjMDE3YmNhZWE1YzQyBjsAVEkiC2xvY2FsZQY7AEYiB2Vu--414db37c99c1941711546174bf7ba561e79e1168; path=/; HttpOnly" ], :x_request_id => "f4e0fe8ab99f076de9dbec692fd607d1", :status => "200 OK", :content_type => "application/json; charset=utf-8", :cache_control => "must-revalidate, private, max-age=0", :foreman_api_version => "2", :x_runtime => "0.032942", :connection => "close", :transfer_encoding => "chunked", :foreman_version => "1.8.0-develop", :date => "Thu, 11 Dec 2014 14:27:41 GMT", :x_rack_cache => "miss", :x_ua_compatible => "IE=Edge,chrome=1", :apipie_checksum => "29f8f0672def7a3044a9a8937714ec10", :server => "Apache/2.2.15 (CentOS)", :x_powered_by => "Phusion Passenger 4.0.18", :etag => "\"e280285c249b7d5b7ce8ae71cf991201\"" } [ INFO 2014-12-11 14:27:41 API] GET /katello/api/repositories [DEBUG 2014-12-11 14:27:41 API] Params: { "product_id" => nil, "organization_id" => 1, "name" => nil } [DEBUG 2014-12-11 14:27:41 API] Headers: { :params => { "product_id" => nil, "organization_id" => 1, "name" => nil } } [DEBUG 2014-12-11 14:27:41 API] 404 Resource Not Found { "displayMessage" => "Couldn't find Katello::Product with id=", "errors" => [ [0] "Couldn't find Katello::Product with id=" ] } [ERROR 2014-12-11 14:27:41 Exception] Couldn't find Katello::Product with id= Could not create the content view: Couldn't find Katello::Product with id= [ERROR 2014-12-11 14:27:41 Exception] RestClient::ResourceNotFound (404 Resource Not Found): /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!' /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result' /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `transmit' /usr/lib/ruby/1.8/net/http.rb:543:in `start' /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit' /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute' /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute' /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/resource.rb:54:in `get' /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:279:in `send' /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:279:in `call_client' /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:210:in `http_call' /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:161:in `call' /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.11/lib/apipie_bindings/resource.rb:14:in `call' /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/lib/hammer_cli_foreman/id_resolver.rb:169:in `resolved_call' /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/lib/hammer_cli_foreman/id_resolver.rb:148:in `find_resources' /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/lib/hammer_cli_foreman/id_resolver.rb:143:in `get_ids' /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/lib/hammer_cli_foreman/id_resolver.rb:133:in `repository_ids' /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/lib/hammer_cli_foreman/commands.rb:158:in `send' /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/lib/hammer_cli_foreman/commands.rb:158:in `get_resource_ids' /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/lib/hammer_cli_foreman/commands.rb:217:in `customized_options' /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/lib/hammer_cli_foreman/commands.rb:214:in `each' /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/lib/hammer_cli_foreman/commands.rb:214:in `customized_options' /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/lib/hammer_cli_foreman/commands.rb:229:in `request_params' /usr/lib/ruby/gems/1.8/gems/hammer_cli_katello-0.0.6/lib/hammer_cli_katello/content_view.rb:99:in `request_params' /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/command.rb:43:in `send_request' /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/lib/hammer_cli_foreman/commands.rb:179:in `send_request' /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/command.rb:34:in `execute' /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:in `run' /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:23: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:68:in `run' /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:23: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:68:in `run' /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:23:in `run' /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:126:in `run' /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/bin/hammer:108 /usr/bin/hammer:19:in `load' /usr/bin/hammer:19
Actions