Migrating domain S3 users to projects
If your cluster has existing domain S3 users created before project-level multitenancy was enabled, you can migrate them to projects.
Limitations
- After migration to projects, S3 users will not be able to access their S3 storage using the self-service panel.
To migrate all S3 users to a project
Use the following command:
vinfra service s3 project migration migrate-all --domain <domain> --project <project>
--project <project>- Project name or ID
--domain <domain>- Domain name or ID
For example, to migrate all existing domain users to the project myproject within the domain mydomain, run:
# vinfra service s3 project migration migrate-all --domain mydomain --project myproject +------------+--------------------------------------+ | Field | Value | +------------+--------------------------------------+ | domain_id | ab8be546a821475fb770df172e74ab85 | | project_id | 653c050730f24cf585cb175bc0557e86 | | status | started | | task_id | d635d50f-146c-4fc4-a7ba-2b860e0afa13 | +------------+--------------------------------------+
Using the task ID from the output, you can check the task status:
# vinfra service s3 project task show --domain mydomain d635d50f-146c-4fc4-a7ba-2b860e0afa13 +---------+--------------------------------------+ | Field | Value | +---------+--------------------------------------+ | state | success | | task_id | d635d50f-146c-4fc4-a7ba-2b860e0afa13 | +---------+--------------------------------------+
To migrate a single user to a project
Use the following command:
vinfra service s3 project migration migrate-user --domain <domain> --project <project> --user <user>
--project <project>- Project name or ID
--domain <domain>- Domain name or ID
--user <user>- Domain user name or ID
For example, to migrate the user domain-user to the project myproject within the domain mydomain, run:
# vinfra service s3 project migration migrate-user --domain mydomain --user domain-user --project myproject +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | domain_id | ab8be546a821475fb770df172e74ab85 | | domain_user_id | 6c6d298e41024997abd3e6f61827d0ea | | project_id | 653c050730f24cf585cb175bc0557e86 | | status | started | | task_id | 85ab58cf-09f9-4372-b378-fce406fece50 | +----------------+--------------------------------------+
To check the migration status for a domain
Use the following command:
vinfra service s3 project migration status --domain <domain>
--domain <domain>- Domain name or ID
For example, to check the migration status for the domain mydomain, run:
# vinfra service s3 project migration status --domain mydomain +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | domain_id | ab8be546a821475fb770df172e74ab85 | | migrated_to_project | 3 | | pending_migration | 1 | | total_domain_users | 4 | +---------------------+----------------------------------+
To list users pending migration
Use the following command:
vinfra service s3 project migration pending --domain <domain>
--domain <domain>- Domain name or ID
For example, to list all users pending migration in the domain mydomain, run:
# vinfra service s3 project migration pending --domain mydomain +----------------------------------+------------------+----------------------------------+-----------------+ | id | s3_user_id | domain_user_id | s3_user_enabled | +----------------------------------+------------------+----------------------------------+-----------------+ | 880fd5be30db4699820c1daee24b02dc | ea6e329eab030238 | 880fd5be30db4699820c1daee24b02dc | True | +----------------------------------+------------------+----------------------------------+-----------------+