anaconda / ae5-tools

A command-line tool for scripting AE5 actions
https://www.anaconda.com/enterprise/
BSD 3-Clause "New" or "Revised" License
9 stars 8 forks source link

SSH mode for the k8s support is broken #102

Closed mcg1969 closed 4 years ago

mcg1969 commented 4 years ago
(ae5cnt) 0591:~ mgrant$ ae5 node list --k8s-endpoint=ssh:centos
Connecting to user account mgrant@aip.anaconda.com.
Traceback (most recent call last):
  File "/Users/mgrant/miniconda3/envs/ae5cnt/bin/ae5", line 11, in <module>
    load_entry_point('ae5-tools', 'console_scripts', 'ae5')()
  File "/Users/mgrant/Repos/ae5-tools/ae5_tools/cli/main.py", line 148, in main
    cli(obj={})
  File "/Users/mgrant/miniconda3/envs/ae5cnt/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/mgrant/miniconda3/envs/ae5cnt/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/mgrant/miniconda3/envs/ae5cnt/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/mgrant/miniconda3/envs/ae5cnt/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/mgrant/miniconda3/envs/ae5cnt/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/mgrant/miniconda3/envs/ae5cnt/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/mgrant/Repos/ae5-tools/ae5_tools/cli/commands/node.py", line 25, in list
    cluster_call('node_list', **kwargs)
  File "/Users/mgrant/Repos/ae5-tools/ae5_tools/cli/login.py", line 228, in cluster_call
    result = getattr(c, method)(*args, **kwargs)
  File "/Users/mgrant/Repos/ae5-tools/ae5_tools/api.py", line 1392, in node_list
    for rec in self._k8s('node_info'):
  File "/Users/mgrant/Repos/ae5-tools/ae5_tools/api.py", line 464, in _k8s
    self._k8s_client = AE5K8SLocalClient(self.hostname, self._k8s_endpoint.split(':', 1)[1])
  File "/Users/mgrant/Repos/ae5-tools/ae5_tools/k8s/client.py", line 15, in __init__
    self.xfrm = AE5K8STransformer(url)
  File "/Users/mgrant/Repos/ae5-tools/ae5_tools/k8s/transformer.py", line 184, in __init__
    self._url = url.rstrip('/') + '/api/v1/'
AttributeError: 'NoneType' object has no attribute 'rstrip'
mcg1969 commented 4 years ago

@bkreider simple fix: your retry modification to tunneled_k8s_url dropped the return value. Can you please fix? Thanks