sourcegraph / checkup

Distributed, lock-free, self-hosted health checks and status pages
https://sourcegraph.github.io/checkup
MIT License
3.41k stars 246 forks source link

Provision errors #2

Open beyang opened 8 years ago

beyang commented 8 years ago

I get the following error when going through the install instructions.

$ checkup provision
One sec...
2016/08/04 00:51:50 OperationAborted: A conflicting conditional operation is currently in progress against this resource. Please try again.
        status code: 409, request id: 6AD8BED083CC9A5A

I was trying to use an existing S3 bucket and initially got an error saying that the bucket already existed. I then deleted the bucket and the IAM user that checkup creates, and when I try to re-run provision, I get the above error. (Also, ideally checkup provision would proceed with subsequent steps in the provisioning if the user already exists.)

I can work around this by just manually provisioning the bucket and using the created user, so not super urgent.

mholt commented 8 years ago

Weird, I deleted the bucket and user multiple times in testing and never encountered that error. Did you wait 1-2 seconds before running it? Maybe their system was still in the process of deleting the bucket or user...

(Also, ideally checkup provision would proceed with subsequent steps in the provisioning if the user already exists.)

Yeah, it probably would be better this way.

iJebus commented 8 years ago

@beyang I suspect this is just AWS taking time to delete the S3 bucket (as @mholt suggested) and that you tried to recreate the bucket too quickly after deleting it. You can see other people having the issue here. See especially the comments about it taking up to 1 - 1.5 hours before they could recreate the bucket.

mholt commented 8 years ago

I'm also not sure how to assert that the error is one of "user already exists" as opposed to something else -- at least not without a separate API request.

iJebus commented 8 years ago

@mholt I think the http error response might work? They have a few different error responses anyway. Below taken from the AWS IAM docs.

EntityAlreadyExists The request was rejected because it attempted to create a resource that already exists. HTTP Status Code: 409