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
Config execs wrong command when user.exec.args is null (as generated by kubectl config set-credentials) #3733
Comments
Here's what i think is happening:
(NOTE: as mentioned in #2112 (comment) , this |
I'm attaching the simplest possible test patch i can think of that demonstrates (on non-windows OS) the various problems with how the "stringification" of the command + arguments is handled in arg_problems_with_auth_exec.patch.txt ...this bad behavior -- stemming from the desire to wrap the configured command + args in
...
...so i don't really understand what exactly this change was expected to accomplish? I also think it's worth noting: the author of the original bug report (quarkusio/quarkus/issues/10191) that that spawned issue #2308 never confirmed that the "fix" actually resolved anything for them. (As someone who has no idea what quarkus is or how it works, i can't help but wonder if their root problem was that some wrapper script that invoked the java process where |
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions! |
This bug still exists, and is trivial to reproduce. |
On macOS it looks like this:
|
This is especially annoying because GCP moves to the new gke-gcloud-auth-plugin which uses null args. |
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions! |
@markusheiden I am very sorry, I am just seeing now your draft PRs. Any feedback on this #4381 would be appreciated. Thanks ! |
I haven't tried out either PR, because frankly I didn't feel like it was worth my time to help test out any solution that continues to use If you look at the patch file I previously attached, it not only included a test case for the specific "null argument" problem, but also modified the existing test to demonstrate how the sub-process is not (always) getting the actual list of arguments passed by the user. (or at least: it wasn't when I wrote that test patch) I'm not really that familia with the code base - but AFAICT, almost everything about PR #2381 should be reverted (the original bug report seems completely invalid, w/o any confirmation of the root cause, and the "fix" was never confirmed by the original reporter) and the code should go back to constructing a |
@sunix I didn't test your code (no time yet) but it looks very similar to my patch. Thus I assume it should fix the problem. @hossman I agree that the code quality of the ProcessBuilder-related stuff could be better: Instead of joining strings, one could simply add the args to the |
@hossman I think it is worth creating a separate issue. IMHO, it is not that straight forward, the process builder is invoking already I managed to have the test "WE SAY HELLO WORLD" in your test with the following config. Not sure it is what we expect, so we should have a separate issue to discuss and implement.
|
Describe the bug
kubectl set-credentials
(v1.23.1) can generate anexec
type user withargs: null
But when
io.fabric8.kubernetes.client.Config
parses that user info, thenull
args seems to confuse it, causing it to run the wrong command....resulting
~/.kube/config
entry...But when
io.fabric8.kubernetes.client.Config
parses that user info, thenull
args seems to confuse it, causing it to run the wrong command.Fabric8 Kubernetes Client version
5.10.1@latest
Steps to reproduce
...resulting
~/.kube/config
entry...Then attempt to use this config with
fabric8io/kubernetes-client
-- the resulting failure indicates that it is is not invoking the command correctly, and getting a syntax error fromsh
Expected behavior
fabric8io/kubernetes-client
should work with any kube config generated by thekubectl config
command lineRuntime
Kubernetes (vanilla)
Kubernetes API Server version
other (please specify in additional context)
Environment
Linux
Fabric8 Kubernetes Client Logs
Additional context
command
will ignore any arguments, and pass--exec-arg=bogus_unused_bug_workaround
tokubectl config set-credentials
so that the kube-config does not have anull
args ...The text was updated successfully, but these errors were encountered: