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 1253422 - Can't set container options if target daemon is docker 1.7.1
Summary: Can't set container options if target daemon is docker 1.7.1
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Container Management
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: Og Maciel
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-13 16:33 UTC by Elyézer Rezende
Modified: 2019-06-13 21:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-15 07:22:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Error message (102.95 KB, image/png)
2015-09-02 15:17 UTC, Og Maciel
no flags Details
Docker detailed information (145.62 KB, image/png)
2015-09-03 19:23 UTC, Og Maciel
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 11354 0 None None None 2016-04-22 15:01:15 UTC
Red Hat Product Errata RHBA-2015:1786 0 normal SHIPPED_LIVE Satellite 6.1.2 bug fix update 2015-09-15 11:20:04 UTC

Description Elyézer Rezende 2015-08-13 16:33:55 UTC
Description of problem:
Unable to set container options if docker daemon package version is 1.7.1.

Version-Release number of selected component (if applicable):
Satellite 6.1.1 (CDN)

How reproducible:
Aways

Steps to Reproduce:
1. Create a new container using the container wizard (don't matter if getting the image from content view or Docker HUB)
2. Set the CPU, CPU share and memory
3. Try to finish the wizard

Actual results:


Expected results:


Additional info:
Manually applied [1]in order to make container creation work, but for the memory and other options another fix is required.

[1] https://github.com/theforeman/foreman-docker/commit/e88059db3a33445f654b199d803e4364662b7eaf#diff-8f6cf17bcdab083ba9adc56132c35f1aR11

Comment 2 Partha Aji 2015-08-14 15:20:37 UTC
Created redmine issue http://projects.theforeman.org/issues/11354 from this bug

Comment 3 Bryan Kearney 2015-08-17 11:22:17 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/11354 has been closed
-------------
Partha Aji
Applied in changeset commit:foreman-docker|ef7e4271880e6b80a3fefe589532254dec7bbe33.

Comment 7 Og Maciel 2015-09-02 15:17:23 UTC
Created attachment 1069471 [details]
Error message

This has failed QE as I now get a red box error message stating:

  Error creating communicating with Docker. Check the Foreman logs: json: cannot unmarshal string into Go value of type int64

Logs show:

2015-09-02 11:05:55 [I] Processing by Containers::StepsController#update as HTML
2015-09-02 11:05:55 [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"NPWS/mxCGQUJUfGP6gPkzYIpDCUOwT0hrM0QVCz0Oys=", "docker_container_wizard_states_configuration"=>{"name"=>"bz1253422-busybox-01", "command"=>"top", "entrypoint"=>"", "cpu_set"=>"2", "cpu_shares"=>"1", "memory"=>"512m"}, "wizard_state_id"=>"1", "id"=>"configuration"}
2015-09-02 11:05:55 [I] Redirected to https://ibm-x3250m4-05.lab.eng.rdu2.redhat.com/wizard_states/1/steps/environment
2015-09-02 11:05:55 [I] Completed 302 Found in 41ms (ActiveRecord: 30.2ms)
2015-09-02 11:05:55 [I] Processing by Containers::StepsController#show as HTML
2015-09-02 11:05:55 [I]   Parameters: {"wizard_state_id"=>"1", "id"=>"environment"}
2015-09-02 11:05:55 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0.20/app/views/foreman_docker/common_parameters/_environment_variable.html.erb (1.8ms)
2015-09-02 11:05:55 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0.20/app/views/containers/steps/_form_buttons.html.erb (0.8ms)
2015-09-02 11:05:55 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0.20/app/views/containers/steps/_title.html.erb (29.6ms)
2015-09-02 11:05:55 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0.20/app/views/containers/steps/environment.html.erb within layouts/application (30.6ms)
2015-09-02 11:05:55 [I]   Rendered home/_submenu.html.erb (1.5ms)
2015-09-02 11:05:55 [I]   Rendered home/_user_dropdown.html.erb (1.0ms)
2015-09-02 11:05:55 [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2015-09-02 11:05:55 [I]   Rendered home/_topbar.html.erb (3.7ms)
2015-09-02 11:05:55 [I]   Rendered layouts/base.html.erb (4.6ms)
2015-09-02 11:05:55 [I] Completed 200 OK in 200ms (Views: 46.1ms | ActiveRecord: 2.9ms)
2015-09-02 11:06:01 [I] Processing by Containers::StepsController#update as HTML
2015-09-02 11:06:01 [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"NPWS/mxCGQUJUfGP6gPkzYIpDCUOwT0hrM0QVCz0Oys=", "docker_container_wizard_states_environment"=>{"tty"=>"1", "attach_stdin"=>"1", "attach_stdout"=>"1", "attach_stderr"=>"1"}, "start_on_create"=>"1", "wizard_state_id"=>"1", "id"=>"environment"}
2015-09-02 11:06:06 [I] Failed to save:
2015-09-02 11:06:06 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0.20/app/views/foreman_docker/common_parameters/_environment_variable.html.erb (0.7ms)
2015-09-02 11:06:06 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0.20/app/views/containers/steps/_form_buttons.html.erb (0.6ms)
2015-09-02 11:06:06 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0.20/app/views/containers/steps/_title.html.erb (8.5ms)
2015-09-02 11:06:06 [I]   Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0.20/app/views/containers/steps/environment.html.erb within layouts/application (8.8ms)
2015-09-02 11:06:06 [I]   Rendered home/_submenu.html.erb (1.5ms)
2015-09-02 11:06:06 [I]   Rendered home/_user_dropdown.html.erb (1.0ms)
2015-09-02 11:06:06 [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2015-09-02 11:06:06 [I]   Rendered home/_topbar.html.erb (3.5ms)

The environment is:

# rpm -qa |grep docker | sort
docker-1.7.1-108.el7.x86_64
docker-selinux-1.7.1-108.el7.x86_64
pulp-docker-plugins-0.2.5-1.el7sat.noarch
python-pulp-docker-common-0.2.5-1.el7sat.noarch
ruby193-rubygem-docker-api-1.17.0-1.1.el7sat.noarch
ruby193-rubygem-foreman_docker-1.2.0.20-1.el7sat.noarch
rubygem-hammer_cli_foreman_docker-0.0.3.9-1.el7sat.noarch

Comment 8 Og Maciel 2015-09-02 15:29:29 UTC
Looks like we missed a commit: https://gitlab.sat.lab.tlv.redhat.com/satellite6/foreman-docker/merge_requests/5

Comment 9 Mike McCune 2015-09-03 14:15:04 UTC
merged the above

Comment 10 Og Maciel 2015-09-03 19:23:35 UTC
Created attachment 1070070 [details]
Docker detailed information

I passed the following values to a docker container:

* cpu shares: 2
* cpu set: 2
* memory: 512M

The screenshot shows that all values were successfully passed to the container.

Comment 11 Og Maciel 2015-09-03 19:26:46 UTC
Using docker command to check that my settings were passed to the container I created:

# docker inspect 28e682ae2a66
[
{
    "Id": "28e682ae2a662671d863330cd3d8787c40530c2ba4fa01834bef2f26f49b036a",
    "Created": "2015-09-03T19:19:57.673498429Z",
    "Path": "top",
    "Args": [],
    "State": {
        "Running": true,
        "Paused": false,
        "Restarting": false,
        "OOMKilled": false,
        "Dead": false,
        "Pid": 4922,
        "ExitCode": 0,
        "Error": "",
        "StartedAt": "2015-09-03T19:19:58.944898194Z",
        "FinishedAt": "0001-01-01T00:00:00Z"
    },
    "Image": "8c2e06607696bd4afb3d03b687e361cc43cf8ec1a4a725bc96e39f05ba97dd55",
    "NetworkSettings": {
        "Bridge": "",
        "EndpointID": "f639c8b5b0574dd3aeb737b9639c6bb69fecd303cacd41ff8032fe34ed0d7482",
        "Gateway": "172.17.42.1",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "HairpinMode": false,
        "IPAddress": "172.17.0.5",
        "IPPrefixLen": 16,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "MacAddress": "02:42:ac:11:00:05",
        "NetworkID": "670f2d6e555dd687464b2d39f65f7530d415371e1d30c5f40f4dc76b85a307f0",
        "PortMapping": null,
        "Ports": {},
        "SandboxKey": "/var/run/docker/netns/28e682ae2a66",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null
    },
    "ResolvConfPath": "/var/lib/docker/containers/28e682ae2a662671d863330cd3d8787c40530c2ba4fa01834bef2f26f49b036a/resolv.conf",
    "HostnamePath": "/var/lib/docker/containers/28e682ae2a662671d863330cd3d8787c40530c2ba4fa01834bef2f26f49b036a/hostname",
    "HostsPath": "/var/lib/docker/containers/28e682ae2a662671d863330cd3d8787c40530c2ba4fa01834bef2f26f49b036a/hosts",
    "LogPath": "/var/lib/docker/containers/28e682ae2a662671d863330cd3d8787c40530c2ba4fa01834bef2f26f49b036a/28e682ae2a662671d863330cd3d8787c40530c2ba4fa01834bef2f26f49b036a-json.log",
    "Name": "/omaciel-busybox-01",
    "RestartCount": 0,
    "Driver": "devicemapper",
    "ExecDriver": "native-0.2",
    "MountLabel": "system_u:object_r:svirt_sandbox_file_t:s0:c378,c841",
    "ProcessLabel": "system_u:system_r:svirt_lxc_net_t:s0:c378,c841",
    "Volumes": {},
    "VolumesRW": {},
    "AppArmorProfile": "",
    "ExecIDs": null,
    "HostConfig": {
        "Binds": null,
        "ContainerIDFile": "",
        "LxcConf": null,
        "Memory": 536870912,
        "MemorySwap": 0,
        "CpuShares": 2,
        "CpuPeriod": 0,
        "CpusetCpus": "2",
        "CpusetMems": "",
        "CpuQuota": 0,
        "BlkioWeight": 0,
        "OomKillDisable": false,
        "Privileged": false,
        "PortBindings": null,
        "Links": null,
        "PublishAllPorts": false,
        "Dns": null,
        "DnsSearch": null,
        "ExtraHosts": null,
        "VolumesFrom": null,
        "Devices": null,
        "NetworkMode": "bridge",
        "IpcMode": "",
        "PidMode": "",
        "UTSMode": "",
        "CapAdd": null,
        "CapDrop": null,
        "RestartPolicy": {
            "Name": "",
            "MaximumRetryCount": 0
        },
        "SecurityOpt": null,
        "ReadonlyRootfs": false,
        "Ulimits": null,
        "LogConfig": {
            "Type": "json-file",
            "Config": {}
        },
        "CgroupParent": ""
    },
    "Config": {
        "Hostname": "28e682ae2a66",
        "Domainname": "",
        "User": "",
        "AttachStdin": true,
        "AttachStdout": true,
        "AttachStderr": true,
        "PortSpecs": null,
        "ExposedPorts": null,
        "Tty": true,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": null,
        "Cmd": [
            "top"
        ],
        "Image": "busybox:latest",
        "Volumes": null,
        "VolumeDriver": "",
        "WorkingDir": "",
        "Entrypoint": [],
        "NetworkDisabled": false,
        "MacAddress": "",
        "OnBuild": null,
        "Labels": {},
        "Init": ""
    }
}
]

Comment 12 Og Maciel 2015-09-03 19:43:04 UTC
Verified on Sat6.1.2-SNAP1 Compose 3 using RHEL 7.1 and the following packages:

* docker-1.7.1-108.el7.x86_64
* docker-selinux-1.7.1-108.el7.x86_64
* pulp-docker-plugins-0.2.5-1.el7sat.noarch
* python-pulp-docker-common-0.2.5-1.el7sat.noarch
* ruby193-rubygem-docker-api-1.17.0-1.1.el7sat.noarch
* ruby193-rubygem-foreman_docker-1.2.0.22-1.el7sat.noarch
* rubygem-hammer_cli_foreman_docker-0.0.3.9-1.el7sat.noarch

Comment 14 errata-xmlrpc 2015-09-15 07:22:39 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-2015:1786


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