Make exec start return proper error codes

Exec start was sending HTTP 500 for every error.

Fixed an error where pausing a container and then calling exec start
caused the daemon to freeze.

Updated API docs which incorrectly showed that a successful exec start
was an HTTP 201, in reality it is HTTP 200.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff
2015-10-02 14:40:22 -04:00
parent 698e14902a
commit 2d43d93410
12 changed files with 102 additions and 43 deletions
+1
View File
@@ -90,6 +90,7 @@ list of DNS options to be used in the container.
* `GET /events` now includes a `timenano` field, in addition to the existing `time` field.
* `GET /info` now lists engine version information.
* `GET /containers/json` will return `ImageID` of the image used by container.
* `POST /exec/(name)/start` will now return an HTTP 409 when the container is either stopped or paused.
### v1.20 API changes
@@ -1677,7 +1677,7 @@ Json Parameters:
Status Codes:
- **201** no error
- **200** no error
- **404** no such exec instance
**Stream details**:
@@ -1638,7 +1638,7 @@ Json Parameters:
Status Codes:
- **201** no error
- **200** no error
- **404** no such exec instance
**Stream details**:
@@ -1801,7 +1801,7 @@ Json Parameters:
Status Codes:
- **201** no error
- **200** no error
- **404** no such exec instance
**Stream details**:
@@ -1922,7 +1922,7 @@ Json Parameters:
Status Codes:
- **201** no error
- **200** no error
- **404** no such exec instance
**Stream details**:
@@ -1984,7 +1984,7 @@ Json Parameters:
Status Codes:
- **201** no error
- **200** no error
- **404** no such exec instance
**Stream details**:
@@ -2126,7 +2126,7 @@ Json Parameters:
Status Codes:
- **201** no error
- **200** no error
- **404** no such exec instance
**Stream details**:
@@ -2226,8 +2226,9 @@ Json Parameters:
Status Codes:
- **201** no error
- **200** no error
- **404** no such exec instance
- **409** - container is stopped or paused
**Stream details**:
Similar to the stream behavior of `POST /container/(id)/attach` API