Bug 1016761

Summary: katello-configure w/ user name containing @ fails during creation of pulp user
Product: [Retired] Pulp Reporter: David Davis <daviddavis>
Component: API/integrationAssignee: pulp-bugs
Status: CLOSED NOTABUG QA Contact: pulp-qe-list
Severity: high Docs Contact:
Priority: unspecified    
Version: MasterCC: mmccune, omaciel, tomckay
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 956650 Environment:
Last Closed: 2013-10-08 16:22:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 956650    
Bug Blocks:    

Description David Davis 2013-10-08 16:03:28 UTC
+++ This bug was initially created as a clone of Bug #956650 +++

Running

   katello-configure --user-name=thomasmckay --user-pass=123 --user-email=thomasmckay --org-name=Katello --reset-data=YES

fails.

db_seed.log

/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
** Invoke seed_with_logging (first_time)
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:abort_if_pending_migrations
rake aborted!
500 Internal Server Error
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:48:in `return!'
/opt/rh/ruby193/root/usr/share/gems/gems/runcible-0.4.1/lib/runcible/base.rb:93:in `block in get_response'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/request.rb:218:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/request.rb:218:in `process_result'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/request.rb:169:in `block in transmit'
/opt/rh/ruby193/root/usr/share/ruby/net/http.rb:745:in `start'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/request.rb:166:in `transmit'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/request.rb:31:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/resource.rb:59:in `post'
/opt/rh/ruby193/root/usr/share/gems/gems/runcible-0.4.1/lib/runcible/base.rb:92:in `get_response'
/opt/rh/ruby193/root/usr/share/gems/gems/runcible-0.4.1/lib/runcible/base.rb:83:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/runcible-0.4.1/lib/runcible/resources/user.rb:52:in `create'
/usr/share/katello/app/models/glue/pulp/user.rb:43:in `set_pulp_user'
/usr/share/katello/app/models/glue.rb:174:in `execute'
/usr/share/katello/app/models/glue.rb:124:in `block in process'
/usr/share/katello/app/models/glue.rb:111:in `each'
/usr/share/katello/app/models/glue.rb:111:in `process'
/usr/share/katello/app/models/glue.rb:35:in `on_save'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_1505'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in `_run__2383710449456458001__save__1080593667653249338__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:264:in `create_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:104:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:56:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `block in save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `save!'
/usr/share/katello/app/lib/lazy_accessor.rb:108:in `save!'
/usr/share/katello/db/seeds.rb:40:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `block in load'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:520:in `load_seed'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:309:in `block (2 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:176:in `block in invoke_prerequisites'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:174:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:174:in `invoke_prerequisites'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:157:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
/opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
Tasks: TOP => seed_with_logging => db:seed

--- Additional comment from Mike McCune on 2013-06-18 22:41:16 EDT ---

this is definitely still present in 6.0.1 SNAP5.  would like to propose moving to MDP2

--- Additional comment from Og Maciel on 2013-06-18 23:09:47 EDT ---

ACK for 6.0.2

--- Additional comment from David Davis on 2013-10-08 11:58:45 EDT ---

Looks like an error in pulp:

2013-10-08 11:53:42,587 pulp.server.webservices.application:CRITICAL: *************************************************************
2013-10-08 11:53:42,588 pulp.server.webservices.application:ERROR: The Pulp server encountered an unexpected failure during initialization
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 177, in wsgi_application
    _initialize_pulp()
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 138, in _initialize_pulp
    user_manager.ensure_admin()
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/auth/user/cud.py", line 215, in ensure_admin
    admin = factory.user_manager().create_user(login=default_login, password=default_password)
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/auth/user/cud.py", line 76, in create_user
    raise InvalidValue(invalid_values)
InvalidValue: Invalid properties: ['login']
2013-10-08 11:53:42,589 pulp.server.webservices.application:CRITICAL: *************************************************************

Comment 1 David Davis 2013-10-08 16:16:41 UTC
Actually, I think this needs to be solved on the Katello side. We're populating the admin user we create during install into server.conf (as default_login). We'll need to escape or convert that.