mirror of https://github.com/k3s-io/k3s.git
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 starupk3s-v1.15.3
commit
b3a664eeeb
|
@ -51,7 +51,7 @@ const (
|
|||
|
||||
// hugePageSizeList is useful for converting to the hugetlb canonical unit
|
||||
// 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{})
|
||||
|
||||
|
|
|
@ -200,6 +200,15 @@ func validateSystemRequirements(mountUtil mount.Interface) (features, error) {
|
|||
// Takes the absolute name of the specified containers.
|
||||
// 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) {
|
||||
// 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()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get mounted cgroup subsystems: %v", err)
|
||||
|
|
Loading…
Reference in New Issue