restoreInstancetypeControllerRevisions
unable to handle repeat reconcile calls to restore the same snapshot to a new VirtualMachine
#8890
Labels
/area instancetype
What happened:
restoreInstancetypeControllerRevisions
currently assumes that restoring a snapshot to a newVirtualMachine
will always create a newControllerRevision
. However this isn't the case if theVirtualMachineRestore
reconcile loop fails after the first call torestoreInstancetypeControllerRevisions
causing a subsequent attempt to reconcile calling the function again. In this case theControllerRevision
has already been restored.For example, the following
virt-controller
logs come from theTests Suite.[sig-storage] VirtualMachineRestore Tests With simple VM with instancetype and preferences should create new ControllerRevisions for newly restored VM
test. They show the first attempt to reconcile theVirtualMachineRestore
failing due tofailed to allocate requested mac address
with future attempts then failing because aControllerRevision
for the instance type already exists:What you expected to happen:
restoreInstancetypeControllerRevisions
should be able to handle repeat calls in all scenarios.How to reproduce it (as minimally and precisely as possible):
Somehow cause the reconcile loop to fail after first calling
restoreInstancetypeControllerRevisions
.Additional context:
https://bugzilla.redhat.com/show_bug.cgi?id=2149900
Environment:
virtctl version
): N/Akubectl version
): N/Auname -a
): N/AThe text was updated successfully, but these errors were encountered: