Bug 2005143 - Combining Rsync and Stunnel in a single pod can degrade performance
Summary: Combining Rsync and Stunnel in a single pod can degrade performance
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: Controller
Version: 1.5.0
Hardware: Unspecified
OS: Unspecified
urgent
medium
Target Milestone: ---
: 1.6.0
Assignee: Alay Patel
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks: 2005438
TreeView+ depends on / blocked
 
Reported: 2021-09-16 22:05 UTC by Alay Patel
Modified: 2021-09-29 14:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2005438 (view as bug list)
Environment:
Last Closed: 2021-09-29 14:36:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github konveyor crane-lib pull 74 0 None Merged [BZ 2005143]: make the stunnel container sleep in between checking for rsync comple… 2021-09-17 13:48:57 UTC
Github konveyor mig-controller pull 1205 0 None Merged Bug 2005143: bump crane-lib with fix for competing stunnel and test process for CPU 2021-09-17 15:15:13 UTC
Github konveyor mig-controller pull 1206 0 None open Bug 2005143: bump crane-lib with fix for competing stunnel and test process for CP… 2021-09-17 15:14:50 UTC
Red Hat Product Errata RHSA-2021:3694 0 None None None 2021-09-29 14:36:26 UTC

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


Note You need to log in before you can comment on or make changes to this bug.