Bug 1366573
| Summary: | Creating a docker compute resource with unix socket URL throws error: 400 Bad Request: malformed Host header | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Sachin Ghai <sghai> | ||||
| Component: | Container Management | Assignee: | Sebastian Gräßl <sgraessl> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Lukas Pramuk <lpramuk> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 6.2.0 | CC: | bbuckingham, bkearney, dlezzoum, dlobatog, lpramuk, mmccune, tomckay | ||||
| Target Milestone: | Unspecified | Keywords: | Triaged | ||||
| Target Release: | Unused | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| URL: | http://projects.theforeman.org/issues/18502 | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-02-21 16:59:14 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Docker is configured to listen both on unix socket and tcp /etc/sysconfig/docker: OPTIONS='--selinux-enabled=true --host tcp://0.0.0.0:2375 --host unix:///var/run/docker.sock -G docker' Connection to unix:///var/run/docker.sock fails while connection to tcp://localhost:2375 succeeds. SElinux doesn't play a role here as it is set to Permissive. *** Bug 1393405 has been marked as a duplicate of this bug. *** One-liner hotfix for this issue is to run: # scl enable tfm "gem update docker-api" Updating installed gems Updating docker-api Fetching: docker-api-1.33.1.gem (100%) Successfully installed docker-api-1.33.1 Parsing documentation for docker-api-1.33.1 Installing ri documentation for docker-api-1.33.1 Installing darkfish documentation for docker-api-1.33.1 Done installing documentation for docker-api after 1 seconds Parsing documentation for docker-api-1.33.1 Done installing documentation for docker-api after 0 seconds Gems updated: docker-api One-liner fix yet needs GEM_HOME:
# GEM_HOME=/opt/theforeman/tfm/root/usr/share/gems scl enable tfm 'gem update docker-api'
# GEM_HOME=/opt/theforeman/tfm/root/usr/share/gems scl enable tfm irb
irb(main):001:0> require 'docker-api'
=> true
irb(main):002:0> Docker.version
=> {"Version"=>"1.10.3", "ApiVersion"=>"1.22", "GitCommit"=>"429be27-unsupported", "GoVersion"=>"go1.6.2", "Os"=>"linux", "Arch"=>"amd64", "KernelVersion"=>"3.10.0-514.2.2.el7.x86_64", "BuildTime"=>"2016-11-18T17:03:44.884782319-05:00", "PkgVersion"=>"docker-common-1.10.3-59.el7.x86_64"}
This is not induced by old docker-api at all !!!
It's caused by old excon-0.45. Updating it to excon-0.54 resolved the issue.
# GEM_HOME=/opt/theforeman/tfm/root/usr/share/gems scl enable tfm 'gem update excon'
Updating installed gems
Updating excon
Fetching: excon-0.54.0.gem (100%)
Successfully installed excon-0.54.0
Parsing documentation for excon-0.54.0
Installing ri documentation for excon-0.54.0
Installing darkfish documentation for excon-0.54.0
Done installing documentation for excon after 2 seconds
Parsing documentation for excon-0.54.0
Done installing documentation for excon after 0 seconds
Gems updated: excon
# GEM_HOME=/opt/theforeman/tfm/root/usr/share/gems scl enable tfm irb
irb(main):001:0> require 'docker-api'
=> true
irb(main):002:0> Docker.version
=> {"Version"=>"1.10.3", "ApiVersion"=>"1.22", "GitCommit"=>"429be27-unsupported", "GoVersion"=>"go1.6.2", "Os"=>"linux", "Arch"=>"amd64", "KernelVersion"=>"3.10.0-514.2.2.el7.x86_64", "BuildTime"=>"2016-11-18T17:03:44.884782319-05:00", "PkgVersion"=>"docker-common-1.10.3-59.el7.x86_64"}
Connecting redmine issue http://projects.theforeman.org/issues/18502 from this bug Upstream bug assigned to sgraessl Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18502 has been resolved. VERIFIED. @satellite-6.3.0-22.0.el7sat.noarch tfm-rubygem-excon-0.51.0-1.el7sat.noarch by the manual reproducer desribed in comment#0: >>> The docker CR with URL unix:///var/run/docker.sock is created successfully and the connection is functional 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/RHSA-2018:0336 |
Created attachment 1190347 [details] 400 Bad Request: malformed Host header Description of problem: With zstream automation failures, found below issue on creating a docker type CR, with unix socket URL: 400 Bad Request: malformed Host header Here is the installed docker version: ~]# docker version Client: Version: 1.10.3 API version: 1.22 Package version: docker-common-1.10.3-46.el7.10.x86_64 Go version: go1.6.2 Git commit: 2a93377-unsupported Built: Fri Jul 29 13:45:25 2016 OS/Arch: linux/amd64 Server: Version: 1.10.3 API version: 1.22 Package version: docker-common-1.10.3-46.el7.10.x86_64 Go version: go1.6.2 Git commit: 2a93377-unsupported Built: Fri Jul 29 13:45:25 2016 OS/Arch: linux/amd64 Version-Release number of selected component (if applicable): sat6.2.1 snap2.1 How reproducible: Steps to Reproduce: 1. install/confgure docker on satellite server 2. add a docker type compute resource with URL: unix:///var/run/docker.sock 3. Actual results: Unable to save 400 Bad Request: malformed Host header Expected results: docker type CR with unix socket URL should be created Additional info: