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

[BUG] create-region still throws error even though it's possible to add the region via Astra UI #215

Open
eric-schneider opened this issue Jan 22, 2025 · 0 comments

Comments

@eric-schneider
Copy link

Describe the bug

It appears that the issue from #197 still persists.

To Reproduce

Steps to reproduce the behavior:

Create DB:

astra db create my_serverless_db -c aws -r us-east-1 --async

Try to add region to DB:

astra db create-region my_serverless_db -r us-east-2

[ERROR] Error when creating a region : Error Code=422(422) Invalid information provided to create DB: {"errors":[{"ID":2000011,"message":"unsupported database tier"},{"ID":2000012,"message":"unsupported cloud provider"},{"ID":2000013,"message":"unsupported region"},{"ID":2000106,"message":"provider \"\" not supported to add datacenters"}]}
com.dtsx.astra.cli.db.exception.CannotCreateRegionException: Region 'us-east-2' cannot be created for database  'my_serverless_db'
	at com.dtsx.astra.cli.db.region.ServiceRegion.addRegion(ServiceRegion.java:174)
	at com.dtsx.astra.cli.db.region.DbCreateRegionCmd.execute(DbCreateRegionCmd.java:88)
	at com.dtsx.astra.cli.core.AbstractConnectedCmd.run(AbstractConnectedCmd.java:62)
	at com.dtsx.astra.cli.AstraCli.run(AstraCli.java:295)
	at com.dtsx.astra.cli.AstraCli.main(AstraCli.java:270)
	at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.lang.IllegalArgumentException: Error Code=422(422) Invalid information provided to create DB: {"errors":[{"ID":2000011,"message":"unsupported database tier"},{"ID":2000012,"message":"unsupported cloud provider"},{"ID":2000013,"message":"unsupported region"},{"ID":2000106,"message":"provider \"\" not supported to add datacenters"}]}
	at com.dtsx.astra.sdk.utils.HttpClientWrapper.processErrors(HttpClientWrapper.java:492)
	at com.dtsx.astra.sdk.utils.HttpClientWrapper.executeHttp(HttpClientWrapper.java:404)
	at com.dtsx.astra.sdk.utils.HttpClientWrapper.executeHttp(HttpClientWrapper.java:354)
	at com.dtsx.astra.sdk.utils.HttpClientWrapper.POST(HttpClientWrapper.java:292)
	at com.dtsx.astra.sdk.AbstractApiClient.POST(AbstractApiClient.java:154)
	at com.dtsx.astra.sdk.db.DbDatacentersClient.create(DbDatacentersClient.java:133)
	at com.dtsx.astra.cli.db.region.ServiceRegion.addRegion(ServiceRegion.java:170)
	... 5 more
[ERROR] INTERNAL_ERROR: Region 'us-east-2' cannot be created for database  'my_serverless_db'

Using database ID produces same error:

astra db create-region 26054aa9-eb37-4d88-b343-7c934cd1d7bc -r us-east-2

[ERROR] Error when creating a region : Error Code=422(422) Invalid information provided to create DB: {"errors":[{"ID":2000011,"message":"unsupported database tier"},{"ID":2000012,"message":"unsupported cloud provider"},{"ID":2000013,"message":"unsupported region"},{"ID":2000106,"message":"provider \"\" not supported to add datacenters"}]}
com.dtsx.astra.cli.db.exception.CannotCreateRegionException: Region 'us-east-2' cannot be created for database  '26054aa9-eb37-4d88-b343-7c934cd1d7bc'
	at com.dtsx.astra.cli.db.region.ServiceRegion.addRegion(ServiceRegion.java:174)
	at com.dtsx.astra.cli.db.region.DbCreateRegionCmd.execute(DbCreateRegionCmd.java:88)
	at com.dtsx.astra.cli.core.AbstractConnectedCmd.run(AbstractConnectedCmd.java:62)
	at com.dtsx.astra.cli.AstraCli.run(AstraCli.java:295)
	at com.dtsx.astra.cli.AstraCli.main(AstraCli.java:270)
	at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.lang.IllegalArgumentException: Error Code=422(422) Invalid information provided to create DB: {"errors":[{"ID":2000011,"message":"unsupported database tier"},{"ID":2000012,"message":"unsupported cloud provider"},{"ID":2000013,"message":"unsupported region"},{"ID":2000106,"message":"provider \"\" not supported to add datacenters"}]}
	at com.dtsx.astra.sdk.utils.HttpClientWrapper.processErrors(HttpClientWrapper.java:492)
	at com.dtsx.astra.sdk.utils.HttpClientWrapper.executeHttp(HttpClientWrapper.java:404)
	at com.dtsx.astra.sdk.utils.HttpClientWrapper.executeHttp(HttpClientWrapper.java:354)
	at com.dtsx.astra.sdk.utils.HttpClientWrapper.POST(HttpClientWrapper.java:292)
	at com.dtsx.astra.sdk.AbstractApiClient.POST(AbstractApiClient.java:154)
	at com.dtsx.astra.sdk.db.DbDatacentersClient.create(DbDatacentersClient.java:133)
	at com.dtsx.astra.cli.db.region.ServiceRegion.addRegion(ServiceRegion.java:170)
	... 5 more
[ERROR] INTERNAL_ERROR: Region 'us-east-2' cannot be created for database  '26054aa9-eb37-4d88-b343-7c934cd1d7bc'

Expected behavior

2nd region added.

Desktop (please complete the following information):

  • OS: macOS 15.1.1
  • Astra CLI: 0.6
  • Java:
    • openjdk version "20.0.1" 2023-04-18
    • OpenJDK Runtime Environment Temurin-20.0.1+9 (build 20.0.1+9)
    • OpenJDK 64-Bit Server VM Temurin-20.0.1+9 (build 20.0.1+9, mixed mode
  • Python: 3.11.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant