Bug 1204298 - Provisioning the same container name twice from the CLI in foreman just gives "500 Internal Server Error"
Summary: Provisioning the same container name twice from the CLI in foreman just gives...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: David Davis
QA Contact: Elyézer Rezende
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-20 20:29 UTC by David Davis
Modified: 2017-02-23 20:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 13:56:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 9901 0 None None None 2016-04-22 16:54:37 UTC

Description David Davis 2015-03-20 20:29:14 UTC
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

Comment 1 RHEL Program Management 2015-03-20 20:43:12 UTC
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.

Comment 3 Partha Aji 2015-03-25 19:01:48 UTC
Created redmine issue http://projects.theforeman.org/issues/9901 from this bug

Comment 4 David Davis 2015-03-25 19:11:41 UTC
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.

Comment 5 Bryan Kearney 2015-04-28 14:05:59 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9901 has been closed
-------------
David Davis
Applied in changeset commit:foreman-docker|2a0cf95b1f32e6a21de36de50730ad875633e7dd.

Comment 8 David Davis 2015-05-04 20:18:50 UTC
Opened up a bug to show the correct error from the API in the CLI:

https://bugzilla.redhat.com/show_bug.cgi?id=1218409

Comment 9 Elyézer Rezende 2015-05-04 20:29:01 UTC
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.

Comment 10 Bryan Kearney 2015-08-11 13:30:40 UTC
This bug is slated to be released with Satellite 6.1.

Comment 11 Bryan Kearney 2015-08-12 13:56:55 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.


Note You need to log in before you can comment on or make changes to this bug.