Uploaded image for project: 'Migration Toolkit for Virtualization'
  1. Migration Toolkit for Virtualization
  2. MTV-3687

Migration plan stuck in 'Not Ready' due to NAD conflict between default namespace and target namespace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 2.10.z
    • 2.10.0
    • Controller

      Description of problem:

      Migration plans created with MTV (Migration Toolkit for Virtualization) fail to reach the Ready state when NetworkAttachmentDefinitions (NADs) with identical names exist across different namespaces. The MTV controller cannot properly resolve the correct NAD reference, preventing migration execution.

      Version-Release number of selected component (if applicable):

      CNV: 4.19.8
      MTV: 2.10.0 - on-pr-8ae49a756503a3f24fc1a01400ebff982b49d230
      OCP: 4.19.11

      How reproducible:

      Always / N%
      

      When creating a migration plan that references a NetworkAttachmentDefinition using the namespace-qualified format namespace/nad-name, the MTV controller fails to resolve the NAD reference if another NAD with the same name exists in the default namespace. Even though the reference explicitly specifies the target namespace (e.g., msafra/mybridge2), the controller becomes confused by the presence of the identically-named NAD in the default namespace, resulting in the migration plan remaining in a non-ready state indefinitely.

      Steps to Reproduce:
      Created the same NADs in the default and msafra namespaces:

      # nad-default.yaml
      apiVersion: "k8s.cni.cncf.io/v1"
      kind: NetworkAttachmentDefinition
      metadata:
        name: mybridge2
        namespace: default
      spec:
        config: '{
        "cniVersion": "0.3.1",
        "type": "cnv-bridge",
        "bridge": "mybridge2"
        }'
      oc apply -f nad-default.yaml
      

      Environment had NADs in multiple namespaces:

       oc get network-attachment-definitions -A
      
      NAMESPACE   NAME        AGE
      default     mybridge2   54m
      msafra      mybridge1   19h
      msafra      mybridge2   19h
      

      Created migration plan for VM mtv-func.win2019_79:

      oc mtv create plan mig4 -S esxi --vms mtv-func.win2019_79 --warm -n msafra \
      --network-pairs "Mgmt Network:msafra/mybridge1,VM Network:msafra/mybridge2" 

      Checked plan status:

      fedora@fedora-moccasin-finch-54 ~ % oc mtv get plan mig4
      NAME        SOURCE      TARGET      VMS         READY       STATUS      PROGRESS    CUTOVER     ARCHIVED    CREATED mig4        esxi        host        1           false       -           -           warm        false       2025-09-10 09:04:24

      Actual results:

      • Migration plan is created but never reaches Ready state
      • Plan status shows READY: false indefinitely
      • Migration cannot be startedExpected results:

      The forklift-controller logs show the following error:

      "error": "Reference ref.Ref{ID:\"\", Name:\"msafra/mybridge2\", Namespace:\"\", Type:\"\"}"
      "Map.Network does not have Ready condition"

              rh-ee-ehazan Elad Hazan
              rh-ee-msafra Miryam Safra
              Miryam Safra Miryam Safra
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: