Description of problem: After setting "host_cluster_restart_restic: true" on the MigrationController CR, the restic pod on the host cluster did not restart during migration process. Version-Release number of selected component (if applicable): CAM 1.2.2 stage SOURCE: OCP 4.3 azure TARGET: OCP 4.4 azure azure S3 BUCKET How reproducible: Always Steps to Reproduce: 1. add "host_cluster_restart_restic: true" on the MigrationController CR $ oc get MigrationController -o yaml|grep -i restic $ oc edit MigrationController $ oc get MigrationController -o yaml|grep -i restic host_cluster_restart_restic: true 2 record the restic pod name in host cluster $ oc get pod |grep restic restic-kd6jw 1/1 Running 0 6h18m restic-mpsrm 1/1 Running 0 6h18m restic-xpbw9 1/1 Running 0 6h18m 3 run a migration as normal. 4 check the restic pod name in host cluster again, the pod did not restart. $ oc get pod |grep restic restic-kd6jw 1/1 Running 0 6h18m restic-mpsrm 1/1 Running 0 6h18m restic-xpbw9 1/1 Running 0 6h18m Actual results: Afiter setting "host_cluster_restart_restic: true" on the MigrationController CR, the restic pod in host cluster did NOT restart during migraton process. Expected results: Afiter setting "host_cluster_restart_restic: true" on the MigrationController CR, the restic pod in host cluster will restart during migraton process. Additional info:
This is a bug, good catch! When I examine the mig-operator logs, I see this: --- fatal: [localhost]: FAILED! => {"changed": false, "error": 422, "msg": "Failed to create object: b'{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"MigCluster.migration.openshift.io \\\\\"host\\\\\" is invalid: spec.restartRestic: Invalid value: \\\\\"string\\\\\": spec.restartRestic in body must be of type boolean: \\\\\"string\\\\\"\",\"reason\":\"Invalid\",\"details\":{\"name\":\"host\",\"group\":\"migration.openshift.io\",\"kind\":\"MigCluster\",\"causes\":[{\"reason\":\"FieldValueInvalid\",\"message\":\"Invalid value: \\\\\"string\\\\\": spec.restartRestic in body must be of type boolean: \\\\\"string\\\\\"\",\"field\":\"spec.restartRestic\"}]},\"code\":422}\\n'", "reason": "Unprocessable Entity", "status": 422} TASK [migrationcontroller : operator_sdk.util.k8s_status] ********************** task path: /opt/ansible/roles/migrationcontroller/tasks/main.yml:561 --- I'll need to submit a patch to mig-operator to get this fixed. Will post when it's ready.
Fix: https://github.com/konveyor/mig-operator/pull/373
verified in new cam stage image, this issue has NOT been fixed. Image information: - openshift-migration-rhel7-operator@sha256:ab124c3917a2ea22e03618f287c629e727bbcdf7ec76db5e7d0f8654064b7a52 - openshift-migration-controller-rhel8@sha256:ca9ab7ecf0d939afa1aae2540bb3daf5d7ce651ad58b94c6987484d12af1d211 - openshift-migration-velero-restic-restore-helper-rhel8@sha256:e9459138ec3531eefbefa181dae3fd93fe5cf210b2a0bd3bca7ba38fbec97f60 In target cluster Before migration: $ oc get pod |grep -i restic restic-w56ts 1/1 Running 0 4h53m restic-wvqxb 1/1 Running 0 4h53m restic-zftdc 1/1 Running 0 4h53m // Modify the MigrationController CR $ oc get MigrationController -o yaml |grep -i restic host_cluster_restart_restic: true After migration $ oc get pod |grep -i restic restic-w56ts 1/1 Running 0 5h36m restic-wvqxb 1/1 Running 0 5h36m restic-zftdc 1/1 Running 0 5h36m
Restic only restarts on src cluster, not target cluster.
This is not a bug per the above explanation.