Bug 1479291 - Docker - containers log endpoint tries to connect to local /var/run/docker.sock even for external docker resource [NEEDINFO]
Summary: Docker - containers log endpoint tries to connect to local /var/run/docker.so...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Container Management - Runtime
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Daniel Lobato Garcia
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-08 09:28 UTC by Roman Plevka
Modified: 2018-09-04 17:47 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-04 17:47:37 UTC
Target Upstream Version:
bbuckingham: needinfo? (dlobatog)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21892 0 None None None 2017-12-06 12:51:31 UTC
Red Hat Bugzilla 1269208 0 unspecified CLOSED hammer docker container logs not returning any logs 2021-02-22 00:41:40 UTC

Internal Links: 1269208

Description Roman Plevka 2017-08-08 09:28:57 UTC
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
{
  "compute_resource": 
    {
      "provider": "Docker",
      "url": "http://10.8.29.107:2375",
      "organization_ids": [55],
      "name": "ApReidcCPN"
    }
}.
2017-08-01 17:18:26 - nailgun.client - DEBUG - Received HTTP 201 response: {"description":null,"url":"http://10.8.29.107:2375","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 19:16:01 UTC
Daniel, thoughts on this one?  Is it a valid issue and feasible to address?

Comment 3 Sebastian Gräßl 2017-12-06 12:51:28 UTC
Created redmine issue http://projects.theforeman.org/issues/21892 from this bug

Comment 4 Bryan Kearney 2018-09-04 17:47:37 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.


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