Skip to content

Conversation

keyingliu
Copy link
Contributor

@keyingliu keyingliu commented Dec 25, 2018

If virtlet pod is deleted, the qemu instances will be killed by kubelet for some cases. See #830 for more details.

Not sure whether libvirt itself can manage hugetlb cgroup, this is a temp fix, just FYI for those who met same issue.


This change is Reviewable

Copy link
Contributor

@jellonek jellonek left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r1.
Reviewable status: 0 of 1 approvals obtained

@pigmej
Copy link
Contributor

pigmej commented Jan 4, 2019

@ivan4th any ideas about it?

Copy link
Contributor

@ivan4th ivan4th left a comment

Choose a reason for hiding this comment

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

Maybe this code shouldn't fail hard if the hugetlb controller is missing (CONFIG_CGROUP_HUGETLB not set for the host kernel)?

Reviewable status: :shipit: complete! 1 of 1 approvals obtained

Copy link
Contributor

@ivan4th ivan4th left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 2 of 1 approvals obtained (waiting on @keyingliu)

a discussion (no related file):
Oops approved by accident, need to resolve the above issue


@keyingliu
Copy link
Contributor Author

@ivan4th if hugetlb is not set, the code only prints an error message and doesn't fail.

if the error message is not acceptable, the code needs to be:

	if _, err := cgroups.GetProcessController(os.Getpid(), "hugetlb"); err == nil {
		err = cgroups.MoveCGroup(os.Getpid(), "hugetlb", "/")
		if err != nil {
			glog.Errorf("failed to move pid into hugetlb path /: %v", err)
		}
	}

Which one do you prefer?

@jellonek
Copy link
Contributor

Please rebase the branch on top of the master branch.

@keyingliu
Copy link
Contributor Author

close this PR will file a new one.

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