Replies: 10 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 |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
catch exception to see if any |
Beta Was this translation helpful? Give feedback.
-
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.
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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:
|
Beta Was this translation helpful? Give feedback.
-
Task.ComplateTask or Task.Delay(0) |
Beta Was this translation helpful? Give feedback.
-
I never did get this working the right way, instead I used a try / catch so that I could continue on after the exception was raised. In any case, not specifically due to this unexpected behavior, but partially ... I abandoned exec in favor of another technique. Closing as I don't expect to have a chance to test for awhile. Will update here when I do get a chance. |
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions