Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: unable to query groups: Too many requests #1844

Closed
shaderecker opened this issue Jul 28, 2022 · 8 comments · Fixed by #1880
Closed

Error: unable to query groups: Too many requests #1844

shaderecker opened this issue Jul 28, 2022 · 8 comments · Fixed by #1880
Assignees
Labels
otc-issue Blocked by OTC issues throttling
Projects
Milestone

Comments

@shaderecker
Copy link
Contributor

shaderecker commented Jul 28, 2022

Terraform provider version

Terraform v1.2.6
on linux_amd64

  • provider registry.terraform.io/opentelekomcloud/opentelekomcloud v1.30.2

Affected Resource(s)

opentelekomcloud_identity_group_membership_v3

Terraform Configuration Files

resource "opentelekomcloud_identity_user_v3" "user" {
  for_each = var.users

  name               = "ta_${each.key}"
  description        = "TA ${each.value["full_name"]}"
  email              = each.value["email"]
  send_welcome_email = true
}

resource "opentelekomcloud_identity_project_v3" "project" {
  for_each = var.users

  name        = "eu-nl_ta_${each.key}"
  description = "TA ${each.value["full_name"]}"
}

resource "opentelekomcloud_identity_group_v3" "group" {
  for_each = var.users

  name        = "ta_${each.key}"
  description = "TA ${each.value["full_name"]}"
}

resource "opentelekomcloud_identity_group_membership_v3" "membership" {
  for_each = var.users

  group = opentelekomcloud_identity_group_v3.group[each.key].id
  users = [opentelekomcloud_identity_user_v3.user[each.key].id]
}

resource "opentelekomcloud_identity_role_assignment_v3" "role_assignment" {
  for_each = var.users

  group_id   = opentelekomcloud_identity_group_v3.group[each.key].id
  project_id = opentelekomcloud_identity_project_v3.project[each.key].id
  role_id    = opentelekomcloud_identity_role_v3.role.id
}

Debug Output/Panic Output

 Error: unable to query groups: Too many requests have been sent in a given amount of time. Pause requests, wait up to one minute, and try again.
│
│   with opentelekomcloud_identity_group_membership_v3.membership["username"],
│   on main.tf line 24, in resource "opentelekomcloud_identity_group_membership_v3" "membership":
│   24: resource "opentelekomcloud_identity_group_membership_v3" "membership" {

Steps to Reproduce

  1. terraform plan
  2. Having more than 50 user groups, now I run into this issue

Expected Behavior

I get the Terraform plan

Actual Behavior

Getting rate limited

Important Factoids

References

https://github.com/opentelekomcloud/terraform-provider-opentelekomcloud/issues?q=is%3Aissue+%22Too+many+requests%22

@artem-lifshits
Copy link
Member

Hello @shaderecker fix will be available in new release this week.

@artem-lifshits artem-lifshits added this to To do in Upstream via automation Aug 15, 2022
@otc-zuul otc-zuul bot closed this as completed in #1880 Aug 15, 2022
otc-zuul bot pushed a commit that referenced this issue Aug 15, 2022
[IAM]: use client from ctx in ``resources/iam_v3``

Summary of the Pull Request
Use client from ctx in iam_group/iam_group_membership/iam_role_assignment
PR Checklist

 Closes: #1844
 Refers to: #1848
 Release notes added.

Acceptance Steps Performed
=== RUN   TestAccIdentityV3Group_basic
--- PASS: TestAccIdentityV3Group_basic (65.66s)
PASS

Process finished with the exit code 0

=== RUN   TestAccIdentityV3GroupMembership_basic
--- PASS: TestAccIdentityV3GroupMembership_basic (105.29s)
PASS

Process finished with the exit code 0


=== RUN   TestAccIdentityV3RoleAssignment_basic
--- PASS: TestAccIdentityV3RoleAssignment_basic (77.69s)
PASS

Process finished with the exit code 0

Reviewed-by: Aloento <None>
Reviewed-by: Anton Sidelnikov <None>
Reviewed-by: Artem Lifshits <None>
Upstream automation moved this from To do to Done Aug 15, 2022
@shaderecker
Copy link
Contributor Author

Hi @artem-lifshits,
I'm back from vacation and tested the new provider version 1.31.1.
However it seem that I still get rate limited. It is the same error message as before.

Upstream automation moved this from Done to In progress Aug 29, 2022
@artem-lifshits
Copy link
Member

Hello @shaderecker I've opened an internal ticket on requests limit increase for IAM components:
https://jira.tsi-dev.otc-service.com/browse/DM-4807

@artem-lifshits artem-lifshits added the otc-issue Blocked by OTC issues label Aug 29, 2022
@artem-lifshits artem-lifshits removed their assignment Sep 13, 2022
@artem-lifshits artem-lifshits moved this from In progress to To do in Upstream Sep 13, 2022
@eumel8
Copy link

eumel8 commented Sep 27, 2022

Hi @artem-lifshits,

you have an answer from the internal ticket? I have the same error message on creating an ELB with 3 pools and 2 servers and when I remember right you already optimized token handling in this area.

thx

@lego963
Copy link
Contributor

lego963 commented Oct 6, 2022

@eumel8 yes, you are right. We did improvements there. Can you paste here resources which you use?

@eumel8
Copy link

eumel8 commented Oct 7, 2022

@lego963 This problem is solved. I mixed up HTTP Listener with TCP Backend Server Group, which is not more tolerated on OTC site. I think terraform tried too often this API calls in a loop and I ended up with 409. Could be an option to compare this during the plan stage and raised this as error without and API calls.

@lego963
Copy link
Contributor

lego963 commented Oct 7, 2022

@eumel8 great, but if you face this issue again please add comment here with your tf config.
#1848

@anton-sidelnikov anton-sidelnikov self-assigned this Dec 19, 2022
@anton-sidelnikov
Copy link
Member

All Too many requests have been sent in a given amount of time. Pause requests, wait up to one minute, and try again. errors should be properly handled in 1.32.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
otc-issue Blocked by OTC issues throttling
Projects
Upstream
  
Done
Development

Successfully merging a pull request may close this issue.

7 participants