Skip to content
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

Pod exec broken since 0.22.0 #103

Open
bruceigt opened this issue Feb 9, 2022 · 6 comments
Open

Pod exec broken since 0.22.0 #103

bruceigt opened this issue Feb 9, 2022 · 6 comments

Comments

@bruceigt
Copy link
Contributor

bruceigt commented Feb 9, 2022

The exec function for pod repositories has been broken since version 0.22.0, instead of command output you get:

[
     "kind" => "Status",
     "apiVersion" => "v1",
     "metadata" => [],
     "status" => "Failure",
     "message" => "Upgrade request required",
     "reason" => "BadRequest",
     "code" => 400,
   ]

From what I can see the issue seems to be in Client.php, it seems like it's waiting for a HttpTransferException to be thrown before running the function to upgrade the request, but for whatever reason the exception isn't being thrown.

@danijelk
Copy link
Contributor

Indeed this is where it all begins, moving error 400 outside the exception and into the try{}, gives a ratched/pawl issue, as the current version of maclof client uses old 0.3 ratchet, it fails further down the line. Not sure if this project is stale?

@maclof
Copy link
Owner

maclof commented Jun 15, 2022

@danijelk not stale, just havn't been able to work on it much recently
I'll try and take a look at all issues as soon as I can :)

@danijelk
Copy link
Contributor

danijelk commented Jun 15, 2022

@danijelk not stale, just havn't been able to work on it much recently I'll try and take a look at all issues as soon as I can :)

Great to hear, will try to help as much as I can, debugging ws isn't my strength.

Progress so far:

Currently trying to figure out why I cannot see any $messages from the wss connection made here, not sure if it's a fw issue towards aws k8s or something else.

@maclof
Copy link
Owner

maclof commented Jun 15, 2022

This was kind of a pain to get working in the first instance, so honestly i'm not surprised
Appreciate the help though :)

@danijelk
Copy link
Contributor

Eek, so yea the new smart $httpClient where the verify = false is set, is no longer available in Client.php making the code obsolete will see what the best workaround would be since we cannot access the httpClients options as I see it

@danijelk
Copy link
Contributor

Works! Time to get some sleep :)

https://github.com/vemcogroup/kubernetes-client/compare/0.26.0...0.26.1

So the issue was that now we use the httpClient, but this implementation doesn't give us access to check it's config such as verification/certs, thus making it impossible to transfer the config to the crucial websocket builder. Feel free to merge my changes, or think of a cleaner way to keep options set only in one place, as now we need to do it in 2 places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants