This repository has been archived by the owner on Feb 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 885
rkt fails to render Docker images with whiteout-ed hard links #1653
Milestone
Comments
Thanks for the bug report! rkt uses docker2aci to convert the Docker image and it does not handle well hard links that get deleted in a subsequent Docker layer: after the
I reported the issue on appc/docker2aci#98 |
jonboulle
changed the title
rkt: 0.9.0: error rendering tree image: treestore: cannot render aci: error extracting ACI: extracttar error: exit status 1, output: error extracting tar: error extracting tarball: link
rkt fails to render Docker images with whiteout-ed hard links
Oct 21, 2015
alban
added a commit
to alban/docker2aci
that referenced
this issue
Nov 12, 2015
Hard links and whiteout were not handled correctly in this scenario: - The first Docker layer contains: - file A - file B hard link to file A - The second Docker layer contains: - whiteout file A Then, the squashed ACI previously generated by docker2aci contained: - file B dangling hard link to file A Hence the bug. This patch changes: - the converting algorithm lib/common/common.go:writeACI() to generate: - First docker layer - .hidden.docker2aci.sha512-xxx (hash of the layer and file name) - file A hard link to .hidden.docker2aci.sha512-xxx - file B hard link to .hidden.docker2aci.sha512-xxx - Second docker layer - whiteout file A - the squashing algorithm lib/docker2aci.go:SquashLayers() to have two passes: - Pass one: build an in-memory map of hard links and whiteouts - Pass two: remove white-out and .hidden.docker2aci.sha512-xxx files I tested the following images from rkt/rkt#1653: - docker://albanc/busybox-hardlinks - docker://zopyx/xmldirector-plone TODO: - not optimized if there are no hard links - semantic changes on --nosquash Fixes appc#98
I prepared a fix in docker2aci: appc/docker2aci#100 But I would like to have time to change it to do the conversion without an additional intermediary file. Then, it will need to be reviewed and more tested. => Moving to next milestone. |
alban
added a commit
to alban/docker2aci
that referenced
this issue
Nov 17, 2015
Hard links and whiteout were not handled correctly in this scenario: - The first Docker layer contains: - file A - file B hard link to file A - The second Docker layer contains: - whiteout file A Then, the squashed ACI previously generated by docker2aci contained: - file B dangling hard link to file A Hence the bug. This patch changes: - the converting algorithm lib/common/common.go:writeACI() to generate: - First docker layer - .hidden.docker2aci.sha512-xxx (hash of the layer and file name) - file A hard link to .hidden.docker2aci.sha512-xxx - file B hard link to .hidden.docker2aci.sha512-xxx - Second docker layer - whiteout file A - the squashing algorithm lib/docker2aci.go:SquashLayers() to have two passes: - Pass one: build an in-memory map of hard links and whiteouts - Pass two: remove white-out and .hidden.docker2aci.sha512-xxx files I tested the following images from rkt/rkt#1653: - docker://albanc/busybox-hardlinks - docker://zopyx/xmldirector-plone TODO: - not optimized if there are no hard links - semantic changes on --nosquash Fixes appc#98
alban
added a commit
to alban/docker2aci
that referenced
this issue
Nov 19, 2015
Hard links and whiteout were not handled correctly in this scenario: - The first Docker layer contains: - file A - file B hard link to file A - The second Docker layer contains: - whiteout file A Then, the squashed ACI previously generated by docker2aci contained: - file B dangling hard link to file A Hence the bug. This patch changes: - the converting algorithm lib/common/common.go:writeACI() to generate: - First docker layer - .hidden.docker2aci.sha512-xxx (hash of the layer and file name) - file A hard link to .hidden.docker2aci.sha512-xxx - file B hard link to .hidden.docker2aci.sha512-xxx - Second docker layer - whiteout file A - the squashing algorithm lib/docker2aci.go:SquashLayers() to have two passes: - Pass one: build an in-memory map of hard links and whiteouts - Pass two: remove white-out and .hidden.docker2aci.sha512-xxx files I tested the following images from rkt/rkt#1653: - docker://albanc/busybox-hardlinks - docker://zopyx/xmldirector-plone TODO: - not optimized if there are no hard links - semantic changes on --nosquash Fixes appc#98
alban
added a commit
to alban/docker2aci
that referenced
this issue
Nov 20, 2015
Hard links and whiteout were not handled correctly in this scenario: - The first Docker layer contains: - file A - file B hard link to file A - The second Docker layer contains: - whiteout file A Then, the squashed ACI previously generated by docker2aci contained: - file B dangling hard link to file A Hence the bug. This patch changes: - the converting algorithm lib/common/common.go:writeACI() to generate: - First docker layer - .hidden.docker2aci.sha512-xxx (hash of the layer and file name) - file A hard link to .hidden.docker2aci.sha512-xxx - file B hard link to .hidden.docker2aci.sha512-xxx - Second docker layer - whiteout file A - the squashing algorithm lib/docker2aci.go:SquashLayers() to have two passes: - Pass one: build an in-memory map of hard links and whiteouts - Pass two: remove white-out and .hidden.docker2aci.sha512-xxx files I tested the following images from rkt/rkt#1653: - docker://albanc/busybox-hardlinks - docker://zopyx/xmldirector-plone TODO: - not optimized if there are no hard links - semantic changes on --nosquash Fixes appc#98
alban
added a commit
to alban/docker2aci
that referenced
this issue
Nov 20, 2015
Hard links and whiteout were not handled correctly in this scenario: - The first Docker layer contains: - file A - file B hard link to file A - The second Docker layer contains: - whiteout file A Then, the squashed ACI previously generated by docker2aci contained: - file B dangling hard link to file A Hence the bug. This patch changes: - the converting algorithm lib/common/common.go:writeACI() to generate: - First docker layer - .hidden.docker2aci.sha512-xxx (hash of the layer and file name) - file A hard link to .hidden.docker2aci.sha512-xxx - file B hard link to .hidden.docker2aci.sha512-xxx - Second docker layer - whiteout file A - the squashing algorithm lib/docker2aci.go:SquashLayers() to have two passes: - Pass one: build an in-memory map of hard links and whiteouts - Pass two: remove white-out and .hidden.docker2aci.sha512-xxx files I tested the following images from rkt/rkt#1653: - docker://albanc/busybox-hardlinks - docker://zopyx/xmldirector-plone TODO: - not optimized if there are no hard links - semantic changes on --nosquash Fixes appc#98
alban
added a commit
to alban/docker2aci
that referenced
this issue
Nov 22, 2015
Hard links and whiteout were not handled correctly in this scenario: - The first Docker layer contains: - file A - file B hard link to file A - The second Docker layer contains: - whiteout file A Then, the squashed ACI previously generated by docker2aci contained: - file B dangling hard link to file A Hence the bug. This patch changes the squashing algorithm lib/docker2aci.go:SquashLayers() to have two passes: - Pass one: build an in-memory map of hard links and whiteouts - Pass two: write the archive using the map generated in pass one I tested the following images from rkt/rkt#1653: - docker://albanc/busybox-hardlinks - docker://zopyx/xmldirector-plone Fixes appc#98
appc/docker2aci#105 is merged and #1784 added the new docker2aci code into rkt. The image zopyx/xmldirector-plone works fine in rkt now.
It will be in the next release v0.12.0. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: