diff --git a/pkg/controller/plan/adapter/vsphere/client.go b/pkg/controller/plan/adapter/vsphere/client.go index f143a8be2..a48af1af5 100644 --- a/pkg/controller/plan/adapter/vsphere/client.go +++ b/pkg/controller/plan/adapter/vsphere/client.go @@ -237,9 +237,13 @@ func (r *Client) GetSnapshotDeltas(vmRef ref.Ref, snapshotId string, hosts util. case *types.VirtualDiskRawDiskVer2BackingInfo: changeIdMapping[trimBackingFileName(dev.DescriptorFileName)] = dev.ChangeId } - } + r.Log.V(1).Info("GetSnapshotDeltas", + "vmRef", vmRef, + "snapshot", snapshotId, + "deltas", changeIdMapping) + return } diff --git a/pkg/controller/plan/migration.go b/pkg/controller/plan/migration.go index 0cce2eddb..4eb2f2e21 100644 --- a/pkg/controller/plan/migration.go +++ b/pkg/controller/plan/migration.go @@ -49,7 +49,7 @@ var ( CDIDiskCopy libitr.Flag = 0x08 VirtV2vDiskCopy libitr.Flag = 0x10 OpenstackImageMigration libitr.Flag = 0x20 - VSphere libitr.Flag = 0x30 + VSphere libitr.Flag = 0x40 ) // Phases. @@ -79,7 +79,7 @@ const ( WaitForInitialSnapshot = "WaitForInitialSnapshot" WaitForFinalSnapshot = "WaitForFinalSnapshot" ConvertOpenstackSnapshot = "ConvertOpenstackSnapshot" - GetSnapshotDeltas = "GetSnapshotDeltas" + StoreSnapshotDeltas = "StoreSnapshotDeltas" StoreInitialSnapshotDeltas = "StoreInitialSnapshotDeltas" RemovePreviousSnapshot = "RemovePreviousSnapshot" RemovePenultimateSnapshot = "RemovePenultimateSnapshot" @@ -138,7 +138,7 @@ var ( {Name: RemovePreviousSnapshot, All: VSphere}, {Name: CreateSnapshot}, {Name: WaitForSnapshot}, - {Name: GetSnapshotDeltas, All: VSphere}, + {Name: StoreSnapshotDeltas, All: VSphere}, {Name: AddCheckpoint}, {Name: StorePowerState}, {Name: PowerOffSource}, @@ -661,7 +661,7 @@ func (r *Migration) step(vm *plan.VMStatus) (step string) { step = Initialize case AllocateDisks: step = DiskAllocation - case CopyDisks, CopyingPaused, RemovePreviousSnapshot, CreateSnapshot, WaitForSnapshot, GetSnapshotDeltas, AddCheckpoint, ConvertOpenstackSnapshot: + case CopyDisks, CopyingPaused, RemovePreviousSnapshot, CreateSnapshot, WaitForSnapshot, StoreSnapshotDeltas, AddCheckpoint, ConvertOpenstackSnapshot: step = DiskTransfer case RemovePenultimateSnapshot, CreateFinalSnapshot, WaitForFinalSnapshot, AddFinalCheckpoint, Finalize, RemoveFinalSnapshot: step = Cutover @@ -1038,7 +1038,7 @@ func (r *Migration) execute(vm *plan.VMStatus) (err error) { if ready { vm.Phase = r.next(vm.Phase) } - case StoreInitialSnapshotDeltas, GetSnapshotDeltas: + case StoreInitialSnapshotDeltas, StoreSnapshotDeltas: step, found := vm.FindStep(r.step(vm)) if !found { vm.AddError(fmt.Sprintf("Step '%s' not found", r.step(vm))) diff --git a/pkg/lib/itinerary/simple.go b/pkg/lib/itinerary/simple.go index e844a1b60..42c538e4b 100644 --- a/pkg/lib/itinerary/simple.go +++ b/pkg/lib/itinerary/simple.go @@ -6,7 +6,7 @@ import ( liberr "github.com/konveyor/forklift-controller/pkg/lib/error" ) -const NumPredicates = 24 +const NumPredicates = 0x40 // List of steps. type Pipeline []Step