Bug 1479291

Summary: Docker - containers log endpoint tries to connect to local /var/run/docker.sock even for external docker resource
Product: Red Hat Satellite Reporter: Roman Plevka <rplevka>
Component: Container Management - RuntimeAssignee: Daniel Lobato Garcia <dlobatog>
Status: CLOSED WONTFIX QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bkearney, dlobatog, mhulan, oprazak, sgraessl
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 17:47:37 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:

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.

Comment 5 Red Hat Bugzilla 2023-09-14 04:02:08 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days