Skip to content

Commit 9a4231d

Browse files
authored
Merge pull request containerd#9961 from zhanluxianshen/clean-cri-opts
Clean cri options and useless parms
2 parents 2986e45 + df26c18 commit 9a4231d

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

internal/cri/opts/spec_linux_opts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ func WithResources(resources *runtime.LinuxContainerResources, tolerateMissingHu
357357
s.Linux.Resources.CPU.Cpus = cpus
358358
}
359359
if mems := resources.GetCpusetMems(); mems != "" {
360-
s.Linux.Resources.CPU.Mems = resources.GetCpusetMems()
360+
s.Linux.Resources.CPU.Mems = mems
361361
}
362362
if limit != 0 {
363363
s.Linux.Resources.Memory.Limit = &limit

internal/cri/server/container_create.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,6 @@ func (c *criService) buildContainerSpec(
556556
id,
557557
sandboxID,
558558
sandboxPid,
559-
netNSPath,
560559
containerName,
561560
imageName,
562561
config,
@@ -568,9 +567,7 @@ func (c *criService) buildContainerSpec(
568567
)
569568
case isWindows:
570569
specOpts, err = c.buildWindowsSpec(
571-
id,
572570
sandboxID,
573-
sandboxPid,
574571
netNSPath,
575572
containerName,
576573
imageName,
@@ -579,11 +576,9 @@ func (c *criService) buildContainerSpec(
579576
imageConfig,
580577
extraMounts,
581578
ociRuntime,
582-
runtimeHandler,
583579
)
584580
case isDarwin:
585581
specOpts, err = c.buildDarwinSpec(
586-
id,
587582
sandboxID,
588583
containerName,
589584
imageName,
@@ -592,7 +587,6 @@ func (c *criService) buildContainerSpec(
592587
imageConfig,
593588
extraMounts,
594589
ociRuntime,
595-
runtimeHandler,
596590
)
597591
default:
598592
return nil, fmt.Errorf("unsupported spec platform: %s", platform.OS)
@@ -609,7 +603,6 @@ func (c *criService) buildLinuxSpec(
609603
id string,
610604
sandboxID string,
611605
sandboxPid uint32,
612-
netNSPath string,
613606
containerName string,
614607
imageName string,
615608
config *runtime.ContainerConfig,
@@ -839,9 +832,7 @@ func (c *criService) buildLinuxSpec(
839832
}
840833

841834
func (c *criService) buildWindowsSpec(
842-
id string,
843835
sandboxID string,
844-
sandboxPid uint32,
845836
netNSPath string,
846837
containerName string,
847838
imageName string,
@@ -850,7 +841,6 @@ func (c *criService) buildWindowsSpec(
850841
imageConfig *imagespec.ImageConfig,
851842
extraMounts []*runtime.Mount,
852843
ociRuntime criconfig.Runtime,
853-
runtimeHandler *runtime.RuntimeHandler,
854844
) (_ []oci.SpecOpts, retErr error) {
855845
var specOpts []oci.SpecOpts
856846
specOpts = append(specOpts, customopts.WithProcessCommandLineOrArgsForWindows(config, imageConfig))
@@ -936,7 +926,6 @@ func (c *criService) buildWindowsSpec(
936926
}
937927

938928
func (c *criService) buildDarwinSpec(
939-
id string,
940929
sandboxID string,
941930
containerName string,
942931
imageName string,
@@ -945,7 +934,6 @@ func (c *criService) buildDarwinSpec(
945934
imageConfig *imagespec.ImageConfig,
946935
extraMounts []*runtime.Mount,
947936
ociRuntime criconfig.Runtime,
948-
runtimeHandler *runtime.RuntimeHandler,
949937
) (_ []oci.SpecOpts, retErr error) {
950938
specOpts := []oci.SpecOpts{
951939
customopts.WithProcessArgs(config, imageConfig),

0 commit comments

Comments
 (0)