Description of problem: When we add a invalid option in migrationcontroller CR it should reject it and the logs should tell that the option was rejected. Version-Release number of selected component (if applicable): SOURCE CLUSTER: Azure OCP 4.6 (MTC 1.6.0) TARGET CLUSTER: Azure OCP 4.9 (MTC 1.6.0) REPLICATION REPOSITORY: Azure Blob Storage How reproducible: Always Steps to Reproduce: 1. In source cluster create a PVC using the default storageclass, and request 1Gi and mount it in a pod. $ oc new-project ocp-40342-invalidrsyncopts $ cat <<EOF | oc create -f - apiVersion: v1 kind: PersistentVolumeClaim metadata: namespace: ocp-40342-invalidrsyncopts name: test-data spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi EOF $ cat <<EOF | oc create -f - apiVersion: apps/v1 kind: Deployment metadata: labels: app: pod-test name: pod-test namespace: ocp-40342-invalidrsyncopts spec: replicas: 1 selector: matchLabels: app: resize-test template: metadata: labels: app: resize-test spec: containers: - name: podtest imagePullPolicy: Always image: alpine command: [ "/bin/sh", "-c", "--" ] args: [ "while true; do sleep 30; done;" ] restartPolicy: Never volumeMounts: - name: testvolume mountPath: /data/test volumes: - name: testvolume persistentVolumeClaim: claimName: test-data EOF 2. Configure extra rsync options in the MigrationController resource. We add a wrong extra option containing the ";" (semicolon) character: "rsync_opt_extras": "--myextraoption;semicolon" oc -n openshift-migration patch migrationcontroller migration-controller -p '{"spec":{"rsync_opt_extras": "--myextraoption;semicolon", "rsync_opt_bwlimit": "220"} }' --type='merge'; 3. Create a migration plan for ocp-40342-invalidrsyncopts namespace with Direct Volume Migration and execute migration. Actual results: migration-log-reader pod is not reporting logs regarding invalid options Expected results: migration-log-reader pod should report logs for invalid rsync options
verified with MTC 1.6.0 $ oc -n openshift-migration logs $(oc get pods -l logreader=mig -oname) -c plain |grep semicolon | grep -i invalid openshift-migration migration-controller-6df9dcd9cd-5vtwq mtc {"level":"info","ts":1630476842.0661273,"logger":"directvolume","msg":"Invalid Rsync extra option passed","dvm":"migration-ac55a-kdgx5","migMigration":"migration-ac55a","option":"--myextraoption;semicolon"} openshift-migration migration-controller-6df9dcd9cd-5vtwq mtc {"level":"info","ts":1630476869.4038439,"logger":"directvolume","msg":"Invalid Rsync extra option passed","dvm":"migration-ac55a-kdgx5","migMigration":"migration-ac55a","option":"--myextraoption;semicolon"} registry.redhat.io/rhmtc/openshift-migration-controller-rhel8@sha256:d1bb94853b42abef96ec2c63600ebac41b0163d88fc25571f7b40c6c1d2f8c40
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 (Moderate: Migration Toolkit for Containers (MTC) 1.6.0 security & bugfix update), 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/RHSA-2021:3694