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

Incorrect detection of pods managed by a kubelet #2263

Closed
zaa opened this issue Feb 12, 2016 · 3 comments · Fixed by #2512
Closed

Incorrect detection of pods managed by a kubelet #2263

zaa opened this issue Feb 12, 2016 · 3 comments · Fixed by #2512
Assignees
Milestone

Comments

@zaa
Copy link

zaa commented Feb 12, 2016

ERROR (__init__.py:762): Check 'kubernetes' instance #0 failed
 Traceback (most recent call last):
   File "/opt/datadog-agent/agent/checks/__init__.py", line 745, in run
     self.check(copy.deepcopy(instance))
   File "/opt/datadog-agent/agent/checks.d/kubernetes.py", line 150, in check
     self._update_metrics(instance, kube_settings)
   File "/opt/datadog-agent/agent/checks.d/kubernetes.py", line 240, in _update_metrics
     kube_labels = self._retrieve_kube_labels()
   File "/opt/datadog-agent/agent/checks.d/kubernetes.py", line 235, in _retrieve_kube_labels
     return get_kube_labels()
   File "/opt/datadog-agent/agent/utils/kubeutil.py", line 53, in get_kube_labels
     for pod in pods["items"]:
 TypeError: 'NoneType' object is not iterable

because:

[root@minion0 vagrant]# curl -s http://localhost:10255/pods
{"kind":"PodList","apiVersion":"v1","metadata":{},"items":null}
[root@minion0 vagrant]# cat /etc/dd-agent/conf.d/kubernetes.yaml
init_config:

instances:
  - host: localhost
    port: 4194
    method: http
    use_histogram: true
    enable_kubelet_checks: true
    kubelet_port: 10255
@remh
Copy link
Contributor

remh commented Feb 12, 2016

Thanks for this @zaa that's interesting. You have no pods running on that node ?

@remh remh added this to the Triage milestone Feb 12, 2016
@zaa
Copy link
Author

zaa commented Feb 12, 2016

@remh Yep, I am running datadog-agent on the host. The host does not have any running pods/containers at the moment.

@zaa
Copy link
Author

zaa commented Feb 12, 2016

kubelet on the node is a part of:

[root@minion0 vagrant]# kubelet --version
Kubernetes v1.1.4

@remh remh modified the milestones: 5.8.0, Triage Feb 19, 2016
@remh remh self-assigned this Apr 20, 2016
remh added a commit that referenced this issue May 17, 2016
- Adapt to new format of labels set by kube1.2 fix #2388 #2494
- Allow to blacklist labels
- Support replica sets fix #2444 #2446
- Handle case where no pods are running. Fix #2263
remh added a commit that referenced this issue May 17, 2016
- Adapt to new format of labels set by kube1.2 fix #2388 #2494
- Allow to blacklist labels
- Support replica sets fix #2444 #2446
- Handle case where no pods are running. Fix #2263
remh added a commit that referenced this issue May 17, 2016
- Enable kubelet check by default
- Remove master check for now as they are flaky, hard to enable and not used
- Adapt to new format of labels set by kube1.2 fix #2388 #2494
- Allow to blacklist labels
- Support replica sets fix #2444 #2446
- Handle case where no pods are running. Fix #2263
- Add tests for kube 1.2
remh added a commit that referenced this issue May 17, 2016
- Enable kubelet check by default
- Remove master check for now as they are flaky, hard to enable and not used
- Adapt to new format of labels set by kube1.2 fix #2388 #2494
- Allow to blacklist labels
- Support replica sets fix #2444 #2446
- Handle case where no pods are running. Fix #2263
- Add tests for kube 1.2
remh added a commit that referenced this issue May 17, 2016
- Enable kubelet check by default
- Remove master check for now as they are flaky, hard to enable and not used
- Adapt to new format of labels set by kube1.2 fix #2388 #2494
- Allow to blacklist labels
- Support replica sets fix #2444 #2446
- Handle case where no pods are running. Fix #2263
- Add tests for kube 1.2
remh added a commit that referenced this issue May 18, 2016
- Enable kubelet check by default
- Remove master check for now as they are flaky, hard to enable and not used
- Adapt to new format of labels set by kube1.2 fix #2388 #2494
- Allow to blacklist labels
- Support replica sets fix #2444 #2446
- Handle case where no pods are running. Fix #2263
- Add tests for kube 1.2
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