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

If user uses wrong image in deployment but used `--deployment` option, error is confusing. #121

itamarst opened this issue Apr 26, 2017 · 1 comment


Copy link

@itamarst itamarst commented Apr 26, 2017

What were you trying to do?

Run Telepresence against existing deployment, but I'd used wrong image name so it wasn't findable.

What did you expect to happen?

Meaningful error: "can't find any pods running the expected image datawire/telepresence-k8s:0.41, perhaps there's a typo in your Deployment spec?"

What happened instead?


Automatically included information

Command line: ['/home/itamarst/bin/telepresence', '--deployment', 'myserver', '--expose', '8080', '--run-shell']
Version: 0.41
Python version: 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609]
kubectl version: Client Version: v1.6.0
OS: Linux hexagon 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Traceback (most recent call last):
  File "/home/itamarst/bin/telepresence", line 765, in call_f
    return f(*args, **kwargs)
  File "/home/itamarst/bin/telepresence", line 885, in go
    runner, args
  File "/home/itamarst/bin/telepresence", line 540, in start_proxy
    runner, args.deployment, args.context, args.namespace
  File "/home/itamarst/bin/telepresence", line 358, in get_remote_info
  File "/home/itamarst/bin/telepresence", line 229, in __init__
IndexError: list index out of range


Running: (['kubectl', 'cluster-info'],)
Running 'ssh -V'...Running: (['which', 'torsocks'],)
Running: (['which', 'sshfs'],)
Running: (['kubectl', 'get', 'deployment', '-o', 'json', 'myserver', '--export'],)
Expected metadata for pods: {'creationTimestamp': None, 'labels': {'run': 'myserver'}}
Running: (['kubectl', 'get', 'pod', '-o', 'json', '--export'],)
Checking {'run': 'mynginx', 'pod-template-hash': '2077887059'} (phase Running)...
Labels don't match.
Checking {'run': 'myserver', 'pod-template-hash': '1178015049'} (phase Pending)...
Looks like we've found our pod!

@itamarst itamarst added the bug label Apr 26, 2017
@itamarst itamarst changed the title If user forgot to create deployment but used `--deployment` option, error is confusing. If user uses wrong image in deployment but used `--deployment` option, error is confusing. Apr 27, 2017
Copy link
Contributor Author

@itamarst itamarst commented Apr 27, 2017

If Deployment is non-existent there's also a traceback, but an easier one to understand.

itamarst added a commit that referenced this issue Apr 28, 2017
Better error messages for misconfigured Deployment.

Fixes #121.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant