-
Notifications
You must be signed in to change notification settings - Fork 220
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
Adding a test for $PWD in the container #370
Conversation
Build succeeded.
|
Also FYI, I'm not sure if cgwalters/coretoolbox is affected because I couldn't get past its attempt to bind itself, but a cursory look at the code didn't raise any flags. Just mentioning because of #319 |
Hi @bureado! I'm currently looking at your PR and I'm wondering that instead of just showing the error message Toolbox could try to mount the missing path. The reason why I think this could be viable is that most paths on the host are inside of the container (they are bind-mounted in /run/host). Also now that I'm thinking about it. This seems to be kinda similar to #100 and #348. Both are a bit different but in both cases, one of the steps to solve them is to add user-specifiable bind mounts. But for now, the easiest solution is to use your approach. I'll add it to the Go version of Toolbox. |
In some cases the current directory is not available in a container. Until now if such scenario happened, then Toolbox would fail silently. The introduced test uses the 'test' utility to check if the current working directory is available. See: containers#370 Closes: containers#369
In some cases the current directory is not available in a container. Until now if such scenario happened, then Toolbox would fail silently. The introduced test uses the 'test' utility to check if the current working directory is available. See: containers#370 Closes: containers#369
In some cases the current directory is not available in a container. Until now if such scenario happened, then Toolbox would fail silently. The introduced test uses the 'test' utility to check if the current working directory is available. See: containers#370 Closes: containers#369
In some cases the current directory is not available in a container. Until now if such scenario happened, then Toolbox would fail silently. The introduced test uses the 'test' utility to check if the current working directory is available. See: containers#370 Closes: containers#369
@HarryMichal why not to commit that to |
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.
Thanks for the nice patch! I like the general approach.
5ea2d2e
to
5d9ab94
Compare
It might happen that the current working directory in the present environment is missing inside the container that's going to be used. So far, Toolbox would fail silently, which wasn't very obvious. Some changes by Debarshi Ray and Harry Míchal. containers#369
5d9ab94
to
89ff98d
Compare
Thank you for your contribution, and apologies for the delay in getting to it! |
Since v0.0.91[0] Toolbox throws an error if $PWD is not available in a toolbox. While this fixes the problem with 'toolbox enter/run' silently failing to enter/exec in a container, it still requires an action to be made by the user. I believe it is better to handle such situations more gracefully by falling back to entering the user's home folder + printing a warning about doing so. [0] containers#370
Since v0.0.91[0] Toolbox throws an error if $PWD is not available in a toolbox. While this fixes the problem with 'toolbox enter/run' silently failing to enter/exec in a container, it still requires an action to be made by the user. I believe it is better to handle such situations more gracefully by falling back to entering the user's home folder + printing a warning about doing so. [0] containers#370
Since v0.0.91[0] Toolbox throws an error if $PWD is not available in a toolbox. While this fixes the problem with 'toolbox enter/run' silently failing to enter/exec in a container, it still requires an action to be made by the user. I believe it is better to handle such situations more gracefully by falling back to entering the user's home folder + printing a warning about doing so. [0] containers#370
Since v0.0.91[0] Toolbox throws an error if $PWD is not available in a toolbox. While this fixes the problem with 'toolbox enter/run' silently failing to enter/exec in a container, it still requires an action to be made by the user. I believe it is better to handle such situations more gracefully by falling back to entering the user's home folder + printing a warning about doing so. [0] #370
This is a suggestion to address #369, input and changes welcome.
I didn't want to count on
coreutils
so rantest
insidesh
, but perhaps that's fine.