Actions
Bug #10696
closedhammer import organization of an existing name fails to use any recover strategy
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1223345
Description of problem:
hammer import organization of an existing name fails to use any recover strategy
Version-Release number of selected component (if applicable):
Satellite-6.1.0-RHEL-6-20150513.0
rubygem-hammer_cli_import-0.10.6.5-1.el6_6sat.noarch
How reproducible:
100%
1. Sat6 has an organization already created manually (for reproducer we can use a CLI)
- hammer import organization --verbose --csv-file users.csv
Importing from users.csv
Creating new organization: ORGANIZATION
Summary
Created 1 organization.
- rm -rf ~/.transition_data/
- hammer import organization --verbose --csv-file users.csv
Importing from users.csv
Creating new organization: ORGANIZATION
Caught RestClient::InternalServerError:500 Internal Server Error while processing CSV line: {"organization_id"=>"1", "organization"=>"ORGANIZATION"}
/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:71:in `post'
/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_import-0.10.6.5/lib/hammer_cli_import/base.rb:128:in `api_call'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/base.rb:138:in `api_call'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/base.rb:143:in `mapped_api_call'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/base.rb:416:in `_create_entity'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/base.rb:370:in `create_entity'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/organization.rb:84:in `import_single_row'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/base.rb:511:in `call'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/base.rb:511:in `cvs_iterate'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/importtools.rb:303:in `call'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/importtools.rb:303:in `handle_missing_and_supress'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/base.rb:510:in `cvs_iterate'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/csvhelper.rb:52:in `csv_each'
/usr/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:1545:in `each'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/csvhelper.rb:43:in `csv_each'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/base.rb:509:in `cvs_iterate'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/base.rb:517:in `import'
/usr/lib/ruby/gems/1.8/gems/hammer_cli_import-0.10.6.5/lib/hammer_cli_import/base.rb:553: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.4.10/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:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4.10/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:67:in `run'
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4.10/lib/hammer_cli/./apipie/../abstract.rb:23: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.4.10/bin/hammer:108
/usr/bin/hammer:19:in `load'
/usr/bin/hammer:19
Summary
No action taken.
Actual results:
ISE, organization not created
Expected results:
avoid ISE and create organization with differrent name or reuse existing one, depends on chosen recover strategy
Actions