8000 stage1/init: fix docker volume semantics by iaguis · Pull Request #2409 · rkt/rkt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

stage1/init: fix docker volume semantics #2409

Merged
merged 4 commits into from
Apr 12, 2016

Conversation

iaguis
Copy link
Member
@iaguis iaguis commented Apr 12, 2016

To detect if we're running an image that was converted from docker, we
were getting annotations from the RuntimeApp. This doesn't work for the
case where the user runs rkt directly with a pod manifest, since they
can omit the annotations there.

Instead, use the ImageManifest, which is the right place to look for
annotations.

Also, fix a bug in the tests introduced by #2394 and another bug when the image is converted from docker, has a mountpoint, but the mountpoint directory is not actually included in the image.

iaguis added 4 commits April 12, 2016 13:03
If there was an implicit empty volume and the image was converted from
docker, we copy the files from the image to the volume.

However, if the image defines the mountpoint but the directory is not
actually present in the image, CopyTree will do nothing and the volume
directory won't be created, making the following Chown call fail.

We now create the directory always. If CopyTree already created it, it
doesn't hurt.
…test

We were only testing the last generated image, and the other cases
worked because there was no volume being mounted there and hence the
files were visible.

Name each test image differently so we actually do the tests.
To detect if we're running an image that was converted from docker, we
were getting annotations from the RuntimeApp. This doesn't work for the
case where the user runs rkt directly with a pod manifest, since they
can omit the annotations there.

Instead, use the ImageManifest, which is the right place to look for
annotations.
@yifan-gu
Copy link
Contributor

LGTM

@yifan-gu
Copy link
Contributor

cc @euank for another pair of eyes.

@euank
Copy link
Member
euank commented Apr 12, 2016

LGTM too

@yifan-gu yifan-gu merged commit dc96fff into rkt:master Apr 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0