Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1282431 - Cannot create docker container with 'docker-1.8.2-7' package installed
Summary: Cannot create docker container with 'docker-1.8.2-7' package installed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Container Management
Version: 6.1.4
Hardware: x86_64
OS: Linux
urgent
high
Target Milestone: Unspecified
Assignee: David Davis
QA Contact: Sachin Ghai
URL:
Whiteboard:
: 1279373 (view as bug list)
Depends On:
Blocks: 1316374
TreeView+ depends on / blocked
 
Reported: 2015-11-16 11:44 UTC by Andrii Balakhtar
Modified: 2019-11-14 07:08 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1316374 (view as bug list)
Environment:
Last Closed: 2016-03-22 15:44:30 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0475 0 normal SHIPPED_LIVE Satellite 6.1.8 bug fix update 2016-03-22 19:42:56 UTC

Description Andrii Balakhtar 2015-11-16 11:44:09 UTC
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
ruby193-rubygem-foreman_docker-1.2.0.24-1.el7sat.noarch
docker-1.8.2-7.el7.x86_64
ruby193-rubygem-docker-api-1.17.0-1.1.el7sat.noarch
docker-selinux-1.8.2-7.el7.x86_64
python-pulp-docker-common-0.2.5-1.el7sat.noarch
pulp-docker-plugins-0.2.5-1.el7sat.noarch
rubygem-hammer_cli_foreman_docker-0.0.3.9-1.el7sat.noarch


How reproducible:
Always.

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

WORKAROUND:
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 12:50:59 UTC
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 1.2.0.22-1, 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 18:00:00 UTC
Created attachment 1095043 [details]
production.log after attempt to create a new docker container via cli

Comment 4 Andrii Balakhtar 2015-11-16 18:00:27 UTC
Reproducible also via CLI. Attaching cli_production.log, which contains more informative stacktrace.

Comment 9 Mike McCune 2015-11-17 18:50:22 UTC
*** Bug 1279373 has been marked as a duplicate of this bug. ***

Comment 14 Sachin Ghai 2016-03-14 09:31:41 UTC
Verified with sat 6.1.8 compose1 that contains following version of python-crane:

 ~]# rpm -qa | grep python-crane
python-crane-0.2.2-2.el7sat.noarch

And installed following docker rpm :

docker-1.8.2-10.el7.x86_64


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 09:39:27 UTC
Created attachment 1136101 [details]
created container on external docker CR

Comment 17 Sachin Ghai 2016-03-14 09:40:11 UTC
Created attachment 1136102 [details]
created container on local(satellite) docker CR

Comment 18 Sachin Ghai 2016-03-14 10:16:21 UTC
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-1.2.0.24/app/views/foreman_docker/common_parameters/_environment_variable.html.erb (0.8ms)
2016-03-14 06:10:15 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0.24/app/views/containers/steps/_form_buttons.html.erb (0.8ms)
2016-03-14 06:10:15 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0.24/app/views/containers/steps/_title.html.erb (137.8ms)
2016-03-14 06:10:15 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0.24/app/views/containers/steps/environment.html.erb 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 12:02:35 UTC
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 13:47:44 UTC
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 14:04:25 UTC
Yes, I tried these steps as mentioned in comment 20 and can see same issue.

Comment 22 Partha Aji 2016-03-14 14:58:39 UTC
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 15:57:04 UTC
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 16:00:13 UTC
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 16:55:39 UTC
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-15 02:36:15 UTC
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 15:44:30 UTC
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.

https://access.redhat.com/errata/RHBA-2016:0475


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