Unverified Commit b3a664ee authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #79671 from odinuge/automated-cherry-pick-of-#78495-upstream-release-1.15

Cherry pick of #78495: Fix issues in kubelet for Aarch64 resulting in kubelet crashing on starup
parents 80b73a5d 820a717b
...@@ -51,7 +51,7 @@ const ( ...@@ -51,7 +51,7 @@ const (
// hugePageSizeList is useful for converting to the hugetlb canonical unit // hugePageSizeList is useful for converting to the hugetlb canonical unit
// which is what is expected when interacting with libcontainer // which is what is expected when interacting with libcontainer
var hugePageSizeList = []string{"B", "kB", "MB", "GB", "TB", "PB"} var hugePageSizeList = []string{"B", "KB", "MB", "GB", "TB", "PB"}
var RootCgroupName = CgroupName([]string{}) var RootCgroupName = CgroupName([]string{})
......
...@@ -200,6 +200,15 @@ func validateSystemRequirements(mountUtil mount.Interface) (features, error) { ...@@ -200,6 +200,15 @@ func validateSystemRequirements(mountUtil mount.Interface) (features, error) {
// Takes the absolute name of the specified containers. // Takes the absolute name of the specified containers.
// Empty container name disables use of the specified container. // Empty container name disables use of the specified container.
func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.Interface, nodeConfig NodeConfig, failSwapOn bool, devicePluginEnabled bool, recorder record.EventRecorder) (ContainerManager, error) { func NewContainerManager(mountUtil mount.Interface, cadvisorInterface cadvisor.Interface, nodeConfig NodeConfig, failSwapOn bool, devicePluginEnabled bool, recorder record.EventRecorder) (ContainerManager, error) {
// Mitigation of the issue fixed in master where hugetlb prefix for page sizes with "KiB"
// is "kB" in runc, but the correct is "KB"
// See https://github.com/opencontainers/runc/pull/2065
// and https://github.com/kubernetes/kubernetes/pull/78495
// for more info.
for i, pageSize := range fs.HugePageSizes {
fs.HugePageSizes[i] = strings.ReplaceAll(pageSize, "kB", "KB")
}
subsystems, err := GetCgroupSubsystems() subsystems, err := GetCgroupSubsystems()
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to get mounted cgroup subsystems: %v", err) return nil, fmt.Errorf("failed to get mounted cgroup subsystems: %v", err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment