Skip to content

Update minCpuPlatform check when re-creating e2e test intsances #2005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion deploy/kubernetes/images/stable-master/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ metadata:
name: imagetag-csi-snapshotter
imageTag:
name: registry.k8s.io/sig-storage/csi-snapshotter
newTag: "v7.0.2"
newName: us-central1-docker.pkg.dev/psch-joonix/psch-csi-snapshotter-testing/csi-snapshotter
newTag: "it-testing3"
---

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

testContexts = []*remote.TestContext{}
hyperdiskTestContexts = []*remote.TestContext{}
Expand Down
8 changes: 4 additions & 4 deletions test/remote/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,23 @@ func (i *InstanceInfo) GetLocalSSD() int64 {

func machineTypeMismatch(curInst *compute.Instance, newInst *compute.Instance) bool {
if !strings.Contains(curInst.MachineType, newInst.MachineType) {
klog.Infof("Machine type mismatch")
klog.Infof("Machine type mismatch (current: %v, new: %v)", curInst.MachineType, newInst.MachineType)
return true
}
// Ideally we could compare to see if the new instance has a greater minCpuPlatfor
// For now we just check it was set and it's different.
if curInst.MinCpuPlatform != "" && curInst.MinCpuPlatform != newInst.MinCpuPlatform {
klog.Infof("CPU Platform mismatch")
klog.Infof("CPU Platform mismatch (current: %v, new: %v)", curInst.MinCpuPlatform, newInst.MinCpuPlatform)
return true
}
if (curInst.ConfidentialInstanceConfig != nil && newInst.ConfidentialInstanceConfig == nil) ||
(curInst.ConfidentialInstanceConfig == nil && newInst.ConfidentialInstanceConfig != nil) ||
(curInst.ConfidentialInstanceConfig != nil && newInst.ConfidentialInstanceConfig != nil && curInst.ConfidentialInstanceConfig.EnableConfidentialCompute != newInst.ConfidentialInstanceConfig.EnableConfidentialCompute) {
klog.Infof("Confidential compute mismatch")
klog.Infof("Confidential compute mismatch (current: %v, new: %v)", curInst.ConfidentialInstanceConfig, newInst.ConfidentialInstanceConfig)
return true
}
if curInst.SourceMachineImage != newInst.SourceMachineImage {
klog.Infof("Source Machine Mismatch")
klog.Infof("Source Machine Mismatch (current: %v, new: %v)", curInst.SourceMachineImage, newInst.SourceMachineImage)
return true
}
return false
Expand Down