Description of problem: Installed MTC 1.7.0 with legacy operator on ocp 4.5 and found error in operator pod "'controller_state' is undefined" Version-Release number of selected component (if applicable): MTC 1.7.0 How reproducible: alwasys Steps to Reproduce: 1. Download operator.yml from legacy operator image registry-proxy.engineering.redhat.com/rh-osbs/rhmtc-openshift-migration-legacy-operator:v1.7.0 2. Update images to point to brew.registry.redhat.io in operator.yml and then install mtc operator by executing 'oc create -f operator.yml' 3. download controller.yml from legacy operator image and create migcontroller by executing command 'oc create -f controller.yml' Actual results: Operator pod logs reported error --------------------------- Ansible Task StdOut ------------------------------- TASK [Set up mig controller monitoring config] ******************************** fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'controller_state' is undefined The error appears to be in '/opt/ansible/roles/migrationcontroller/tasks/main.yml': line 164, column 5, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - name: \"Set up mig controller monitoring config\" ^ here "} I did check /opt/ansible/roles/migrationcontroller/defaults/main.yml by oc rsh into operator pod and it missed controller_state variable Expected results: It shouldn't has any error logs in operator pod Additional info:
I also found it didn't create following secrets cloud-credentials cloud-credentials-azure cloud-credentials-gcp
operator image is brew.registry.redhat.io/rh-osbs/rhmtc-openshift-migration-legacy-operator:v1.7.0-23
I found another issue, not sure if it's the same issue migration-log-reader pod was not created. $ oc get pod migration-operator-79b95db8d8-krzmv 1/1 Running 0 8h restic-5ws6f 1/1 Running 0 8h restic-c55xm 1/1 Running 0 8h restic-q7hn4 1/1 Running 0 8h restic-sr9wz 1/1 Running 0 8h restic-xqw2w 1/1 Running 0 8h velero-7c7bb477f7-jk2ht 1/1 Running 0 8h $ oc get migrationcontroller migration-controller -o json | jq .spec { "azure_resource_group": "", "cluster_name": "host", "migration_controller": false, "migration_log_reader": true, "migration_ui": false, "migration_velero": true, "restic_timeout": "1h", "version": "1.7.0" }
This should be fixed by https://github.com/konveyor/mig-legacy-operator/pull/8
Verified with MTC 1.7.0 (Legacy-operator) $ oc get pods -n openshift-migration migration-operator-7986c67bcb-hzqsd -o yaml image: brew.registry.redhat.io/rh-osbs/rhmtc-openshift-migration-legacy-operator:v1.7.0-26 I don't see any 'controller_state' undefined error in operator pod logs. $ oc logs migration-operator-7986c67bcb-hzqsd PLAY RECAP ********************************************************************* localhost : ok=21 changed=1 unreachable=0 failed=0 skipped=9 rescued=0 ignored=0 Log reader pod is also running fine. $ oc get pods NAME READY STATUS RESTARTS AGE migration-log-reader-6f666d5fcf-9xtp5 2/2 Running 0 53m migration-operator-7986c67bcb-hzqsd 1/1 Running 0 54m restic-6mvkx 1/1 Running 0 53m restic-ft9md 1/1 Running 0 53m restic-rcs9v 1/1 Running 0 53m restic-wbpg5 1/1 Running 0 53m restic-xnql5 1/1 Running 0 53m velero-f89cb5567-4tkfp 1/1 Running 0 53m Moving this to Verified status.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Migration Toolkit for Containers (MTC) 1.7.0 release advisory), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:1043