RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1466479 - level=fatal msg="can't create unix socket /var/run/docker.sock: is a directory"
Summary: level=fatal msg="can't create unix socket /var/run/docker.sock: is a directory"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: ---
Assignee: Tom Sweeney
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
: 1466867 (view as bug list)
Depends On:
Blocks: 1186913 1502829 1537321 1611206
TreeView+ depends on / blocked
 
Reported: 2017-06-29 18:19 UTC by Ryan Howe
Modified: 2022-03-13 14:19 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-28 09:25:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3122871 0 None None None 2017-07-21 23:04:58 UTC
Red Hat Product Errata RHBA-2018:3726 0 None None None 2018-11-28 09:28:04 UTC

Description Ryan Howe 2017-06-29 18:19:19 UTC
Description of problem:

  Docker gets terminated at the same time as OpenShift trying to restart a pod that mounts /var/run/docker.sock. Causing /var/run/docker.sock to be created as a directory. When docker starts again it fails with the following error: 

   level=fatal msg="can't create unix socket /var/run/docker.sock: is a directory"


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

docker-1.12.6-31.git3a6eaeb.el7.x86_64 


Steps to Reproduce:
1. Start container mounting var/run/docker.sock at the same time as killing docker. 


Actual results:
var/run/docker.sock is created as a directory 

Expected results:
fail to start the container while docker shuts down. 

Additional info:

Upstream issue:  https://github.com/moby/moby/issues/30348

Reproducer is in commit message. 
Possible fix: https://github.com/moby/moby/pull/33330/commits/7318eba5b2f8bb4b867ca943c3229260ca98a3bc

Comment 2 Daniel Walsh 2017-06-30 15:58:39 UTC
Are you using autostarted containers with the /var/run/docker.sock mounted into them?

Comment 3 Ryan Howe 2017-06-30 20:17:15 UTC
@Dan 

These containers are configured as a daemonset in OpenShift. Using this template. 

https://github.com/kubernetes/charts/blob/master/stable/telegraf/templates/daemonset.yaml

Issue was worked around by mounting /var/run to another location.

Comment 5 Alexis Solanas 2017-11-27 08:39:37 UTC
*** Bug 1466867 has been marked as a duplicate of this bug. ***

Comment 6 Daniel Walsh 2018-05-31 15:50:23 UTC
THis should no longer be an issue.

Comment 7 Ryan Howe 2018-06-21 18:40:53 UTC
What version was this fixed in? 

Is there an errata we can reference.

Comment 11 Pasi Karkkainen 2018-08-22 14:53:59 UTC
This issue still happens with latest docker-1.13.1-74.git6e3bb8e.el7

Comment 15 Tom Sweeney 2018-09-25 11:14:30 UTC
Suhass I'm afraid no major updates as of yet.  I've been trying to replicate and diagnose the root cause but have not found one yet.

Comment 16 Tom Sweeney 2018-10-09 23:54:41 UTC
Suhass no progress on a root cause, but I was able to get some time today to replicate the issue in my test environment today.  I've got to wrap up for the evening, but hope to dive more deeply into the issue tomorrow.  TYVM for the reproducer reference, that's proving to be very helpful.

Comment 17 Tom Sweeney 2018-10-11 00:02:50 UTC
https://github.com/projectatomic/docker/pull/327 created to address this issue in Docker-1.13.1.  Once reviewed/merged I will make a similar patch for Docker-1.13.1-RHEL and will not it here in a follow up.

Comment 18 Tom Sweeney 2018-10-11 16:39:21 UTC
"not it here" in previous reply translates to "note it here"

Comment 19 Tom Sweeney 2018-10-13 18:51:17 UTC
https://github.com/projectatomic/docker/pull/328 created to address this issue in Docker-1.13.1-RHEL.

Comment 20 Robert Bost 2018-11-01 23:29:15 UTC
I have a customer seeing this issue in docker-1.13.1-75.git8633870.el7_5.x86_64 and looks like some other folks are seeing the same issue too in 1.13.

Reopening this bz after speaking with tsweeney.

Comment 21 Robert Bost 2018-11-01 23:31:14 UTC
This bug report was originally closed with CURRENTRELEASE resolution. Which version of docker has the patch or had it not been shipped yet?

Comment 26 errata-xmlrpc 2018-11-28 09:25:41 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-2018:3726


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