Bug 1282431 - Cannot create docker container with 'docker-1.8.2-7' package installed
Cannot create docker container with 'docker-1.8.2-7' package installed
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Container Management (Show other bugs)
x86_64 Linux
urgent Severity high (vote)
: 6.1.8
: --
Assigned To: David Davis
Sachin Ghai
: Triaged
: 1279373 (view as bug list)
Depends On:
Blocks: 1316374
  Show dependency treegraph
Reported: 2015-11-16 06:44 EST by Andrii Balakhtar
Modified: 2017-02-22 05:28 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1316374 (view as bug list)
Last Closed: 2016-03-22 11:44:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
production.log after attempt to create a new docker container (deleted)
2015-11-16 06:44 EST, Andrii Balakhtar
no flags Details
created container on external docker CR (36.10 KB, image/png)
2016-03-14 05:39 EDT, Sachin Ghai
no flags Details
created container on local(satellite) docker CR (37.67 KB, image/png)
2016-03-14 05:40 EDT, Sachin Ghai
no flags Details

  None (edit)
Description Andrii Balakhtar 2015-11-16 06:44:09 EST
Description of problem:
Cannot create Docker container while latest 'docker-1.8.2-7...' package is installed, hitting 'Submit' button simply reloads the page.

Version-Release number of selected component (if applicable):
6.1.4C8, RHEL7.1

rpm -qa | grep docker

How reproducible:

Steps to Reproduce:
1. Create new Docker compute resource (no matter using 'EXTERNAL DOCKER URL' or 'INTERNAL DOCKER URL')
2. Create Product and add Docker repository to it. (e.g. 'busybox' from 'https://registry.hub.docker.com')
3. Sync that repo (In result we should have repo with some Docker Images and some Docker Tags inside)
4. Push 'New Container' button
5. Preliminary->Deploy on->Select Docker compute resource from step 1
6. Next->Image->Content View
7. Select Lifecycle Environment (e.g. 'Library')
8. Select Content View (e.g. 'Default Organization View')
9. Select Repository from step 2
10. Select Tag (e.g. 'latest')
11. Next->Configuration
12. Input any Name (e.g. 'Container_01')
13. Input any command (e.g. 'top')
14. Next->Environment
15. Do nothing here
16. Push Submit button

Actual results:
Nothing happens, page just reloads. production.log contains 'Failed to save' message.

Expected results:
Container created successfully

Run 'yum downgrade docker' to downgrade docker to 'docker-1.7.1-115', which is working fine (container can be created).
Comment 2 Andrii Balakhtar 2015-11-16 07:50:59 EST
NOTE: Unlike #1253270, downgrading docker doesn't bring any side affect. In other aspects the defect is pretty similar to #1253270.
I've also tried to downgrade ruby193-rubygem-foreman_docker to, which was used in testing of #1253270 - nothing changed, seems like only downgrading of docker fixes the problem.
Comment 3 Andrii Balakhtar 2015-11-16 13:00 EST
Created attachment 1095043 [details]
production.log after attempt to create a new docker container via cli
Comment 4 Andrii Balakhtar 2015-11-16 13:00:27 EST
Reproducible also via CLI. Attaching cli_production.log, which contains more informative stacktrace.
Comment 9 Mike McCune 2015-11-17 13:50:22 EST
*** Bug 1279373 has been marked as a duplicate of this bug. ***
Comment 14 Sachin Ghai 2016-03-14 05:31:41 EDT
Verified with sat 6.1.8 compose1 that contains following version of python-crane:

 ~]# rpm -qa | grep python-crane

And installed following docker rpm :


With above rpm versions, I can create a docker container on local(satellite server itself) and on external docker compute-resource. I didn't get "Failed to save" error in logs. Please see the screenshot for verification.
Comment 16 Sachin Ghai 2016-03-14 05:39 EDT
Created attachment 1136101 [details]
created container on external docker CR
Comment 17 Sachin Ghai 2016-03-14 05:40 EDT
Created attachment 1136102 [details]
created container on local(satellite) docker CR
Comment 18 Sachin Ghai 2016-03-14 06:16:21 EDT
Okay, next I tried to create docker container using external registries (registry.access.redhat.com) and it got failed with same error as mentioned in original bz description. UI remains at same page on submitting the new_container wizard and following error thrown in production.log:

2016-03-14 06:10:15 [I] Processing by Containers::StepsController#update as HTML
2016-03-14 06:10:15 [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"yhEBU4RWYfjc+7HqFRwnlOfOdrZqD8+ntNEpAfTcMQE=", "docker_container_wizard_states_environment"=>{"tty"=>"0", "attach_stdin"=>"1", "attach_stdout"=>"1", "attach_stderr"=>"1"}, "wizard_state_id"=>"5", "id"=>"environment"}
2016-03-14 06:10:15 [I] Failed to save: 
2016-03-14 06:10:15 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker- (0.8ms)
2016-03-14 06:10:15 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker- (0.8ms)
2016-03-14 06:10:15 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker- (137.8ms)
2016-03-14 06:10:15 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker- within layouts/application (138.1ms)
2016-03-14 06:10:15 [I]   Rendered home/_submenu.html.erb (1.5ms)
2016-03-14 06:10:15 [I]   Rendered home/_user_dropdown.html.erb (1.0ms)
2016-03-14 06:10:15 [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2016-03-14 06:10:15 [I]   Rendered home/_topbar.html.erb (3.7ms)
2016-03-14 06:10:15 [I]   Rendered layouts/base.html.erb (4.7ms)
2016-03-14 06:10:15 [I] Completed 200 OK in 203ms (Views: 143.9ms | ActiveRecord: 35.0ms)
Comment 19 Sachin Ghai 2016-03-14 08:02:35 EDT
Here is the exact error when trying from CLI:

~]# hammer -u admin -p changeme docker container create --name cli_container_02 --registry 'RedHat' --repository-name rhel --tag latest --capsule-id 1 --command top --compute-resource-id 1
Could not create the container:
  undefined method `save' for nil:NilClass
Comment 20 Mike McCune 2016-03-14 09:47:44 EDT
Did you update the CA trust for docker:

# curl https://satellite.example.com/pub/katello-server-ca.crt > /etc/pki/ca-trust/source/anchors/katello-server-ca.crt
# update-ca-trust enable
# update-ca-trust 
# service docker restart
Comment 21 Sachin Ghai 2016-03-14 10:04:25 EDT
Yes, I tried these steps as mentioned in comment 20 and can see same issue.
Comment 22 Partha Aji 2016-03-14 10:58:39 EDT
That should not have anything to do with crane because you are pulling from rh registry  and not via a content view or pulp. 

Can you confirm this worked with 1.7.1
Comment 24 Partha Aji 2016-03-14 11:57:04 EDT
Mike, Sachin,

The bad registry url issue is being addressed in https://bugzilla.redhat.com/show_bug.cgi?id=1204925
Comment 25 Partha Aji 2016-03-14 12:00:13 EDT
Mike, Sachin

I meant to say its being addressed in http://projects.theforeman.org/issues/14181 connected to https://bugzilla.redhat.com/show_bug.cgi?id=1206300
Comment 26 Mike McCune 2016-03-14 12:55:39 EDT
Ok, that is a different bug, unrelated to this bug. I'm going to move this back ON_QA as the failure is a result of the missing katello-server-ca enabled in the Docker host.
Comment 27 Sachin Ghai 2016-03-14 22:36:15 EDT
Thanks Partha, Mike. The real issue was with registry uri. URI should be "https://registry.access.redhat.com" instead of just "registry.access.redhat.com"

I just updated the URI wth https:// and can successfully create container with external registry from UI as well as from CLI.

 ~]# hammer -u admin -p changeme docker container create --name cli_container_02 --registry 'RedHat' --repository-name rhel --tag latest --capsule-id 1 --command top --compute-resource-id 2
Docker container created

Also as Partha mentioned in comment 25 that URI issue is being addressed in https://bugzilla.redhat.com/show_bug.cgi?id=1206300.

So moving this bz to verified. thanks
Comment 29 errata-xmlrpc 2016-03-22 11:44:30 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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