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

kubectl 1.14 breaks Telepresence #966

Closed
sebastianpawlak opened this Issue Mar 28, 2019 · 6 comments

Comments

5 participants
@sebastianpawlak
Copy link

sebastianpawlak commented Mar 28, 2019

What were you trying to do?

I'm trying to run telepresence with command telepresence -n=sebastian-telepresence --run-shell --also-proxy=10.128.0.17.

What did you expect to happen?

Telepresence will run.

What happened instead?

Telepresence is crashing (yesterday it was working).
(please tell us - the traceback is automatically included, see below.
use https://gist.github.com to pass along full telepresence.log)

Automatically included information

Command line: ['/usr/bin/telepresence', '-n=sebastian-telepresence', '--run-shell', '--also-proxy=10.128.0.17']
Version: 0.97
Python version: 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
kubectl version: Client Version: v1.14.0 // Server Version: v1.11.7-gke.12
oc version: (error: [Errno 2] No such file or directory: 'oc': 'oc')
OS: Linux sebastian-GL502VS 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Traceback (most recent call last):
  File "/usr/bin/telepresence/telepresence/cli.py", line 130, in crash_reporting
    yield
  File "/usr/bin/telepresence/telepresence/main.py", line 60, in main
    remote_info = start_proxy(runner)
  File "/usr/bin/telepresence/telepresence/proxy/__init__.py", line 104, in start_proxy
    run_id=run_id,
  File "/usr/bin/telepresence/telepresence/proxy/remote.py", line 156, in get_remote_info
    runner, deployment_name, deployment_type, run_id=run_id
  File "/usr/bin/telepresence/telepresence/proxy/remote.py", line 101, in get_deployment_json
    stderr=STDOUT
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Logs:

g: kubectl --context gke_xaasv2_us-central1_us-central1-dev --namespace default run --restart=Always --limits=cpu=100m,memory=256Mi --requests=cpu=25m,memory=64Mi sebastian-telepresence --image=datawire/telepresence-k8s:0.97 --labels=telepresence=14c448af73794ea28b56b1fcacaff37d
   6.8  10 | kubectl run --generator=deployment/apps.v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead.
   7.1  10 | deployment.apps/sebastian-telepresence created
   7.1 TEL | [10] captured in 1.03 secs.
   7.1 TEL | END SPAN deployment.py:61(create_new_deployment)    2.4s
   7.1 TEL | BEGIN SPAN remote.py:154(get_remote_info)
   7.1 TEL | BEGIN SPAN remote.py:78(get_deployment_json)
   7.1 TEL | [11] Capturing: kubectl --context gke_xaasv2_us-central1_us-central1-dev --namespace default get deployment -o json --export --selector=telepresence=14c448af73794ea28b56b1fcacaff37d
   7.8 TEL | END SPAN remote.py:78(get_deployment_json)    0.8s

@imbyungjun

This comment has been minimized.

Copy link

imbyungjun commented Mar 28, 2019

I got same problem.
It suddenly crashed today, and I cannot run any telepresence commands anymore.

I think that I didn't change any settings.

@sebastianpawlak

This comment has been minimized.

Copy link
Author

sebastianpawlak commented Mar 28, 2019

Probably my kubectl's version isn't compatible with kubernetes' version on GKE. But still - there is an error in telepresence and error message isn't clear.

@marrataj

This comment has been minimized.

Copy link

marrataj commented Mar 28, 2019

The --export flag is deprecated in new kubernetes version and deprecation message is shown as first line of output from kubectl --context <context> --namespace <namespace> get deployment -o json --export <service_name>

@imbyungjun

This comment has been minimized.

Copy link

imbyungjun commented Mar 28, 2019

In my case, it was known issue of kubectl v1.14. After downgrading client version to match server version, it works.

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.0", GitCommit:"ddf47ac13c1a9483ea035a79cd7c10005ff21a6d", GitTreeState:"clean", BuildDate:"2018-12-03T21:04:45Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.0", GitCommit:"ddf47ac13c1a9483ea035a79cd7c10005ff21a6d", GitTreeState:"clean", BuildDate:"2018-12-03T20:56:12Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
@codycraven

This comment has been minimized.

Copy link

codycraven commented Mar 28, 2019

I encountered this as well today. Downgrading kubectl to v1.13.x resolved.

@pmcanseco

This comment has been minimized.

Copy link

pmcanseco commented Mar 28, 2019

I also ran into this issue. kubectl 1.14 shows a deprecation warning when using --export:

$ kubectl --context <context> --namespace <namespace> get deployment -o json --export <service_name>
Flag --export has been deprecated, This flag is deprecated and will be removed in future.
{
    "apiVersion": "v1",
    "items": [
        {
            "apiVersion": "extensions/v1beta1",
            "kind": "Deployment",
    ... snipped
}

Telepresence is trying to parse this output as JSON, but the deprecation warning in the first line makes it invalid JSON. To work around this, I downgraded to kubectl 1.13 and the same kubectl command no longer outputs the deprecation warning, so telepresence starts up fine.

$ kubectl --context <context> --namespace <namespace> get deployment -o json --export <service_name>
{
    "apiVersion": "v1",
    "items": [
        {
            "apiVersion": "extensions/v1beta1",
            "kind": "Deployment",
    ... snipped
}

@ark3 ark3 changed the title Telepresence isn't starting kubectl 1.14 breaks Telepresence Mar 29, 2019

@ark3 ark3 added this to To do in Tel Tracker via automation Mar 29, 2019

@ark3 ark3 moved this from To do to In progress in Tel Tracker Apr 1, 2019

@ark3 ark3 closed this in #975 Apr 2, 2019

Tel Tracker automation moved this from In progress to Done Apr 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.