Bug 1926128

Summary: Direct Volume Migration fails on a cluster configured with a proxy
Product: Migration Toolkit for Containers Reporter: Sergio <sregidor>
Component: GeneralAssignee: Pranav Gaikwad <pgaikwad>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: urgent    
Version: 1.4.0CC: chezhang, dymurray, ernelson, rjohnson, rpattath, whu, xjiang
Target Milestone: ---   
Target Release: 1.4.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-15 08:15:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sergio 2021-02-08 09:54:13 UTC
Description of problem:
When the clusters are configured with a proxy, DVM migrations are not executed properly. 

Version-Release number of selected component (if applicable):
MTC 1.4.0
TARGET CLUSTER: PROXY OCP4.4 AWS 
SOURCE CLUSTER: PROXY OCP4.3 AWS
REPLICATION REPOSITORY: AWS S3


How reproducible:
Always

Steps to Reproduce:
1. In the source cluster, deploy an application with at least one PVC

2. Migrate the application using DVM.


Actual results:
The migration is stuck:
    - message: Waiting for the Rsync daemon pod to run
      name: DirectVolume
      phase: WaitForDirectVolumeMigrationToComplete
      started: "2021-02-05T15:36:43Z"

The dvm shows these errors:

    conditions:
    - category: Critical
      lastTransitionTime: "2021-02-05T15:37:09Z"
      message: The `MigCluster` spec.ClusterRef openshift-migration/source-cluster
        is not ready
      reason: NotReady
      status: "True"
      type: ClusterNotReady
    - category: Critical
      lastTransitionTime: "2021-02-05T15:37:13Z"
      message: 'The spec.podRef ocp-24730-django/directvolumemigration-rsync-transfer-postgresql
        must reference a valid `Pod` '
      reason: NotFound
      status: "True"
      type: InvalidPod



Expected results:
The migration should be executed smoothly and without errors.


Additional info:
The directvolumemigration-rsync-transfer pod had no proxy configuration.

$ oc get pods directvolumemigration-rsync-transfer  -o yaml | grep -i proxy
No output.

Comment 5 Sergio 2021-03-09 17:24:25 UTC
Verified using MTC 1.4.2, AWS OCP4.5 (proxy) -> AWS OCP4.7 (proxy, controller), AWS S3 REPLICATION REPO.

both proxies were squid
both proxies configured with splice

# ssl_bump peek all
ssl_bump splice all
# ssl_bump bump all

both proxies configured to ignore certificate errors
sslproxy_cert_error allow all

target cluster's proxy configured as parent in the source cluster's proxy
cache_peer target.proxy.com parent 3128 0 proxy-only no-query login=USER:PASSWD


source cluster's proxy configured as child in the target cluster's proxy
cache_peer source.proxy.com child 3128 0 no-query login=USER:PASSWD proxy-only


Configured in target cluster's migrationcontroller resource this variable pointing to the SOURCE cluster's proxy

stunnel_tcp_proxy: http://USER:PASSWD@source.cluster.com:3128


The direct migration worked without problems. We move the BZ to VERIFIED status.

We need to be aware that with this way of working we can only use one proxy source cluster at a time, since we need to configure the source proxy in the controller's migrationcontroller resource. We will open a BZ so that we can support more than one proxy source cluster.

Comment 9 errata-xmlrpc 2021-03-15 08:15:36 UTC
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) image release advisory 1.4.2), 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-2021:0814