Skip to content

Commit

Permalink
update checkVolumesForMigration notes
Browse files Browse the repository at this point in the history
Signed-off-by: Vladik Romanovsky <[email protected]>
  • Loading branch information
vladikr committed Dec 13, 2018
1 parent d254624 commit a682d81
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/virt-launcher/virtwrap/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ func (l *LibvirtDomainManager) asyncMigrate(vmi *v1.VirtualMachineInstance, isBl
}

func checkVolumesForMigration(vmi *v1.VirtualMachineInstance, pvcs map[string]*k8sv1.PersistentVolumeClaim) (blockMigrate bool, err error) {
// Check if all VMI volumes can be shared between the source and the destination
// of a live migration. blockMigrate will be returned as false, only if all volumes
// are shared and the VMI has no local disks
// Some combinations of disks makes the VMI no suitable for live migration.
// A relevant error will be returned in this case.
hasPVC := false
for _, volume := range vmi.Spec.Volumes {
volSrc := volume.VolumeSource
Expand Down

0 comments on commit a682d81

Please sign in to comment.