-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix registry local_user functionalitity. #353
Conversation
Docker uses $HOME environment variable to determine docker.json location. Having /root as as standard $HOME, local_user functionality is broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a better approach is to introduce another param, with the default for ROOT that can be overridden if you're not using the root user.
|
@davejrt Thanks for you response! What would be the use case for a home directory that does not match the user's home directory? Feels more or less like double configuration (both user and user's home) to me. |
|
I've not tested it with an alternate user, so I suppose I am looking to ensure that any edge cases are covered off where an execution using another user would break something. |
|
For now, using local_user simply does not work unless the user is privileged to write to If you want me to change the PR anyways as you suggested, I will. I suggest to keep it this way: making |
Tested with alternate user and currently it's broken, I can't upgrade to latest version due to exactly this issue. I agree with @stejanse no point to have $HOME configurable. |
|
I've tested this and don't have any issue with this code as such. I'm interested to see the rest of your workflow, are you then using something else to pull images onto the box using your local user? My testing didn't allow for the images to be pulled as the script is executed as root. |
Not sure I understand the question. My use case is simple, having a user (other than root) to be able to pull/push images to/from registry. @davejrt does this make sense? |
|
It makes sense, but I don't know why you'd want to break your puppet workflow by doing half the job with Puppet, when it would make more sense to allow the user to push/pull images within the scope of the module. |
Without going into detail of our architecture, briefly we have CI processes that are responsible to push images. But regardless, how we do it or not, how it relates to the this issue. Currently configuring private registries with non-root is broken and we need to fix that. This PR seems like fix the original problem without breaking any other flow, or I misunderstood something? @davejrt what should be done in your opinion to have this merged? |
|
I know it doesn't break anything else, but in my opinion it feels like this PR only adds half of the functionality required to be able to complete the whole job with Puppet, which is ideally what we want to support in our modules. |
|
@davejrt yep I see what you mean. You need this when using I think originally (before this repo forked the original one) support for I agree with you, we should fix this whole thing like you suggest, BUT first we maybe need to fix the regression that was introduced since version |
|
@shamil Thanks for pointing that out. I've just reviewed the changes and you're correct in that this was a breaking change that we introduced. Merging this now with an aim in the future to add something to complete the workflow with alternate users. |
Docker uses $HOME environment variable to determine docker.json location.
Having /root as as standard $HOME, local_user functionality is broken.