Skip to content

Commit

Permalink
Fix handling of VM that are imported to oVirt
Browse files Browse the repository at this point in the history
The IMPORTEXPORT_IMPORT_VM event should be treated exactly like
USER_ADD_VM_FINISHED_SUCCESS, as both mean a VM was added to oVirt -
this way imported VMs won't get stuck in Analysing state.

Signed-off-by: Arik Hadas <ahadas@redhat.com>
  • Loading branch information
ahadas committed Jul 12, 2023
1 parent 5fd00e2 commit 2877dbb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/controller/provider/container/ovirt/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ func (r *DiskAdapter) Event() []int {
USER_FORCE_REMOVE_STORAGE_DOMAIN,
USER_ADD_VM,
USER_ADD_VM_FINISHED_SUCCESS,
IMPORTEXPORT_IMPORT_VM,
USER_REMOVE_VM,
// StorageDomain.
USER_DETACH_STORAGE_DOMAIN_FROM_POOL,
Expand Down Expand Up @@ -1056,6 +1057,7 @@ func (r *DiskAdapter) Apply(ctx *Context, event *Event) (updater Updater, err er
err = collection.Delete(desired)
case USER_ADD_VM,
USER_ADD_VM_FINISHED_SUCCESS,
IMPORTEXPORT_IMPORT_VM,
USER_REMOVE_VM:
err = collection.Reconcile(desired)
default:
Expand Down

0 comments on commit 2877dbb

Please sign in to comment.