Skip to content

Commit 8dbb92c

Browse files
committed
Update minCpuPlatform check when re-creating e2e test intsances
1 parent daac2c6 commit 8dbb92c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: test/e2e/tests/setup_e2e_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ var (
4343
serviceAccount = flag.String("service-account", "", "Service account to bring up instance with")
4444
vmNamePrefix = flag.String("vm-name-prefix", "gce-pd-csi-e2e", "VM name prefix")
4545
architecture = flag.String("arch", "amd64", "Architecture pd csi driver build on")
46-
minCpuPlatform = flag.String("min-cpu-platform", "rome", "Minimum CPU architecture")
47-
mwMinCpuPlatform = flag.String("min-cpu-platform-mw", "sapphirerapids", "Minimum CPU architecture for multiwriter tests")
46+
minCpuPlatform = flag.String("min-cpu-platform", "AMD Rome", "Minimum CPU architecture")
47+
mwMinCpuPlatform = flag.String("min-cpu-platform-mw", "Intel Sapphire Rapids", "Minimum CPU architecture for multiwriter tests")
4848
zones = flag.String("zones", "us-east4-a,us-east4-c", "Zones to run tests in. If there are multiple zones, separate each by comma")
4949
machineType = flag.String("machine-type", "n2d-standard-4", "Type of machine to provision instance on")
5050
imageURL = flag.String("image-url", "projects/ubuntu-os-cloud/global/images/family/ubuntu-minimal-2404-lts-amd64", "OS image url to get image from")
@@ -56,7 +56,7 @@ var (
5656
// Multi-writer is only supported on M3, C3, and N4
5757
// https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms#hd-multi-writer
5858
hdMachineType = flag.String("hyperdisk-machine-type", "c3-standard-4", "Type of machine to provision instance on")
59-
hdMinCpuPlatform = flag.String("hyperdisk-min-cpu-platform", "sapphirerapids", "Minimum CPU architecture")
59+
hdMinCpuPlatform = flag.String("hyperdisk-min-cpu-platform", "Intel Sapphire Rapids", "Minimum CPU architecture")
6060

6161
testContexts = []*remote.TestContext{}
6262
hyperdiskTestContexts = []*remote.TestContext{}

Diff for: test/remote/instance.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,23 @@ func (i *InstanceInfo) GetLocalSSD() int64 {
8686

8787
func machineTypeMismatch(curInst *compute.Instance, newInst *compute.Instance) bool {
8888
if !strings.Contains(curInst.MachineType, newInst.MachineType) {
89-
klog.Infof("Machine type mismatch")
89+
klog.Infof("Machine type mismatch (current: %v, new: %v)", curInst.MachineType, newInst.MachineType)
9090
return true
9191
}
9292
// Ideally we could compare to see if the new instance has a greater minCpuPlatfor
9393
// For now we just check it was set and it's different.
9494
if curInst.MinCpuPlatform != "" && curInst.MinCpuPlatform != newInst.MinCpuPlatform {
95-
klog.Infof("CPU Platform mismatch")
95+
klog.Infof("CPU Platform mismatch (current: %v, new: %v)", curInst.MinCpuPlatform, newInst.MinCpuPlatform)
9696
return true
9797
}
9898
if (curInst.ConfidentialInstanceConfig != nil && newInst.ConfidentialInstanceConfig == nil) ||
9999
(curInst.ConfidentialInstanceConfig == nil && newInst.ConfidentialInstanceConfig != nil) ||
100100
(curInst.ConfidentialInstanceConfig != nil && newInst.ConfidentialInstanceConfig != nil && curInst.ConfidentialInstanceConfig.EnableConfidentialCompute != newInst.ConfidentialInstanceConfig.EnableConfidentialCompute) {
101-
klog.Infof("Confidential compute mismatch")
101+
klog.Infof("Confidential compute mismatch (current: %v, new: %v)", curInst.ConfidentialInstanceConfig, newInst.ConfidentialInstanceConfig)
102102
return true
103103
}
104104
if curInst.SourceMachineImage != newInst.SourceMachineImage {
105-
klog.Infof("Source Machine Mismatch")
105+
klog.Infof("Source Machine Mismatch (current: %v, new: %v)", curInst.SourceMachineImage, newInst.SourceMachineImage)
106106
return true
107107
}
108108
return false

0 commit comments

Comments
 (0)