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

Set cpuset for emulator during UpdateContainerResources #831

Merged
merged 2 commits into from
Dec 24, 2018
Merged

Conversation

jellonek
Copy link
Contributor

@jellonek jellonek commented Dec 18, 2018

Note: this can not work on dind, as it requires an access to system level cgroup hierarchy, while in dind case it will be limited to only node container hierarchy.


This change is Reviewable

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: 0 of 1 approvals obtained (waiting on @jellonek)


pkg/libvirttools/cpusets.go, line 41 at r1 (raw file):

// setting environment variable for vmwrapper with info about to which cpuset it should
// pin itself
func (v *VirtualizationTool) UpdateCpusetsInContainerDefinition(containerID, cpusets string) error {

// UpdateCpusetsInContainerDefinition updates libvirt domain definition for the VM
// setting the environment variable which is used by vmwrapper to pin to the specified cpuset


pkg/libvirttools/cpusets.go, line 114 at r1 (raw file):

}

func checkIfItsPidOfContainerEmulator(pid, containerID string) (bool, error) {

isEmulatorPid

also, perhaps this can be written as "TODO" for now, but this kind of check is rather weak IMO.

as discussed, should be replaced with reading /run/libvirt/qemu/DOMAIN_NAME.pid in a followup


pkg/libvirttools/cpusets.go, line 126 at r1 (raw file):

	}

	searchedTerm := "virtlet-" + containerID[:12]

searchTerm

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.

:lgtm:

Reviewed 9 of 11 files at r1, 2 of 2 files at r2.
Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @jellonek)

@ivan4th ivan4th merged commit 820f97f into master Dec 24, 2018
@ivan4th ivan4th deleted the jell/ucr branch December 24, 2018 13:02
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.

2 participants