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

Trying to connect to a non-existant namespace crashes #330

mdkess opened this Issue Oct 23, 2017 · 1 comment



mdkess commented Oct 23, 2017

What were you trying to do?

Use telepresence to open a shell on a non-existant namespace.

What did you expect to happen?

Probably should have said "namespace doesn't exist".

What happened instead?

(please tell us - the traceback is automatically included, see below)

Automatically included information

Command line: ['/usr/local/bin/telepresence', '--run-shell', '--namespace=asdf']
Version: 0.68
Python version: 3.6.3 (default, Oct 4 2017, 06:09:15) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
kubectl version: Client Version: v1.8.1
oc version: (error: [Errno 2] No such file or directory: 'oc': 'oc')
OS: Darwin Martin-Kess 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

Traceback (most recent call last):
  File "/usr/local/bin/telepresence", line 257, in call_f
    return f(*args, **kwargs)
  File "/usr/local/bin/telepresence", line 2370, in go
    runner, args
  File "/usr/local/bin/telepresence", line 1500, in start_proxy
    args.deployment, run_id = create_new_deployment(runner, args)
  File "/usr/local/bin/telepresence", line 1247, in create_new_deployment
    runner.get_kubectl(args.context, args.namespace, command)
  File "/usr/local/bin/telepresence", line 422, in get_kubectl
    self.kubectl(context, namespace, args), stderr=stderr
  File "/usr/local/bin/telepresence", line 395, in get_output
    result = unicode(check_output(*args, **kwargs).strip(), "utf-8")
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/", line 336, in check_output
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['kubectl', '--context', 'minikube', '--namespace', 'asdf', 'run', '--restart=Always', '--limits=cpu=100m,memory=256Mi', '--requests=cpu=25m,memory=64Mi', 'telepresence-1508786997-5178082-91856', '--image=datawire/telepresence-k8s:0.68', '--labels=telepresence=edf5fbab-54b0-49c4-83c5-970d517c2d74', '--env=TELEPRESENCE_NAMESERVER=']' returned non-zero exit status 1.


   0.0 TL | [1] Capturing: (['kubectl', '--context', 'minikube', 'cluster-info'],)...
   0.1 TL | [1] captured.
   0.1 TL | [2] Capturing: (['ssh', '-V'],)...
   0.1 TL | [2] captured.
   0.1 TL | [3] Capturing: (['which', 'torsocks'],)...
   0.1 TL | [3] captured.
   0.1 TL | [4] Capturing: (['which', 'sshfs'],)...
   0.1 TL | [4] captured.
   0.1 TL | [5] Capturing: (['kubectl', '--context', 'minikube', '--namespace', 'asdf', 'delete', '--ignore-not-found', 'all', '--selector=telepresence=edf5fbab-54b0-49c4-83c5-970d517c2d74'],)...
   0.2 TL | [5] captured.
   0.2 TL | [6] Capturing: (['kubectl', '--context', 'minikube', '--namespace', 'asdf', 'run', '--restart=Always', '--limits=cpu=100m,memory=256Mi', '--requests=cpu=25m,memory=64Mi', 'telepresence-1508786997-5178082-91856', '--image=datawire/telepresence-k8s:0.68', '--labels=telepresence=edf5fbab-54b0-49c4-83c5-970d517c2d74', '--env=TELEPRESENCE_NAMESERVER='],)...
Error from server (NotFound): namespaces "asdf" not found


This comment has been minimized.


plombardi89 commented Oct 27, 2017

Hi @mdkess thanks for the bug report. That does look like a bug and probably shouldn't happen. The Telepresence lead is off until Monday but when he returns we'll have him look at this issue.


@plombardi89 plombardi89 added the bug label Oct 27, 2017

@plombardi89 plombardi89 added this to Bugs in Roadmap Feb 21, 2018

@richarddli richarddli added this to Robustness in T Roadmap (v2) Feb 21, 2018

@rhs rhs added this to Error Feedback in Buckets Mar 8, 2018

@plombardi89 plombardi89 self-assigned this Aug 24, 2018

@ark3 ark3 closed this in d068f9c Aug 24, 2018

Roadmap automation moved this from Bugs to Completed Aug 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment