Skip to content

Commit

Permalink
e2e,passt: Don't add additional memory for passt VM
Browse files Browse the repository at this point in the history
After calculating the overhead for VM with Passt binding,
it shouldn't be neccessary for a user to add extra memory
to the VM when the Passt binding is configured to forward
all ports.

Signed-off-by: Radim Hrazdil <[email protected]>
  • Loading branch information
Radim Hrazdil committed Nov 4, 2022
1 parent 6fd6e46 commit 8c427ec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion tests/network/vmi_istio.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ func createPasstVm(ports []v1.Port) *v1.VirtualMachineInstance {
libvmi.WithInterface(libvmi.InterfaceDeviceWithPasstBinding(ports...)),
libvmi.WithLabel(vmiAppSelectorKey, vmiAppSelectorValue),
libvmi.WithAnnotation(istio.ISTIO_INJECT_ANNOTATION, "true"),
withPasstExtendedResourceMemory(ports...),
)
return vmi
}
Expand Down
10 changes: 0 additions & 10 deletions tests/network/vmi_passt.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ var _ = SIGDescribe("[Serial] Passt", func() {
serverVMI = libvmi.NewAlpineWithTestTooling(
libvmi.WithInterface(libvmi.InterfaceDeviceWithPasstBinding(ports...)),
libvmi.WithNetwork(v1.DefaultPodNetwork()),
withPasstExtendedResourceMemory(ports...),
)

serverVMI, err = virtClient.VirtualMachineInstance(util.NamespaceTestDefault).Create(serverVMI)
Expand Down Expand Up @@ -214,7 +213,6 @@ EOL`, inetSuffix, serverIP, serverPort)
clientVMI = libvmi.NewAlpineWithTestTooling(
libvmi.WithInterface(libvmi.InterfaceDeviceWithPasstBinding()),
libvmi.WithNetwork(v1.DefaultPodNetwork()),
withPasstExtendedResourceMemory(),
)
clientVMI, err = virtClient.VirtualMachineInstance(util.NamespaceTestDefault).Create(clientVMI)
Expect(err).ToNot(HaveOccurred())
Expand Down Expand Up @@ -288,11 +286,3 @@ EOL`, inetSuffix, serverIP, serverPort)
})
})
})

func withPasstExtendedResourceMemory(ports ...v1.Port) libvmi.Option {
if len(ports) == 0 {
return libvmi.WithResourceMemory("2048M")
}
return func(vmi *v1.VirtualMachineInstance) {
}
}

0 comments on commit 8c427ec

Please sign in to comment.