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

resource "azurerm_cosmosdb_cassandra_table" fails at upgrading the throughput #12630

Closed
blame19 opened this issue Jul 16, 2021 · 6 comments
Closed

Comments

@blame19
Copy link
Contributor

blame19 commented Jul 16, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

  • Terraform 1.0.0
  • azurerm (multiple versions, from 2.46 to 2.65)

Affected Resource(s)

  • azurerm_cosmosdb_cassandra_table

Expected Behaviour

We were trying to resize the table autoscale_max_throughput from the minimum value of 4000 to anything else (5000, 8000).

Actual Behaviour

Terraform produced a "Not Found" error:

�[31m│�[0m �[0m�[1m�[31mError: �[0m�[0m�[1mwaiting for update of Cassandra Table: (Table Name "test_table" / Cassandra Keyspace Name "dlgaas" / Database Account Name "matteocosmostest" / Resource Group "testcosmosdbmatt"): Code="NotFound" Message="Message: {\"code\":\"NotFound\",\"message\":\"Message: {\\\"Errors\\\":[\\\"Resource Not Found. Learn more: https:\\\\/\\\\/aka.ms\\\\/cosmosdb-tsg-not-found\\\"]}\\r\\nActivityId: 7026bcb6-7762-49e2-a1f4-d0e99959a705, Request URI: /apps/a6f25760-7394-4bfb-bafc-7ea08f3f3f13/services/66c05867-dd82-4754-86b2-868405aeb89f/partitions/c78a92f6-066e-42b3-9712-0618819f3022/replicas/132707812543386523s, RequestStats: \\r\\nRequestStartTime: 2021-07-16T15:19:33.2356989Z, RequestEndTime: 2021-07-16T15:19:33.2457029Z,  Number of regions attempted:1\\r\\nResponseTime: 2021-07-16T15:19:33.2457029Z, StoreResult: StorePhysicalAddress: rntbd://10.0.0.24:11300/apps/a6f25760-7394-4bfb-bafc-7ea08f3f3f13/services/66c05867-dd82-4754-86b2-868405aeb89f/partitions/c78a92f6-066e-42b3-9712-0618819f3022/replicas/132707812543386523s, LSN: 22, GlobalCommittedLsn: 22, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#22, UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.243, ActivityId: 7026bcb6-7762-49e2-a1f4-d0e99959a705, ResourceType: Database, OperationType: Read\\r\\nResponseTime: 2021-07-16T15:19:33.2457029Z, StoreResult: StorePhysicalAddress: rntbd://10.0.0.20:11300/apps/a6f25760-7394-4bfb-bafc-7ea08f3f3f13/services/66c05867-dd82-4754-86b2-868405aeb89f/partitions/c78a92f6-066e-42b3-9712-0618819f3022/replicas/132707812543386522s, LSN: 22, GlobalCommittedLsn: 22, PartitionKeyRangeId: , IsValid: True, StatusCode: 404, SubStatusCode: 0, RequestCharge: 1, ItemLSN: -1, SessionToken: -1#22, UsingLocalLSN: False, TransportException: null, BELatencyMs: 0.215, ActivityId: 7026bcb6-7762-49e2-a1f4-d0e99959a705, ResourceType: Database, OperationType: Read\\r\\n, SDK: Microsoft.Azure.Documents.Common/2.14.0\"}, Request URI: /dbs/matteocosmostest/colls, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Documents.Common/2.14.0, Microsoft.Azure.Documents.Common/2.14.0"�[0m
...
Script execution finished with status: FAILURE

Steps to Reproduce

  1. Create a cassandra table with autoscale_settings.max_throughput = 4000
  2. Plan & Apply
  3. Edit the value to something greater
  4. Plan
  5. Try to apply

The operation succeeds when done via Azure Portal, so we can exclude that's an azure api issue.

@lorenzo-biava
Copy link

It kind of looks like the change is done, but TF fails when checking for the status update.

@manicminer can you take a quick look at this to help us understand if this issue can be caused by the Azure APIs more than by the provider itself?

INFO   2021-08-19 11:15:49    module.cdb.azurerm_cosmosdb_cassandra_table.example["test_sessions"]: Modifying... [id=/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-test-test-prod-cosmosdb/providers/Microsoft.DocumentDB/databaseAccounts/test-test-test-prod-cosmosdb/cassandraKeyspaces/test/tables/test_sessions]
INFO   2021-08-19 11:15:59    module.cdb.azurerm_cosmosdb_cassandra_table.example["test_sessions"]: Still modifying... [id=/subscriptions/d2e70fb0-f829-4d48-a9d9-...eyspaces/test/tables/test_sessions, 10s elapsed]
INFO   2021-08-19 11:16:09    module.cdb.azurerm_cosmosdb_cassandra_table.example["test_sessions"]: Still modifying... [id=/subscriptions/d2e70fb0-f829-4d48-a9d9-...eyspaces/test/tables/test_sessions, 20s elapsed]
INFO   2021-08-19 11:16:19    module.cdb.azurerm_cosmosdb_cassandra_table.example["test_sessions"]: Still modifying... [id=/subscriptions/d2e70fb0-f829-4d48-a9d9-...eyspaces/test/tables/test_sessions, 30s elapsed]
INFO   2021-08-19 11:16:22    
INFO   2021-08-19 11:16:22    Error: waiting for update of Cassandra Table: (Table Name "test_sessions" / Cassandra Keyspace Name "test" / Database Account Name "test-test-test-prod-cosmosdb" / Resource Group "test-test-test-prod-cosmosdb"): [...]

@lorenzo-biava
Copy link

lorenzo-biava commented Aug 23, 2021

Looks like the issue is with an argument being wrong here: https://github.com/hashicorp/terraform-provider-azurerm/blob/main/internal/services/cosmos/cosmosdb_cassandra_table_resource.go#L182
Should be id.CassandraKeyspaceName instead of id.DatabaseAccountName.

@katbyte katbyte added this to the v2.74.0 milestone Aug 23, 2021
katbyte pushed a commit that referenced this issue Aug 23, 2021
References the issue here:
#12630

The parameters in the CreateUpdateCassandraTable method should be id.CassandraKeyspaceName instead of id.DatabaseAccountName.
@katbyte katbyte modified the milestones: v2.74.0, v2.75.0, v2.76.0 Aug 27, 2021
@katbyte katbyte modified the milestones: v2.76.0, v2.77.0 Sep 10, 2021
@katbyte katbyte modified the milestones: v2.77.0, v2.78.0, v2.79.0 Sep 17, 2021
@katbyte katbyte modified the milestones: v2.79.0, v2.80.0 Oct 1, 2021
@katbyte katbyte modified the milestones: v2.80.0, v2.81.0, v2.82.0 Oct 8, 2021
@katbyte katbyte modified the milestones: v2.82.0, v2.83.0 Oct 21, 2021
@github-actions
Copy link

This functionality has been released in v2.83.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@katbyte katbyte modified the milestones: v2.83.0, v2.84.0 Oct 29, 2021
@katbyte katbyte modified the milestones: v2.84.0, v2.85.0 Nov 5, 2021
@katbyte katbyte modified the milestones: v2.85.0, v2.86.0 Nov 12, 2021
@katbyte katbyte modified the milestones: v2.86.0, v2.87.0 Nov 19, 2021
@jackofallops jackofallops modified the milestones: v2.87.0, v2.88.0 Nov 26, 2021
@tombuildsstuff
Copy link
Contributor

fixed via #13102

@github-actions
Copy link

github-actions bot commented Dec 2, 2021

This functionality has been released in v2.88.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jan 2, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants