Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

Conversation

@euank
Copy link
Member

@euank euank commented Apr 5, 2016

Prior to this commit, rkt prepare would check the ondisk image even if
the --insecure-options=ondisk flag was provided.

This commit corrects that.

I wasn't sure if there was an appropriate way to unit/functional test this. It didn't seem that there was a good framework inplace for unit testing run/prepare commands, and a functional test would be nontrivial (probably corrupt the ondisk data to see that it doesn't verify?).

I'd be happy to look into this a bit more if you feel it's prudent.

Prior to this commit, `rkt prepare` would check the ondisk image even if
the `--insecure-options=ondisk` flag was provided.

This commit corrects that.
@yifan-gu
Copy link
Contributor

yifan-gu commented Apr 5, 2016

LGTM

@yifan-gu
Copy link
Contributor

yifan-gu commented Apr 5, 2016

Euan's first PR to rkt!! 🎉

I am fine if we just go merge this given that this change is straight-forward, and it works:

rkt prepare --insecure-options=image

$ time sudo ./build-rkt-1.3.0+git/bin/rkt prepare --insecure-options=image docker://nginx --exec=/bin/sh
image: using image from local store for image name coreos.com/rkt/stage1-coreos:1.1.0+git608b1d4
image: using image from local store for url docker://nginx
8a73b944-f1fb-4d2e-8075-ef7775186cdd

real    0m1.766s
user    0m2.032s
sys 0m0.400s

rkt prepare --insecure-options=image,ondisk

$ time sudo ./build-rkt-1.3.0+git/bin/rkt prepare --insecure-options=image,ondisk docker://nginx --exec=/bin/sh 
image: using image from local store for image name coreos.com/rkt/stage1-coreos:1.1.0+git608b1d4
image: using image from local store for url docker://nginx
0a80bd02-c0ee-4247-97ea-25701c54c72c

real    0m0.121s
user    0m0.044s
sys 0m0.080s

rkt run --insecure-options=image,ondisk

$ time sudo ./build-rkt-1.3.0+git/bin/rkt run --insecure-options=image,ondisk docker://nginx --exec=/bin/sh
image: using image from local store for image name coreos.com/rkt/stage1-coreos:1.1.0+git608b1d4
image: using image from local store for url docker://nginx
run: group "rkt" not found, will use default gid when rendering images
networking: loading networks from /etc/rkt/net.d
networking: loading network default with type ptp
stage1: warning: error setting journal ACLs, you'll need root to read the pod journal: group "rkt" not found

real    0m0.300s
user    0m0.052s
sys 0m0.088s

/cc @alban @iaguis

@iaguis
Copy link
Member

iaguis commented Apr 5, 2016

LGTM

@alban alban merged commit fc0f887 into rkt:master Apr 5, 2016
@alban alban mentioned this pull request Apr 15, 2016
@euank euank deleted the prepareOndisk branch December 8, 2016 18:51
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.

4 participants