Hi Community!
I was trying to migrate to artifact registry using the migration tool performing the command:
gcloud artifacts docker upgrade migrate --projects=$PROJECT_ID
docker images were copied successfuly but after that, we get the following message:
Skipping [PROJECT_ID] due to error setting policy: Quota exceeded for quota metric 'AnalyzeIamPolicy Requests' and limit 'AnalyzeIamPolicy Requests per day' of service 'cloudasset.googleapis.com' for consumer 'project_number:[number]'.
How can i solve this in order to complete the migration process?
thanks in advance
You're encountering a quota limit on AnalyzeIamPolicy Requests in Cloud Asset Inventory, which is likely due to IAM policy evaluations triggered during the migration process. This restriction impacts the ability to set policies on migrated artifacts.
Recommended Actions:
1. Verify Current Quota Usage
Check your quota utilization to confirm if you've exceeded the daily limit:
Google Cloud Console:
Navigate to IAM & Admin > Quotas
Search for AnalyzeIamPolicy Requests
Review the current usage and remaining limits.
2. Request a Quota Increase
If this quota is frequently exceeded, submit a request for an increase:
Go to GCP Console → IAM & Admin > Quotas
Locate AnalyzeIamPolicy Requests per day
Click Request Increase and follow the approval process.
3. Optimize Migration to Reduce API Calls
To minimize IAM policy evaluations, consider batching the migration in smaller sets:
gcloud artifacts docker upgrade migrate --projects=$PROJECT_ID --repository=my-repo ----max-threads=5
This approach reduces the number of policy checks performed per request.
4. Retry After Quota Reset
This quota resets daily, so if an increase is not immediately possible, you may need to wait before retrying.
By implementing these best practices, you can mitigate quota-related interruptions and ensure a smoother migration process. Let me know if further guidance is needed!
Thanks
Vinoth_GCP
I am on Google Cloud SDK 513.0.0, yet I get:
❯❯ gcloud artifacts docker upgrade migrate --project=PROJECT_ID --batch-size=5
ERROR: (gcloud.artifacts.docker.upgrade.migrate) unrecognized arguments: --batch-size=5
Apologies my mistake. The --batch-size not a recognized command in gcloud artifacts command. Please the --max-threads argument.