Skip to content

Commit 39e7cbe

Browse files
authored
Remove selected node annotation from PVC/DV so the (#1447)
newly created blank one does not get it. If left it will bind the PV to the same node as the original and the migration will fail. Signed-off-by: Alexander Wels <awels@redhat.com>
1 parent 5045d1b commit 39e7cbe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • pkg/controller/directvolumemigration

pkg/controller/directvolumemigration/pvcs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (t *Task) createDestinationDV(srcClient, destClient compat.Client, pvc miga
7474

7575
// Remove any cdi related annotations from the PVC
7676
for k := range destPVC.Annotations {
77-
if strings.HasPrefix(k, "cdi.kubevirt.io") {
77+
if strings.HasPrefix(k, "cdi.kubevirt.io") || strings.HasPrefix(k, "volume.kubernetes.io/selected-node") {
7878
delete(destPVC.Annotations, k)
7979
}
8080
}

0 commit comments

Comments
 (0)