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

Fix parsing of units in Kubernetes resource quantities #2908

Merged
merged 1 commit into from
Oct 19, 2016

Conversation

therc
Copy link
Contributor

@therc therc commented Oct 12, 2016

This fixes parsing of resource quantities in Kubernetes resources and limits. Right now suffixes like G, M, m, etc. get simply ignored, leading to wrong numbers (unless you manage to always end up with absolute bytes/CPU numbers without any units).

It's based on the second part of #2766, but with some optimizations (precomputing stuff once at the module level).

@therc
Copy link
Contributor Author

therc commented Oct 12, 2016

cc @markine

@masci masci added this to the 5.9.2 milestone Oct 13, 2016
@masci masci self-assigned this Oct 17, 2016
@olivielpeau olivielpeau modified the milestones: 5.10.0, 5.9.2 Oct 18, 2016
@markine
Copy link
Contributor

markine commented Oct 18, 2016

Any updates here? I'm attempting a rebase of #2766 against latest and will be using this patch.

markine added a commit to AltSchool/dd-agent that referenced this pull request Oct 18, 2016
@masci masci merged commit 1e0f088 into DataDog:master Oct 19, 2016
@masci
Copy link
Contributor

masci commented Oct 19, 2016

@markine thanks for the heads up, merged

masci pushed a commit that referenced this pull request Oct 21, 2016
* Add patch from #2908 #2908 to beter handle units.

* Port change from DataDog/dd-agent #2766

* Move machine info URL management into kubeutil

* Update kubernetes tests for capacity data.
jcejohnson pushed a commit to EFXCIA/dd-agent that referenced this pull request Oct 24, 2016
jcejohnson pushed a commit to EFXCIA/dd-agent that referenced this pull request Oct 24, 2016
* Add patch from DataDog#2908 DataDog#2908 to beter handle units.

* Port change from DataDog/dd-agent DataDog#2766

* Move machine info URL management into kubeutil

* Update kubernetes tests for capacity data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants