Actions
Bug #9752
closedWhen creating a container, errors from docker are not properly reported to the user
Difficulty:
Triaged:
Bugzilla link:
Description
When I create a container with a dupe name, Docker properly responds with a 409 to let me know that it conflicts with another container. However, we're only showing "500 server error".
❯ hammer -u admin -p changeme docker container create --name crafty_turing \ --repository-name centos --tag latest --compute-resource DockerCP --command bash Docker container created ❯ hammer -u admin -p changeme docker container create --name crafty_turing \ --repository-name centos --tag latest --compute-resource DockerCP --command "ping google.com" Could not create the container: Error: 500 Internal Server Error
We need to show a user friendly error.
Updated by Adam Ruzicka over 9 years ago
When I tried this today, I got back
Could not create the container: Name has already been taken
is this issue still valid?
Updated by David Davis over 9 years ago
Adam, yea. I fixed the duplicate name issue by adding a check in the foreman code. You can probably get around this by manually creating the container from the docker CLI. Here are some other possibilities:
- A container with name length greater than max?
- A container with invalid options such as an invalid port?
- Have not enough disk space
Basically the issue here is that Docker is returning an error and we're not logging it or displaying it to the user.
Updated by David Davis over 9 years ago
- Subject changed from When creating a container from the CLI/API, errors from docker are not properly handled to When creating a container, errors from docker are not properly reported to the user
Updated by The Foreman Bot over 8 years ago
- Status changed from New to Ready For Testing
- Assignee set to Daniel Lobato Garcia
- Pull request https://github.com/theforeman/foreman-docker/pull/165 added
Updated by Daniel Lobato Garcia over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman-docker|ef3feba424601cb70a7f25fd8457d885e8a023b2.
Updated by The Foreman Bot over 8 years ago
- Pull request https://github.com/theforeman/foreman-docker/pull/168 added
Actions