Skip to content

Retrieve machine spec from cAdvisor#491

Merged
lavalamp merged 1 commit into
kubernetes:masterfrom
monnand:cadvisor-update-3
Jul 17, 2014
Merged

Retrieve machine spec from cAdvisor#491
lavalamp merged 1 commit into
kubernetes:masterfrom
monnand:cadvisor-update-3

Conversation

@monnand

@monnand monnand commented Jul 16, 2014

Copy link
Copy Markdown
Contributor

This is the third piece of #448. It allows kubelet to retrieve machine spec (number of cores, total memory capacity.) from cAdvisor. The naming here is a bit confusing now: GetMachineInfo() and GetContainerInfo() returns info.ContainerInfo; while GetMachineSpec() returns info.MachineInfo. Probably we should rename MachineInfo to MachineSpec in cAdvisor? WDYT @vmarmol?

@vmarmol

vmarmol commented Jul 16, 2014

Copy link
Copy Markdown
Contributor

Renaming that in cAdvisor SGTM

@smarterclayton

Copy link
Copy Markdown
Contributor

LGTM otherwise.

@monnand

monnand commented Jul 17, 2014

Copy link
Copy Markdown
Contributor Author

OK. Hold on this PR. Let me do a rename in cAdvisor and send another commit to this PR.

@monnand

monnand commented Jul 17, 2014

Copy link
Copy Markdown
Contributor Author

Just talked about this in google/cadvisor#92, we will only rename some functions in this PR.

  • rename GetMachineInfo to GetRootInfo
  • rename GetMachineSpec to GetMachineInfo.

PTAL.

@smarterclayton

Copy link
Copy Markdown
Contributor

Rename looks good, still need a second review from someone.

@monnand

monnand commented Jul 17, 2014

Copy link
Copy Markdown
Contributor Author

Thank you, @smarterclayton . I'll rebase it to solve the conflict

@monnand

monnand commented Jul 17, 2014

Copy link
Copy Markdown
Contributor Author

Rebased and squashed all commits. ping @lavalamp @brendandburns

Comment thread pkg/client/containerinfo.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An idea: what do you think of this one-liner?
err = json.NewDecoder(response.Body).Decode(&minfo)
(appears multiple places)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. That would be better. Let me change it.

@lavalamp

Copy link
Copy Markdown
Contributor

LGTM

@monnand

monnand commented Jul 17, 2014

Copy link
Copy Markdown
Contributor Author

@lavalamp Done. PTAL.

Comment thread pkg/kubelet/server_test.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well change here, too.

@monnand

monnand commented Jul 17, 2014

Copy link
Copy Markdown
Contributor Author

@lavalamp Just did a grep and changed all places using json en/decoder.

However, I noticed another issue: The unit test function names are not changed accordingly when we rename GetMachineInfo to GetRootInfo. I will do it in another commit. So please hold on this PR now.

@monnand

monnand commented Jul 17, 2014

Copy link
Copy Markdown
Contributor Author

@lavalamp PTAL. (Remind me to do a squash when it's ready to merge.)

@lavalamp

Copy link
Copy Markdown
Contributor

LGTM; squash and let's merge

@monnand

monnand commented Jul 17, 2014

Copy link
Copy Markdown
Contributor Author

@lavalamp Squashed. Thank you!

@monnand

monnand commented Jul 17, 2014

Copy link
Copy Markdown
Contributor Author

CI passed. ping @lavalamp

lavalamp added a commit that referenced this pull request Jul 17, 2014
Retrieve machine spec from cAdvisor
@lavalamp lavalamp merged commit f6bbcff into kubernetes:master Jul 17, 2014
@lavalamp

Copy link
Copy Markdown
Contributor

Thanks for the change!

@monnand monnand deleted the cadvisor-update-3 branch July 22, 2014 03:18
vishh pushed a commit to vishh/kubernetes that referenced this pull request Apr 6, 2016
WIP: Add utility to calculate derived stats.
damemi pushed a commit to damemi/kubernetes that referenced this pull request Jan 7, 2021
Bug 1895329: UPSTREAM: 96751: Lower the frequency of volume plugin deprecation warning
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 this pull request may close these issues.

4 participants