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

[vsphere] skip host tags for broken instances #2548

Merged

Conversation

yannmh
Copy link
Member

@yannmh yannmh commented May 26, 2016

When the vSphere check fails on an instance, its metadata -stored in the
class- may have not been populated.
Thus, the collector fails and raises a KeyError exception when
attempting to collect vSphere external host tags for the given instance,
i.e.

2016-05-23 10:10:13 Central Daylight Time | ERROR |
checks.collector(logger.pyc:19) | Uncaught exception while running run
Traceback (most recent call last):
  File "utils\logger.pyc", line 16, in wrapper
  File "checks\collector.pyc", line 486, in run
  File "checks\collector.pyc", line 699, in _populate_payload_metadata
  File "C:\Program Files (x86)\Datadog\Datadog
Agent\files\..\checks.d\vsphere.py", line 511, in get_external_host_tags
KeyError: 'foobar'

Do not raise, but log a warning instead.

When the vSphere check fails on an instance, its metadata -stored in the
class- may have not been populated.
Thus, the collector fails and raises a `KeyError` exception when
attempting to collect vSphere external host tags for the given instance,
i.e.
```
2016-05-23 10:10:13 Central Daylight Time | ERROR |
checks.collector(logger.pyc:19) | Uncaught exception while running run
Traceback (most recent call last):
  File "utils\logger.pyc", line 16, in wrapper
  File "checks\collector.pyc", line 486, in run
  File "checks\collector.pyc", line 699, in _populate_payload_metadata
  File "C:\Program Files (x86)\Datadog\Datadog
Agent\files\..\checks.d\vsphere.py", line 511, in get_external_host_tags
KeyError: 'foobar'
```

Do not raise, but log a warning instead.
@yannmh yannmh added the bugfix label May 26, 2016
@yannmh yannmh added this to the 5.9.0 milestone May 26, 2016
@truthbk
Copy link
Member

truthbk commented May 26, 2016

:shipit: ship it!

@yannmh yannmh modified the milestones: 5.8.3, 5.9.0 Jun 13, 2016
@yannmh yannmh merged commit 1d54b2d into master Jun 13, 2016
@yannmh yannmh deleted the yann/vsphere-skip-external-host-tags-broken-instances branch June 13, 2016 20:13
gmmeyer pushed a commit that referenced this pull request Jun 17, 2016
…-tags-broken-instances

[vsphere] skip host tags for broken instances
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants