-
Notifications
You must be signed in to change notification settings - Fork 221
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
RFE: Migration path for users of coreos/toolbox #689
Comments
We have from time to time discussed some sort of configuration file for Toolbox. It could either be used to tweak the behaviour of I see that ~/.toolboxrc is only about changing the name of the default container and the image, and is a shell snippet that's easily sourced into another shell script. Even if we come up with a different format for the configuration file going forward, I could imagine some migration path where if only |
What did you mean by retaining the same behaviour as It will be helpful if someone who had been extensively using There could be different ways in which we can ensure compatibility with the command line UI. We could either teach |
I second the questions raised by @debarshiray. I'm just wondering if adding support for
I'm aware of the fact that it is not wise to just remove a feature (even though it is replaced by an adequate substitution) without giving any deprecation warning to users. I just remembered one thing that will most likely need a mention in the documentation. I believe I'll return again to the first paragraph. Even though I don't think we don't need a configuration file for setting those 3 environmental variables, I think we do need a configuration file. I already have an idea how can that be implemented but that is for a different ticket. |
My main thought was around the various volume mounts and options that are passed to I think the idea of a wrapper script that calls out to An example user story: I am a customer that installed OCP 4.5. During the operation of my cluster, I have customized my
Right, this gets to the crux of my concern about moving RHCOS to include |
cc: @travier @control-d |
It's worth noting that |
Also submitted #713 |
The following pull requests makes things more compatible with |
This is meant to get a better understanding of a failed 'podman pull' invocation to understand whether pulling an image requires logging into the registry or not. Currently, 'podman pull' doesn't have a dedicated exit code to denote authorization errors, so this is meant to be a temporary workaround for that. Parsing the error stream is inherently fragile and tricky because there's no guarantee that the structure of the messages won't change, and there's no clear definition of how the messages are laid out. Therefore, this approach can't be treated as a generic solution for getting detailed information about failed Podman invocations. The error stream is used not only for dumping error messages, but also for showing progress bars. Therefore, all lines are skipped until one that starts with "Error: " is found. This is a heuristic based on how Go programs written using the Cobra [1] library tend to report errors. All subsequent lines are taken together and split around the ": " sub-string, on the assumption that the ": " sub-string is used when a new error message is prefixed to an inner error. Each sub-string created from the split is treated as a potential member of the chain of errors reported within Podman. Some real world examples of the 'podman pull' error stream in the case of authorization errors are: * With Docker Hub (https://hub.docker.com/): Trying to pull docker.io/library/foobar:latest... Error: Error initializing source docker://foobar:latest: Error reading manifest latest in docker.io/library/foobar: errors: denied: requested access to the resource is denied unauthorized: authentication required * With registry.redhat.io: Trying to pull registry.redhat.io/foobar:latest... Error: Error initializing source docker://registry.redhat.io/foobar:latest: unable to retrieve auth token: invalid username/password: unauthorized: Please login to the Red Hat Registry using your Customer Portal credentials. Further instructions can be found here: https://access.redhat.com/RegistryAuthentication [1] https://github.com/spf13/cobra/ https://pkg.go.dev/github.com/spf13/cobra containers#689 containers#786 containers#787
This way the standard error stream of the spawned binaries can be inspected to get a better understanding of the failure, while still being shown to the user when run with the '--verbose' flag. Unfortunately, this breaks the progress bar in 'podman pull' because the standard error stream is no longer connected to a file descriptor that's a terminal device. containers#689 containers#787 containers#823
A subsequent commit will use this when retrying the 'podman pull' after logging the user into the registry for images that require authorization. containers#689 containers#787
Some registries contain private repositories of images and require the user to log in first to gain access. With this Toolbox tries to recognize errors when pulling images and offers the user the means to log in. Some changes by Debarshi Ray. containers#689 containers#787
Testing of this feature is tricky as it relies on network which is inherently flaky. So, as part of the setup two local image registries are created and these features can be tested against them. To prevent the removal of the registries during testing a different root for Podman is used. The only tested registry implementation is Docker[0]. [0] https://hub.docker.com/_/registry/ containers#689 containers#787
The new additions to the system tests makes them take longer to run, and was causing them to timeout. containers#689 containers#787
From 6c86cab, will this still ask for container creation first time? |
For the configuration file, having the classic pattern of: |
The only supported options from the legacy
From https://github.com/coreos/toolbox/blob/main/rhcos-toolbox#L157..L159 |
The new format could have the following options/format:
|
It seems nice if we support all of that but it doesn't seem like a hard blocker to me, we could just carry a bit of code that does e.g.: |
Yes, it will. It can be overridden by the |
Support for configuration files was added through PRs #828 and #851
Currently, it does However, I do like the idea of putting OS controlled configuration in The format is TOML, yes. :) However, it doesn't support the |
#827 bind mounts the entire However, we don't set the I think a better long-term option would be to teach tools (eg., sos) to natively work with Toolbox containers by looking for the |
Is there anything else? :) |
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. The commit repurposes the test work I did for a rejected feature on registry authentication. A registry is started locally and the use of auth file is tested against it. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
#935 adds support for Next step would be to add a configuration file knob. |
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Slightly adjusts the format of system tests README. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Slightly adjusts the format of system tests README. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Slightly adjusts the format of system tests README. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Slightly adjusts the format of system tests README. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Slightly adjusts the format of system tests README. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Slightly adjusts the format of system tests README. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Slightly adjusts the format of system tests README. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
The option accepts a path to a file that is passed to an internal call to 'podman pull' via the '--authfile' option. This will make it easier to pull images from registries with authentication in-place. Fixes containers#689 containers#935
Do we have a way to specify the default image to pull in toolbox via a configuration file? If we don't have that yet, we'll need to re-open this issue as we need that for OCP/OKD where we use a different image than the default. |
Yes, we do! We added it two years ago because RHEL 8 and 9 also overrides the default image. :) See:
Interesting. Is that image public? I am curious to see how well Toolbx works with it. |
The image is registry.redhat.io/rhel9/support-tools
There would also need to be some way to force it to run as root when someone accidentally runs it as the |
Speaking from the Red Hat Enterprise Linux perspective, the For details, see: Just to be sure, these changes are only for RHEL 10 onwards. RHELs 8 and 9 will continue to set the I have filed a SoS pull request to remove the need for setting the I don't know how you want to handle this for Red Hat OpenShift Container Platform. Currently,
Hopefully it won't be necessary to set
Is it really necessary to set the Toolbx containers expose the same information in the
Bind mounting the entire
Toolbx containers have
We can't bind mount
Toolbx puts this in
This sounds like something that needs to be handled outside Toolbx proper? The easiest solution might be to make the |
Anyway, at this point, I think we need to let this issue be. :) It started out as somewhat generic, and was later scoped down to the Let's continue to discuss downstream specific issues in their respective venues, and feel free to file new issues or pull requests for any new upstream work that needs to be done. |
Is your feature request related to a problem? Please describe.
In RHCOS, we are shipping https://github.com/coreos/toolbox in the OS and we want to move to shipping
containers/toolbox
in its place. In order to do that, we need to ensure that the upgrade path is smooth, astoolbox
is heavily utilized by the Red Hat Support organization for gathering debug information.Describe the solution you'd like
I see two requirements for RHCOS users:
.toolboxrc
filescoreos/toolbox
Describe alternatives you've considered
The CoreOS team is currently maintaining the bash script implementation over at
coreos/toolbox
and we could continue to do so.Additional context
FWIW, I don't expect the
containers/toolbox
team to work on this alone. Please reach out to the CoreOS team to help with the work.The text was updated successfully, but these errors were encountered: