Bug 2005143

Summary: Combining Rsync and Stunnel in a single pod can degrade performance
Product: Migration Toolkit for Containers Reporter: Alay Patel <alpatel>
Component: ControllerAssignee: Alay Patel <alpatel>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: urgent    
Version: 1.5.0CC: ernelson, prajoshi, rjohnson
Target Milestone: ---   
Target Release: 1.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2005438 (view as bug list) Environment:
Last Closed: 2021-09-29 14:36:19 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:
Bug Depends On:    
Bug Blocks: 2005438    

Description Alay Patel 2021-09-16 22:05:23 UTC
Description of problem:
When stunnel and rsync pods were combined into the single pod, we check for whether rsync is done from stunnel container. The loop is does not have a sleep command which means it constantly competes with the stunnel process for CPU.

Current implementation: https://github.com/konveyor/crane-lib/blob/58768bfef2af4b826c47bafcf1a1111a21b33b37/state_transfer/transfer/rsync/client.go#L156-L155

1.5.z implementation: https://github.com/konveyor/mig-controller/blob/7199b88a548a9b016bbe7bfa09d07369bd24ee1a/pkg/controller/directvolumemigration/rsync.go#L1807-L1808

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

How reproducible:
Always. Performance problem was never reported.

Additional Info:
We could add Sleep 1 or Sleep 5 to make sure stunnel process is not starved.

Comment 6 Prasad Joshi 2021-09-20 15:06:43 UTC
Verified using:
SOURCE CLUSTER: AWS OCP 4.6 (MTC 1.6.0)
TARGET CLUSTER: AWS OCP 4.9 (MTC 1.6.0)

image: registry.redhat.io/rhmtc/openshift-migration-controller-rhel8@sha256:61b1303933af81fed2390fd2f24f098ecf3a96693a1caab7988c4575c03b2132

oc get pods -oyaml rsync-gnx8f
 - command:
    - /bin/bash
    - -c
    - "/bin/stunnel /etc/stunnel/stunnel.conf\nwhile true\ndo test -f /usr/share/rsync/rsync-client-container-done\nif [ $? -eq 0 ]\nthen\n\tbreak\nelse\n\tsleep 1\nfi\ndone\nexit 0"

Moved to Verified

Comment 8 errata-xmlrpc 2021-09-29 14:36:19 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 (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