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

rds wait db-cluster-available #137

Closed
tomfotherby opened this issue Mar 6, 2018 · 38 comments
Closed

rds wait db-cluster-available #137

tomfotherby opened this issue Mar 6, 2018 · 38 comments
Assignees
Labels
feature-request New feature or request rds service-api This issue pertains to the AWS API waiter

Comments

@tomfotherby
Copy link

AWS allows to create a copy-on-write clone of an existing Aurora cluster (docs). When this is done it takes a few minutes before the cluster is available. It would be great if there was a extra rds wait command added to the current list that works for "clusters" . Example usage:

rds wait db-cluster-available --db-cluster-identifier <cluster-id>

This would make scripting things easier. Currently I have a poor workaround:

status=unknown
while [[ "$status" != "available" ]]; do
  sleep 10
  status=$(aws rds describe-db-clusters --db-cluster-identifier $CLUSTERNAME --query 'DBClusters[0].Status' --output text)
done
@dstufft
Copy link

dstufft commented Mar 7, 2018

Marking this as an enhancement request, thanks!

@nhmaha
Copy link

nhmaha commented Jul 12, 2018

+1

5 similar comments
@jrichard0725
Copy link

+1

@TBragg
Copy link

TBragg commented Aug 9, 2018

+1

@derdeka
Copy link

derdeka commented Oct 4, 2018

+1

@tbastos
Copy link

tbastos commented Jan 4, 2019

+1

@rfreuler
Copy link

rfreuler commented Jan 7, 2019

+1

@stashev
Copy link

stashev commented Jan 21, 2019

It would be nice to have all wait command applied to rds Aurora clusters as well, including snapshots

@josephcarmello
Copy link

+1

2 similar comments
@peterborghard
Copy link

+1

@IllyaYalovyy
Copy link

+1

@sebuala
Copy link

sebuala commented Jun 14, 2019

More than 1 year since the request and the AWS team couldn't make the enhancement.

@chandravadans
Copy link

+1

@shaileshubhe77
Copy link

Correct command is :

status=unknown
while [ "$status" != "available" ]; do
sleep 10
status=$(aws rds describe-db-clusters --db-cluster-identifier $CLUSTERNAME | jq -r '.DBClusters[0].Status' output text)
done

@bpatton00
Copy link

+1

@jimbocoder
Copy link

+infinity

@robbhudl
Copy link

+1

2 similar comments
@muriloxk
Copy link

+1

@reizist
Copy link

reizist commented Jun 16, 2020

+1

@bbuchalter
Copy link

Screen Shot 2020-06-16 at 11 21 45 AM

@carojasq
Copy link

+1

@KapitalEarth
Copy link

KapitalEarth commented Aug 17, 2020 via email

@farman022
Copy link

+1

1 similar comment
@iobites
Copy link

iobites commented Oct 1, 2020

+1

@paul-m
Copy link

paul-m commented Dec 21, 2020

Very Plus One. +1

@rubengomex
Copy link

+1

@anthonyruok
Copy link

+1 p-p-p-p-please

@nchillal
Copy link

+1

@nic-hima
Copy link

This would be a huge enhancement!

@tim-finnigan
Copy link

Hi everyone, thanks for your patience regarding this feature request. There is clearly a lot of demand to add this. I raised this internally with the RDS team and currently waiting on a response. In the meantime, I’ll go ahead and transfer this to our shared SDK repository as it is a cross-SDK request.

@tim-finnigan tim-finnigan transferred this issue from aws/aws-cli Oct 20, 2021
@tim-finnigan tim-finnigan added feature-request New feature or request rds waiter labels Oct 20, 2021
@tim-finnigan tim-finnigan self-assigned this Oct 20, 2021
@tim-finnigan
Copy link

P54131834

@tim-finnigan
Copy link

I received an update from the RDS team that they have added this feature request to their backlog. We can’t provide a specific timeline for when this would be implemented but it is something they will try to prioritize.

@TomGudman
Copy link

Bash code, as an interim solution

CLUSTER_NAME="XXX"
while true
do
  sleep 5
  STATUS=$(aws rds describe-db-clusters --db-cluster-identifier $CLUSTER_NAME --query 'DBClusters[0].Status' --output text)
  if [[ $STATUS == 'available' ]]; then
    break
  fi                                                                                                                                                                                                                                           
done
echo 'Ready!'

One-liner for convenience

CLUSTER_NAME="XXX"; while true; do sleep 5 ; STATUS=$(aws rds describe-db-clusters --db-cluster-identifier $CLUSTER_NAME --query 'DBClusters[0].Status' --output text);  if [[ $STATUS == 'available' ]]; then break; fi ; done; echo 'Ready!'

@sr-apotapov
Copy link

Still no solution?
4 years to implement a simplest request.

@daniefdz
Copy link

daniefdz commented May 9, 2022

You can implement your own custom waiter to support db-cluster operations

    model = botocore.waiter.WaiterModel({
        "version": 2,
        "waiters": {
            "db_cluster_available": {
                "operation": "DescribeDBClusters",
                "delay": 10,
                "maxAttempts": 30,
                "acceptors": [
                    {
                    "matcher": "pathAll",
                    "expected": "available",
                    "state": "success",
                    "argument": "DBClusters[].Status"
                    }
                ]
            }
        }
    })

    waiter = botocore.waiter.create_waiter_with_client("db_cluster_available", model, client)

https://docs.aws.amazon.com/code-samples/latest/catalog/python-demo_tools-custom_waiter.py.html
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/rds.html#RDS.Client.describe_db_clusters

@tim-finnigan tim-finnigan added the service-api This issue pertains to the AWS API label May 23, 2022
@tim-finnigan
Copy link

Hi all thanks again for your patience. A new waiter model had been added for DBClusterAvailable:

The new waiter is available starting in these versions:

  • AWS CLI v2.7.13
  • AWS CLI v1.25.23
  • boto3 v1.24.23

Please update your version of the CLI/SDK and let us know if you run into any issues using this.

@github-actions
Copy link

This issue is now closed.

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@paul-m
Copy link

paul-m commented Jul 12, 2022

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request rds service-api This issue pertains to the AWS API waiter
Projects
None yet
Development

No branches or pull requests