Would be nice to show an error like "Container name already taken". > hammer -u admin -p changeme docker container create --name hello --command bash \ --repository-name busybox --tag latest --compute-resource DockerCP Docker Container Created > hammer -u admin -p changeme docker container create --name hello --command bash \ --repository-name busybox --tag latest --compute-resource DockerCP Could not create the container: Error: 500 Internal Server Error
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.
Created redmine issue http://projects.theforeman.org/issues/9901 from this bug
I fixed this issue in the API. However, it looks like the CLI is not showing errors properly. I am not sure what the problem is. All you see is: Could not create the container: Error: 422 Unprocessable Entity I recommend just hitting the API to validate this bug and not using the CLI.
Moving to POST since upstream bug http://projects.theforeman.org/issues/9901 has been closed ------------- David Davis Applied in changeset commit:foreman-docker|2a0cf95b1f32e6a21de36de50730ad875633e7dd.
Opened up a bug to show the correct error from the API in the CLI: https://bugzilla.redhat.com/show_bug.cgi?id=1218409
Verified on: Satellite-6.1.0-RHEL-7-20150429.2 Steps to verify: 1) Created a Docker based Compute Resource 2) Created a container 3) Tried to create another container with the same name as the container created on step 2. The server does not raised 500 but is is giving a "Error: 422 Unprocessable Entity". As we have a open bug for the better message, I will verify this.
This bug is slated to be released with Satellite 6.1.
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.