@@ -509,12 +509,16 @@ func (b *CPUBurst) applyCPUBurst(burstCfg *slov1alpha1.CPUBurstConfig, podMeta *
509509 containerCFSBurstValStr := strconv .FormatInt (containerCFSBurstVal , 10 )
510510 updater := NewCommonCgroupResourceUpdater (ownerRef , containerDir , system .CPUBurst , containerCFSBurstValStr )
511511 updated , err := b .executor .UpdateByCache (updater )
512- if err != nil {
512+ if err == nil {
513+ klog .V (5 ).Infof ("apply container %v/%v/%v cpu burst value success, dir %v, value %v" ,
514+ pod .Namespace , pod .Name , containerStat .Name , containerDir , containerCFSBurstVal )
515+ } else if system .HostSystemInfo .IsAnolisOS {
516+ // cgroup `cpu.burst_us` is expected available on anolis os, and it may not exist in other kernels.
513517 klog .Infof ("update container %v/%v/%v cpu burst failed, dir %v, updated %v, error %v" ,
514518 pod .Namespace , pod .Name , containerStat .Name , containerDir , updated , err )
515519 } else {
516- klog .V (5 ).Infof ("apply container %v/%v/%v cpu burst value success , dir %v, value %v" ,
517- pod .Namespace , pod .Name , containerStat .Name , containerDir , containerCFSBurstVal )
520+ klog .V (4 ).Infof ("update container %v/%v/%v cpu burst ignored on non Anolis OS , dir %v, " +
521+ "updated %v, info %v" , pod .Namespace , pod .Name , containerStat .Name , containerDir , updated , err )
518522 }
519523 }
520524 } // end for containers
@@ -525,12 +529,16 @@ func (b *CPUBurst) applyCPUBurst(burstCfg *slov1alpha1.CPUBurstConfig, podMeta *
525529 podCFSBurstValStr := strconv .FormatInt (podCFSBurstVal , 10 )
526530 updater := NewCommonCgroupResourceUpdater (ownerRef , podDir , system .CPUBurst , podCFSBurstValStr )
527531 updated , err := b .executor .UpdateByCache (updater )
528- if err != nil {
532+ if err == nil {
533+ klog .V (5 ).Infof ("apply pod %v/%v cpu burst value success, dir %v, value %v" ,
534+ pod .Namespace , pod .Name , podDir , podCFSBurstValStr )
535+ } else if system .HostSystemInfo .IsAnolisOS {
536+ // cgroup `cpu.burst_us` is expected available on anolis os, and it may not exist in other kernels.
529537 klog .Infof ("update pod %v/%v cpu burst failed, dir %v, updated %v, error %v" ,
530538 pod .Namespace , pod .Name , podDir , updated , err )
531539 } else {
532- klog .V (5 ).Infof ("apply pod %v/%v cpu burst value success , dir %v, value %v" ,
533- pod .Namespace , pod .Name , podDir , podCFSBurstValStr )
540+ klog .V (4 ).Infof ("update pod %v/%v cpu burst ignored on non Anolis OS , dir %v, updated %v, " +
541+ "info %v" , pod .Namespace , pod .Name , podDir , updated , err )
534542 }
535543 }
536544}
0 commit comments