Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

agent: auto-online hotplug memory#364

Merged
sboeuf merged 1 commit intokata-containers:masterfrom
bergwolf:online
Sep 14, 2018
Merged

agent: auto-online hotplug memory#364
sboeuf merged 1 commit intokata-containers:masterfrom
bergwolf:online

Conversation

@bergwolf
Copy link
Copy Markdown
Member

Kata agent does not wait for memory hotplug, and kata-runtime
does not wait on cpu/memory online. As a temporary fix, let's
make sure memory are onlined by the uevent listener at least.

Fixes: #363

Kata agent does not wait for memory hotplug, and kata-runtime
does not wait on cpu/memory online. As a temporary fix, let's
make sure memory are onlined by the uevent listener at least.

Fixes: kata-containers#363

Signed-off-by: Peng Tao <bergwolf@gmail.com>
@egernst egernst added the review label Sep 12, 2018
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 12, 2018

Codecov Report

Merging #364 into master will decrease coverage by 0.3%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #364      +/-   ##
==========================================
- Coverage   47.21%   46.91%   -0.31%     
==========================================
  Files          15       15              
  Lines        2442     2413      -29     
==========================================
- Hits         1153     1132      -21     
+ Misses       1140     1137       -3     
+ Partials      149      144       -5

@gnawux
Copy link
Copy Markdown
Member

gnawux commented Sep 12, 2018

nice
LGTM

Approved with PullApprove

@devimc
Copy link
Copy Markdown

devimc commented Sep 12, 2018

cc @clarecch @linzichang

Copy link
Copy Markdown

@sboeuf sboeuf left a comment

Choose a reason for hiding this comment

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

Looks good to me, but please split into 2 commits.

// We only care about add event
if uEv.Action != "add" {
continue
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please put this in a separate commit, as this is not related to the uevent for memory.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Why ask for splitting a commit into two? The checks MUST be separated otherwise I have to check it again when testing for memory online path.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ah ok I understand.


// Check if device hotplug event results in a device node being created.
if uEv.DevName != "" && uEv.Action == "add" && strings.HasPrefix(uEv.DevPath, rootBusPath) {
if uEv.DevName != "" && strings.HasPrefix(uEv.DevPath, rootBusPath) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same thing here, this should go to a separate commit.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Same here. It IS a single commit.

@linzichang
Copy link
Copy Markdown
Contributor

I have a question. Will this face the same question I found at kata-containers/runtime#624 (comment) ?

@bergwolf
Copy link
Copy Markdown
Member Author

@linzichang Are you referring to the systemd udev issue? For one thing, the commit does not make things worse and it actually fixes the -m memory hotplug issue I'm seeing with vm factory. For another thing, I think systemd udev should be disabled, otherwise the uevent listener with device map approach is broken, ditto the cpu online waiting logic.

@linzichang
Copy link
Copy Markdown
Contributor

@bergwolf The main issue is onlineCPUResources conflicting with other online method. See https://github.com/kata-containers/agent/blob/master/grpc.go#L145 . Your changes just care about memory, so it wouldn't be a problem :) But the udev should be disabled.

@sboeuf
Copy link
Copy Markdown

sboeuf commented Sep 14, 2018

Travis is stuck as for a bunch of other PRs. Ignoring for now and merging this

@sboeuf sboeuf merged commit d7a1fc3 into kata-containers:master Sep 14, 2018
@egernst egernst removed the review label Sep 14, 2018
@bergwolf bergwolf deleted the online branch April 8, 2019 08:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

workaround memory hotplug online

6 participants