http error 409 instead of 503
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Expired
|
Undecided
|
Unassigned | ||
MAAS |
Invalid
|
Undecided
|
Unassigned |
Bug Description
On occasion when high enough concurrent allocate machine API calls (using github.
```
Error: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
<html xmlns="http://
<head>
<title>Error: Conflict Error</title>
</head>
<body>
<h2>
Conflict error. Try your request again, as it will most likely succeed.
</h2>
</body>
</html>
```
Simply re-running the batch of API calls resumes allocating the ones that didn't allocate previously.
If instead the controller would return an error of 503: Service Unavailable, the gomaasapi has built-in retry logic.
A 409 means that a conflict has occurred. MAAS internally retries 10 times to try and handle conflicts with IP allocation when allocating a machine with AUTO IP addresses. If you are getting failures in this case then the its now the clients turn to retry the action.
This is a bug in the gomaasapi for not retrying the action.