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

Wrong namespace in Networkmap causes the forklift-controller to crash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • 2.11.1
    • 2.11.0
    • Controller

      Description of problem:

      The issue in 2.11.0 when giving in spec.map.destination wrong namespace it causes the controller to crash silently 

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

      ├── OCP version: 4.20.11
      ├── MTV version: 2.11.0 (redhat-osbs-on-pr-e97a49014ec09b03b8621e411273307a8913351d)
      └── CNV version: 4.20.5

      How reproducible:

      Always 
      

      Steps to Reproduce:

      1. oc new-project mtv-test
      2. oc mtv create provider host --type openshift
      3. oc mtv create provider vmware-7 --type vsphere 
      4. oc mtv create plan plan-ameen-win2019-multi-ips-2nics --source vmware-7 --vms "ameen-WIN2019_multi_IPs_2nics"
      5. oc patch plan plan-ameen-win2019-multi-ips-2nics --type='json' -p='[{"op": "replace", "path": "/spec/map/1/destination/namespace", "value":"wrong"}]'

      Actual results:

      in the forklift-controller log we see:
      {"level":"error","ts":"2026-02-09 13:49:58.816","logger":"networkMap|q8n2d","msg":"Reconcile failed.","map":{"name":"plan-ameen-win2019-multi-ips-2nics-network","namespace":"mtv-test"},"error":"Internal Server Error","stacktrace":"github.com/kubev2v/forklift/pkg/controller/base.(*Reconciler).Ended\n\t/app/pkg/controller/base/controller.go:64\ngithub.com/kubev2v/forklift/pkg/controller/map/network.Reconciler.Reconcile.func1\n\t/app/pkg/controller/map/network/controller.go:120\ngithub.com/kubev2v/forklift/pkg/controller/map/network.Reconciler.Reconcile\n\t/app/pkg/controller/map/network/controller.go:146\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Reconcile\n\t/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:119\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler\n\t/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:334\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem\n\t/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:294\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2\n\t/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:255"}

      Expected results:

      nothing

      Additional info:

       

              yzamir@redhat.com Yaacov Zamir
              rh-ee-abarakat Ameen Barakat
              Ameen Barakat Ameen Barakat
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: