pcorliss / ruby_route_53

Ruby gem and command line tool for Amazon's Route 53 service.
blog.50projects.com
GNU General Public License v3.0
172 stars 32 forks source link

Doesn't handle PriorRequestNotComplete response #34

Open phemmer opened 10 years ago

phemmer commented 10 years ago

When multiple records are updated by different processes at almost the same time, AWS can respond with a PriorRequestNotComplete error message. This condition doesn't appear to be handled and instead dumps out a nice error

ERROR: Amazon returned an error for the request.
ERROR: RAW_XML: <?xml version="1.0"?>
<ErrorResponse xmlns="https://route53.amazonaws.com/doc/2011-05-05/"><Error><Type>Sender</Type><Code>PriorRequestNotComplete</Code><Message>The request was rejected because Route 53 was still processing a prior request.</Message></Error><RequestId>26cce805-5e34-11e3-8f30-116c04f74132</RequestId></ErrorResponse>
ERROR: PriorRequestNotComplete: The request was rejected because Route 53 was still processing a prior request.

What now? It looks like you've run into an unhandled error. Please send a detailed bug report with the entire input and output from the program to support@50projects.com or to https://github.com/pcorliss/ruby_route_53/issues and we'll do out best to help you.

The documentation says you should do an incremental backoff in this scenario. While I'm not certain that handling this backoff should be up to the library, when running it as the route53 command line utility, the utility exits with status 0 instead of non-zero to indicate error.


To duplicate this, I just run 2 route53 commands at the same time:

route53 --zone foo --change --name pop ... & route53 --zone foo --change --name tart ...

(it doesn't happen every time, sometimes you have to do it a few times to get it to happen, but it is frequent)