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

IR stack dump for a Consul service with no endpoints #1532

Closed
ewbankkit opened this issue May 13, 2019 · 0 comments · Fixed by #1536
Closed

IR stack dump for a Consul service with no endpoints #1532

ewbankkit opened this issue May 13, 2019 · 0 comments · Fixed by #1536
Assignees

Comments

@ewbankkit
Copy link
Contributor

Describe the bug
I have configured a service with an Ambassador Mapping that points to a ConsulResolver.
For some reason (I'm still investigating) in the IR phase I get the error:

2019-05-10 13:31:18 diagd 0.61.0 [P53TAmbassadorEventWatcher] ERROR: cluster_demo_app_er_round_robin: <RichStatus BAD error=no endpoints found, disabling cluster hostname=ambassador-poc-6dfb5959df-gt98k version=0.61.0>

which comes from this code: https://github.com/datawire/ambassador/blob/e693d96a0df01e9e9dce79e98b6cf0fcfd5ae02e/ambassador/ambassador/ir/ircluster.py#L280-L296

but then there is a stack dump:

2019-05-10 13:31:18 diagd 0.61.0 [P53TAmbassadorEventWatcher] ERROR: could not reconfigure: 'targets'
2019-05-10 13:31:18 diagd 0.61.0 [P53TAmbassadorEventWatcher] ERROR: 'targets'
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/ambassador-0.0.0.dev0-py3.6.egg/ambassador_diag/diagd.py", line 590, in run
    self.load_config_watt(rqueue, url)
  File "/usr/lib/python3.6/site-packages/ambassador-0.0.0.dev0-py3.6.egg/ambassador_diag/diagd.py", line 708, in load_config_watt
    self._load_ir(rqueue, aconf, fetcher, scc, snapshot)
  File "/usr/lib/python3.6/site-packages/ambassador-0.0.0.dev0-py3.6.egg/ambassador_diag/diagd.py", line 797, in _load_ir
    self.check_scout("update")
  File "/usr/lib/python3.6/site-packages/ambassador-0.0.0.dev0-py3.6.egg/ambassador_diag/diagd.py", line 819, in check_scout
    feat = ir.features()
  File "/usr/lib/python3.6/site-packages/ambassador-0.0.0.dev0-py3.6.egg/ambassador/ir/ir.py", line 583, in features
    cluster_endpoints = cluster.urls if (lb_type == 'kube') else cluster.targets
  File "/usr/lib/python3.6/site-packages/ambassador-0.0.0.dev0-py3.6.egg/ambassador/resource.py", line 94, in __getattr__
    return self[key]
KeyError: 'targets'

which comes from:

https://github.com/datawire/ambassador/blob/e693d96a0df01e9e9dce79e98b6cf0fcfd5ae02e/ambassador/ambassador/ir/ir.py#L583

Expected behavior
Some better error handling somewhere.

Versions (please complete the following information):

  • Ambassador: 0.61.0
  • Kubernetes environment BYO Kubernetes on AWS
  • Version 1.14

Additional context
I did not see this with Ambassador v0.60.3.

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

Successfully merging a pull request may close this issue.

2 participants