Error 500 when changing users username as an admin
Summary
500 error changing username
Steps to reproduce
Don't know, it only occurs with one of our users.
What is the current bug behavior?
In the user admin section, user with id/username u001234
get's edited by an admin, changing the users username from u001234
to John.Doe
, after hitting the Save button a 500 error is thrown.
What is the expected correct behavior?
The new username is saved (workd for a dozen other users that where renamed before and after this user).
Relevant logs and/or screenshots
Logentry for this bug:
Started PATCH "/admin/users/u001234" for 10.xx.xx.xx at 2017-09-07 16:19:28 +0200
Processing by Admin::UsersController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"/xxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx", "user"=>{"name"=>"John Doe", "username"=>"John.Doe", "email"=>"j.doe@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "projects_limit"=>"10000", "can_create_group"=>"1", "external"=>"0", "skype"=>"", "linkedin"=>"", "twitter"=>"", "website_url"=>""}, "id"=>"u001234"}
Completed 500 Internal Server Error in 264ms (ActiveRecord: 21.4ms)
Errno::EINVAL (Invalid argument @ rb_file_s_rename - (/opt/gitlab/embedded/service/gitlab-rails/public/uploads/u001234, /opt/gitlab/embedded/service/gitlab-rails/public/uploads/u001234/u001234)):
lib/gitlab/project_transfer.rb:30:in `move'
lib/gitlab/project_transfer.rb:17:in `rename_namespace'
app/models/namespace.rb:140:in `move_dir'
app/models/user.rb:828:in `ensure_namespace_correct'
app/services/users/update_service.rb:13:in `execute'
app/controllers/admin/users_controller.rb:128:in `block in update'
app/controllers/admin/users_controller.rb:127:in `update'
lib/gitlab/i18n.rb:45:in `with_locale'
lib/gitlab/i18n.rb:51:in `with_user_locale'
app/controllers/application_controller.rb:294:in `set_locale'
lib/gitlab/performance_bar/peek_performance_bar_with_rack_body.rb:16:in `call'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:16:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'