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

@krnowak
Copy link
Collaborator

@krnowak krnowak commented Jan 15, 2016

Fixes #1568.

This is rather a complete fix code-wise, though untested. Still need to update the documentation where necessary and probably add some functional tests.

@alban
Copy link
Member

alban commented Jan 15, 2016

  • tests
  • documentation
  • changelog

Do we have a test that fetch images from several different users? E.g. 1 image fetched by 1 user, and deleted by another user, etc.

@krnowak
Copy link
Collaborator Author

krnowak commented Jan 18, 2016

The local configuration directory path is passed down to stage1. Should user config be passed there as well? This would allow us to override networking configuration. Not sure about the overriding semantics, that would be up to the stage1 implementation to decide I guess.

@krnowak krnowak force-pushed the krnowak/user-config branch from 12d4ae8 to 3b597fa Compare January 18, 2016 15:11
@alban alban added this to the v0.16.0 milestone Jan 18, 2016
@alban
Copy link
Member

alban commented Jan 18, 2016

Non-root users can run rkt fetch but not rkt run so they cannot do anything with stage1. So I don't think stage1 needs to have access to user config.

@jonboulle
Copy link
Contributor

So I don't think stage1 needs to have access to user config.

hmm? what about for the aforementioned network example?

@krnowak
Copy link
Collaborator Author

krnowak commented Jan 19, 2016

Non-root users can run rkt fetch but not rkt run so they cannot do anything with stage1. So I don't think stage1 needs to have access to user config.

I think that the problem here is that you think of --user-config's value as a config provided by non-root user, which is not a point. It is just a name (I'd like to hear suggestions for better names, though, that would convey that it is going to override local config, like local config is overriding system config). You could use --user-config flag as a root like sudo rkt --user-config=${HOME}/test-cfg run coreos.com/etcd:v2.0.10.

@jonboulle
Copy link
Contributor

Right. We need this for #1992

@krnowak
Copy link
Collaborator Author

krnowak commented Jan 19, 2016

ping @robszumski about possible better name for the --user-config flag.

CHANGELOG.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • back quotes around --user-config
  • link to the pull request
  • link to the doc. "See rkt's Global Options documentation.
  • why is it useful from a user perspective? E.g. fetching as user while keeping credentials in the user directory. Or using networking plugins installed in a different directory. (Is it correct?)

@robszumski
Copy link
Contributor

--user-config sounds ok because it matches the existing flags. Ideally it would indicate that it was a directory, so something like --user-config-dir, but its fine as is.

@krnowak
Copy link
Collaborator Author

krnowak commented Jan 21, 2016

Do we have a test that fetch images from several different users? E.g. 1 image fetched by 1 user, and deleted by another user, etc.

How about this test - https://github.com/coreos/rkt/blob/master/tests/rkt_non_root_test.go#L91 Is root there somehow special or can be treated as any other users in this case?

@alban
Copy link
Member

alban commented Jan 21, 2016

@krnowak ok. So the test already exists :)

@krnowak krnowak force-pushed the krnowak/user-config branch from e8f2b17 to e5a86c8 Compare January 21, 2016 11:58
@krnowak
Copy link
Collaborator Author

krnowak commented Jan 21, 2016

Updated, for now I decided not to forward the user config path to stage1. This needs a bit more work.

CHANGELOG.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Can be useful/It can be useful/

s/in the globally/in a globally/

@iaguis
Copy link
Member

iaguis commented Jan 21, 2016

LGTM after the nits

@krnowak krnowak force-pushed the krnowak/user-config branch from e5a86c8 to 766743f Compare January 21, 2016 12:28
@krnowak
Copy link
Collaborator Author

krnowak commented Jan 21, 2016

About config for stage1 - #2013.

iaguis added a commit that referenced this pull request Jan 21, 2016
rkt, config: Add loading configuration from user directory
@iaguis iaguis merged commit 2808525 into rkt:master Jan 21, 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.

Be able to provide the image pulling credentials per run

6 participants