-
Notifications
You must be signed in to change notification settings - Fork 296
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
exec hangs, is there something i need to do differently so that it returns? #1349
Comments
1267 is to fix exec in kubeconfig exec is covered by e2e test csharp/tests/E2E.Tests/MinikubeTests.cs Line 718 in 66ad77d
let me know what cmd and i will try to repro |
In my sample code I just run: pwd I'll take a look at the link you provided. Only difference I see is the NamespacePodExecAsync in the minikubetests.cs has a .ConfigureAwait(false); I'll test again with that addition. |
catch exception to see if any |
It is catching an exception, reports back the line number in my code, troubleshooting ... It is executing the command successfully, so something about after it finishes running the command.
|
Tried using a 'string[] cmd = { "pwd" };' instead of a List, still the same result. Maybe a permissions error? I have:
I'll try adding watch ... adding watch didn't help. |
I tried the ExecInPod code from the example: It's giving me more information when it catches Exception:
maybe it is a permission issue tried various permissions and eventually just granted everything, still getting same error
|
Well, this was blocking my development but with catching the exception I can get back to work. As long as the command is executing suppose it doesn't matter that it's throwing an exception, can come back to figure it out later. |
Sorry for all the message, thinking out loud here, I think maybe it's my callback function returning null at the end. Need to return something more useful there maybe.
... by returning a random task it doesn't crash now with an exception, but also it never returns:
|
Task.ComplateTask or Task.Delay(0) |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Describe the bug
Running a command in a pod works, but it never returns. In the code below we never see "after exec". I saw another similar ticket, but that was resolved so not sure if its relevant: #1267
Kubernetes C# SDK Client Version
e.g.
11.0.44
Server Kubernetes Version
e.g.
1.25.9
Dotnet Runtime Version
e.g. net7
To Reproduce
Expected behavior
I expect the command to execute in the pod and then return, allowing the program to continue, but it seems the await on the Exec never returns.
Where do you run your app with Kubernetes SDK (please complete the following information):
linux, redhat9
container
onprem, kubeadm
Additional context
I tried removing code from the CallbackHandle, to instead just 'return null', in case that might help, but it didn't seem to.
The text was updated successfully, but these errors were encountered: