Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func (h *FilesystemHandler) Handle(ctx context.Context, s state.VirtualMachineSt

agentReady, _ := conditions.GetCondition(vmcondition.TypeAgentReady, changed.Status.Conditions)
if agentReady.Status != metav1.ConditionTrue {
cb.Status(metav1.ConditionUnknown).Reason(conditions.ReasonUnknown)
return reconcile.Result{}, nil
}

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ func SaveTestResources(labels map[string]string, additional string) {

str := fmt.Sprintf("/tmp/e2e_failed__%s__%s.yaml", labels["testcase"], additional)

cmdr := kubectl.Get("virtualization -A", kc.GetOptions{Output: "yaml", Labels: labels})
cmdr := kubectl.Get("virtualization,intvirt -A", kc.GetOptions{Output: "yaml", Labels: labels})
Expect(cmdr.Error()).NotTo(HaveOccurred(), "cmd: %s\nstderr: %s", cmdr.GetCmd(), cmdr.StdErr())

err := os.WriteFile(str, cmdr.StdOutBytes(), 0o644)
Expand Down
21 changes: 16 additions & 5 deletions tests/e2e/vd_snapshots_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package e2e
import (
"errors"
"fmt"
"maps"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -147,7 +148,10 @@ var _ = Describe("VirtualDiskSnapshots", ginkgoutil.CommonE2ETestDecorators(), f

for _, vdName := range vds {
By(fmt.Sprintf("Create snapshot for %q", vdName))
err := CreateVirtualDiskSnapshot(vdName, vdName, ns, true, hasNoConsumerLabel)
labels := make(map[string]string)
maps.Copy(labels, hasNoConsumerLabel)
maps.Copy(labels, testCaseLabel)
err := CreateVirtualDiskSnapshot(vdName, vdName, ns, true, labels)
Expect(err).NotTo(HaveOccurred(), "%s", err)
}
})
Expand Down Expand Up @@ -195,7 +199,10 @@ var _ = Describe("VirtualDiskSnapshots", ginkgoutil.CommonE2ETestDecorators(), f
for _, blockDevice := range blockDevices {
if blockDevice.Kind == virtv2.VirtualDiskKind {
By(fmt.Sprintf("Create snapshot for %q", blockDevice.Name))
err := CreateVirtualDiskSnapshot(blockDevice.Name, blockDevice.Name, ns, true, attachedVirtualDiskLabel)
labels := make(map[string]string)
maps.Copy(labels, attachedVirtualDiskLabel)
maps.Copy(labels, testCaseLabel)
err := CreateVirtualDiskSnapshot(blockDevice.Name, blockDevice.Name, ns, true, labels)
Expect(err).NotTo(HaveOccurred(), "%s", err)

Eventually(func() error {
Expand Down Expand Up @@ -246,7 +253,11 @@ var _ = Describe("VirtualDiskSnapshots", ginkgoutil.CommonE2ETestDecorators(), f
go func(index int) {
defer wg.Done()
snapshotName := fmt.Sprintf("%s-%d", blockDevice.Name, index)
err := CreateVirtualDiskSnapshot(blockDevice.Name, snapshotName, ns, true, attachedVirtualDiskLabel)

labels := make(map[string]string)
maps.Copy(labels, attachedVirtualDiskLabel)
maps.Copy(labels, testCaseLabel)
err := CreateVirtualDiskSnapshot(blockDevice.Name, snapshotName, ns, true, labels)
if err != nil {
errs = append(errs, err)
}
Expand Down Expand Up @@ -303,12 +314,12 @@ var _ = Describe("VirtualDiskSnapshots", ginkgoutil.CommonE2ETestDecorators(), f

for _, vm := range vmObjects.Items {
Eventually(func() error {
frozen, err := CheckFileSystemFrozen(vm.Name, ns)
frozen, err := CheckFileSystemFrozen(vm.Name, vm.Namespace)
if err != nil {
return nil
}
if frozen {
return errors.New("Filesystem of the Virtual Machine is frozen")
return fmt.Errorf("the filesystem of the virtual machine %s/%s is frozen", vm.Namespace, vm.Name)
}
return nil
}).WithTimeout(
Expand Down
Loading