Story #12702

Migrate user accounts

Added by Peter Amstutz almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Start date:
01/05/2018
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
2.0

Description

New API end point to migrate user accounts, admin only, "old" UUID is existing user, "new" UUID is one that doesn't exist yet.

If the target exists, it is an error.

All records (links, collections, projects, jobs, pipelines, etc) owned by old user are reassigned to new user.

All head/tail_uuid of the old user are changed to the new user.

API tokens associated with old user are migrated.

SSH keys associated with the old user are migrated.

User keeps old username

Old user should be completely removed from system after migration.

The migration should be done in a transaction so that a server crash will not result in a half-migrated state.


Subtasks

Task #12775: Review 12702-migrate-userResolvedTom Clegg


Related issues

Related to Arvados - Feature #12626: [API] Merge user accounts (redirect=true case)Resolved05/03/2018

Related to Arvados - Story #12705: Documentation/helper scripts for migrating users to federated identityResolved01/11/2018

Associated revisions

Revision b5a8d705
Added by Tom Clegg almost 3 years ago

Merge branch '12702-migrate-user'

closes #12702

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <>

History

#1 Updated by Peter Amstutz almost 3 years ago

  • Description updated (diff)

#2 Updated by Peter Amstutz almost 3 years ago

  • Related to Feature #12626: [API] Merge user accounts (redirect=true case) added

#4 Updated by Peter Amstutz almost 3 years ago

  • Description updated (diff)

#5 Updated by Peter Amstutz almost 3 years ago

  • Description updated (diff)

#6 Updated by Peter Amstutz almost 3 years ago

  • Story points set to 2.0

#7 Updated by Tom Morris almost 3 years ago

  • Target version changed from To Be Groomed to 2017-12-20 Sprint

#8 Updated by Peter Amstutz almost 3 years ago

  • Assigned To set to Peter Amstutz

#9 Updated by Peter Amstutz almost 3 years ago

  • Target version changed from 2017-12-20 Sprint to 2018-01-17 Sprint

#10 Updated by Peter Amstutz almost 3 years ago

  • Assigned To deleted (Peter Amstutz)

#11 Updated by Tom Clegg almost 3 years ago

  • Assigned To set to Tom Clegg

#12 Updated by Tom Clegg almost 3 years ago

  • Related to Story #12705: Documentation/helper scripts for migrating users to federated identity added

#14 Updated by Tom Clegg almost 3 years ago

  • Category set to API
  • Status changed from New to In Progress

#16 Updated by Lucas Di Pentima almost 3 years ago

  • File services/api/test/functional/arvados/v1/users_controller_test.rb
    • Both tests seem to be almost identical, maybe it would be convenient to reduce them to a list iteration of [user, expected] values?
  • Is the system user being avoided on this operation? If not, should it be?
  • Would it be convenient to avoid migrating the current admin user that’s requesting the operation?
  • A couple tests failed on my local service/api run, they don’t seem to be related but just in case:
    • services/api/test/functional/arvados/v1/filters_test.rb:183

#17 Updated by Tom Clegg almost 3 years ago

Lucas Di Pentima wrote:

  • File services/api/test/functional/arvados/v1/users_controller_test.rb
    • Both tests seem to be almost identical, maybe it would be convenient to reduce them to a list iteration of [user, expected] values?

Indeed. Combined into one parameterized test.

  • Is the system user being avoided on this operation? If not, should it be?

Good idea. Added checks + tests for system_user and anonymous_user.

  • Would it be convenient to avoid migrating the current admin user that’s requesting the operation?

AFAICS updating the current user should work the same as any other. Added a test case.

  • A couple tests failed on my local service/api run, they don’t seem to be related but just in case:
    • services/api/test/functional/arvados/v1/filters_test.rb:183

.*Filter.* passing for me. We'll see how this goes: https://ci.curoverse.com/job/developer-run-tests/546/

12702-migrate-user @ 680ffd64dac92aec8ad94454334db9ae69b95b56

#18 Updated by Lucas Di Pentima almost 3 years ago

This LGTM. Test run failed due to a misconfigured Jenkins, as Fernando mentioned.

#19 Updated by Anonymous almost 3 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF