Bug 1479291 - Docker - containers log endpoint tries to connect to local /var/run/docker.sock even for external docker resource [NEEDINFO]
Docker - containers log endpoint tries to connect to local /var/run/docker.so...
Status: NEW
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Container Management - Runtime (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Daniel Lobato Garcia
Roman Plevka
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2017-08-08 05:28 EDT by Roman Plevka
Modified: 2018-07-05 01:22 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
bbuckingham: needinfo? (dlobatog)

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 21892 None None None 2017-12-06 07:51 EST

  None (edit)
Description Roman Plevka 2017-08-08 05:28:57 EDT
Description of problem:
docker log reading feature does not respect the fact that I use external docker resource and keeps trying to connect to /var/run/docker.sock of the satellite box instead of using TCP/TLS for reaching the external docker interface.

Version-Release number of selected component (if applicable):
satellite 6.3.0-10

Steps to Reproduce:
1. have an external host running docker, configured to accept tcp/tls connections
2. add this host as a docker compute resource on satellite
3. create a container via satellite interface
4. try to use satellite to read the container logs

Actual results:
2017-08-01 17:18:26 - nailgun.client - DEBUG - Making HTTP POST request to https://sat6.com/api/v2/compute_resources with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}}, no params and data
      "provider": "Docker",
      "url": "",
      "organization_ids": [55],
      "name": "ApReidcCPN"
2017-08-01 17:18:26 - nailgun.client - DEBUG - Received HTTP 201 response: {"description":null,"url":"","created_at":"2017-08-01 21:18:26 UTC","updated_at":"2017-08-01 21:18:26 UTC","id":52,"name":"ApReidcCPN","provider":"Docker","provider_friendly_name":"Docker","user":null,"images":[],"compute_attributes":[],"locations":[],"organizations":[{"id":55,"name":"zcBPUXbQHi","title":"zcBPUXbQHi","description":null}]}

2017-08-01 17:18:28 - nailgun.client - DEBUG - Making HTTP POST request to https://sat6.com/docker/api/v2/containers with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}}, no params and data

  "container": {
                 "repository_name": "busybox",
                 "compute_resource_id": 52,
                 "tag": "latest",
                 "command": "date",
                 "organization_ids": [55],
                 "name": "hjRR6uiV1"
2017-08-01 17:18:36 - nailgun.client - DEBUG - Received HTTP 201 response
2017-08-01 17:18:36 - nailgun.client - DEBUG - Making HTTP GET request to https://sat6.com/docker/api/v2/containers/9/logs with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}}, no params and no data.
2017-08-01 17:18:36 - nailgun.client - WARNING - Received HTTP 500 response: {
  "error": {"message":"No such file or directory - connect(2) for /var/run/docker.sock (Errno::ENOENT)"}

Expected results:
connection is being made to the appropriate interface and the logs are being fetched

Additional info:
Comment 2 Brad Buckingham 2017-08-08 15:16:01 EDT
Daniel, thoughts on this one?  Is it a valid issue and feasible to address?
Comment 3 Sebastian Gräßl 2017-12-06 07:51:28 EST
Created redmine issue http://projects.theforeman.org/issues/21892 from this bug

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