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 1342060 - Post http:///var/run/docker.sock/v1.22/images/load: write unix /var/run/docker.sock: broken pipe
Summary: Post http:///var/run/docker.sock/v1.22/images/load: write unix /var/run/docke...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: atomic
Version: 7.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: smahajan@redhat.com
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-02 11:14 UTC by Alex Jia
Modified: 2016-11-04 09:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 09:06:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2628 0 normal SHIPPED_LIVE atomic bug fix and enhancement update 2016-11-03 18:17:14 UTC

Description Alex Jia 2016-06-02 11:14:51 UTC
Description of problem:
atomic storage import cmdline got error like this "An error occurred trying to connect: Post http:///var/run/docker.sock/v1.22/images/load: write unix /var/run/docker.sock: broken pipe" when recovery exported images and containers w/ incomplete migration steps.

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

$ rpm -q atomic docker kernel
atomic-1.10.3-1.el7.x86_64
docker-1.10.3-26.el7.x86_64
kernel-3.10.0-327.el7.x86_64

$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.2 (Maipo)

How reproducible:
always

Steps to Reproduce:
1. docker pull or atomic install some images
2. atomic storage export --dir /tmp
3. docker rmi `sudo docker images -a -q`
4. docker images
5. atomic storage import --dir /tmp

Actual results:
$ sudo atomic images

  REPOSITORY                                           TAG              IMAGE ID       CREATED            VIRTUAL SIZE  
  docker.io/openshift/origin-docker-registry           latest           sha256:4ec3d   2016-06-01 22:16   322.88 MB     
  docker.io/openshift/origin                           latest           sha256:443ba   2016-06-01 22:16   414.09 MB     
  docker.io/cockpit/kubernetes                         latest           sha256:e2f98   2016-06-01 19:37   239.35 MB     
  docker.io/openshift/origin-deployer                  v1.3.0-alpha.1   sha256:18020   2016-05-25 21:42   415.09 MB     
  docker.io/openshift/origin-pod                       v1.3.0-alpha.1   sha256:e7829   2016-05-25 21:30   1.59 MB       
  docker.io/projectatomic/atomic-registry-quickstart   latest           sha256:161c4   2016-05-19 09:51   426.67 MB     
  registry.access.redhat.com/rhel7                     latest           sha256:bf203   2016-05-05 12:43   203.43 MB     
  docker.io/busybox                                    latest           sha256:47bcc   2016-03-18 14:22   1.11 MB       
  docker.io/fedora                                     latest           sha256:507cb   2016-03-04 13:40   204.69 MB     
  busybox                                              latest           busybox:late   2016-06-02 05:10                 

$ sudo atomic storage export --dir /tmp
Exporting image: sha256:47bcc
Exporting image: sha256:161c4
Exporting image: sha256:507cb
Exporting image: sha256:18020
Exporting image: sha256:4ec3d
Exporting image: sha256:443ba
Exporting image: sha256:e2f98
Exporting image: sha256:bf203
Exporting image: sha256:e7829
Exporting volumes
atomic export completed successfully

$ ls /tmp
containers  images  info.txt  plugtmp  volumes

$ sudo docker rmi `sudo docker images -a -q`
$ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

$ sudo atomic storage import --dir /tmp
Importing image: sha256:e7829
An error occurred trying to connect: Post http:///var/run/docker.sock/v1.22/images/load: write unix /var/run/docker.sock: broken pipe


Expected results:


Additional info:

The testing steps should be incomplete for image/container migration, but we shouldn't get a 'broken pipe' error at least.


$ sudo systemctl stop docker
$ sudo systemctl is-active docker
inactive
$ sudo atomic storage reset
    Usage: docker-storage-setup [OPTIONS]

    Grows the root filesystem and sets up storage for docker

    Options:
      -h, --help    Print help message

We haven't mentioned any storage/migrate keywords in man page of docker-storage-setup, it may be let users jump into another trouble to remove all containers/images.

Comment 2 smahajan@redhat.com 2016-08-21 18:35:34 UTC
I just tested it out on a RHEL7 VM and this works for me. Your usecase only involve images (no volumes or containers) so basically it's just `docker save/load` under the atomic wrapper. So I don't see a reason why it is blowing up. I don't think this has anything to do with `atomic storage export` or `import`, there is something else wrong in the setup.

Here is the output on my machine:

a)
$$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)

b)
$$ rpm -q docker atomic kernel
docker-1.10.3-46.el7.11.x86_64
atomic-1.10.5-7.el7.x86_64
kernel-3.10.0-327.el7.x86_64
kernel-3.10.0-327.18.2.el7.x86_64
kernel-3.10.0-327.28.2.el7.x86_64

c) docker pull some images.
$$ docker images
REPOSITORY                              TAG                 IMAGE ID            CREATED             SIZE
docker.io/fedora                        latest              11a5107645d4        5 days ago          204.4 MB
docker.io/centos                        latest              970633036444        3 weeks ago         196.7 MB
registry.access.redhat.com/rhel7/rhel   latest              4a6b6e1a17d7        3 weeks ago         201.6 MB


d) 
$$ atomic storage export --dir /tmp
Exporting image: sha256:4a6b6
Exporting image: sha256:11a51
Exporting image: sha256:97063
Exporting volumes
atomic export completed successfully

e) docker rmi $(docker images -aq)
$$ docker images 
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

f) atomic storage import --dir /tmp
Importing image: sha256:4a6b6
Importing image: sha256:11a51
Importing image: sha256:97063
Importing volumes
atomic import completed successfully
Would you like to cleanup (rm -rf /tmp) the temporary directory [y/N]
N
Please restart docker daemon for the changes to take effect

g) systemctl restart docker
$$ docker images
REPOSITORY                              TAG                 IMAGE ID            CREATED             SIZE
docker.io/fedora                        latest              11a5107645d4        5 days ago          204.4 MB
docker.io/centos                        latest              970633036444        3 weeks ago         196.7 MB
registry.access.redhat.com/rhel7/rhel   latest              4a6b6e1a17d7        3 weeks ago         201.6 MB


Shishir

Comment 3 Daniel Walsh 2016-08-26 19:10:41 UTC
Lets stat that this works in the current release.

Comment 4 Alex Jia 2016-08-29 16:28:04 UTC
It works well on atomic-1.10.5-7.el7.x86_64.

Comment 6 Alex Jia 2016-09-18 03:13:02 UTC
Moving to VERIFIED status per Comment 4.


Just a record for updating testing steps.

1. docker pull some images to the local
2. atomic storage export 
3. systemctl stop docker
4. atomic storage reset
5. systemctl start docker
6. atomic storage import
7. atomic images to check if previous exported images are imported successfully

Comment 8 errata-xmlrpc 2016-11-04 09:06:05 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://rhn.redhat.com/errata/RHBA-2016-2628.html


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