Bug 2044982 - [MTC] migrationcontroller considering nil limitrange values as “0”
Summary: [MTC] migrationcontroller considering nil limitrange values as “0”
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: Controller
Version: 1.7.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 1.7.0
Assignee: Pranav Gaikwad
QA Contact: Xin jiang
Steve Goodman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-25 12:32 UTC by Prasad Joshi
Modified: 2022-03-24 06:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-24 06:32:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github konveyor mig-controller pull 1258 0 None open Bug 2044982: Fix limitrange calculations for nil values 2022-01-26 14:31:22 UTC
Red Hat Product Errata RHBA-2022:1043 0 None None None 2022-03-24 06:32:36 UTC

Description Prasad Joshi 2022-01-25 12:32:43 UTC
Description of problem: I created a limitrange resource on source project with cpu values only. I was expecting rsync to use the default memory values instead of 0. 


Version-Release number of selected component (if applicable):
Source Cluster : 4.6 GCP
Target Cluster : 4.9 GCP
MTC 1.7.0
OADP 0.5.5


How reproducible: Always

Steps to Reproduce:
1. Create a new project in the source cluster.
$ oc new-project test-dvm-limitrange
2. Create a limitrage object 

apiVersion: v1
kind: LimitRange
metadata:
  name: cpu-min-max-lr
  Namespace: test-dvm-limitrange
spec:
  limits:
  - max:
      cpu: 500m
    min:
      cpu: 100m
    type: Container

3. Deploy an application with pvc in source cluster
$ oc new-app django-psql-persistent
4. Create a migplan from ui
4. Execute cutover
5. Check rsync pods resource limits

Actual results: Rsync pod is using memory requests and limits as 0


Expected results: Rsync pod should use default values when the limitrange values are nil.


Additional info: Added a rsync pod yaml below.

$ oc get pods  rsync-h7qmv -o yaml

image: registry.redhat.io/rhmtc/openshift-migration-rsync-transfer-rhel8@sha256:de52c65c9022c3e310c88f3bb34f306427b5eb2fcde7c0f5b7be2abf6692d57e
    imagePullPolicy: IfNotPresent
    name: rsync
    resources:
      limits:
        cpu: 500m
        memory: "0"
      requests:
        cpu: 100m
        memory: "0"

Comment 4 Prasad Joshi 2022-01-31 16:27:04 UTC
Verified with MTC 1.7.0

metadata_nvr: openshift-migration-operator-metadata-container-v1.7.0-25

Rsync pod is now using default values when limitrange values are nil.

Created a limitrange resource with nil memory values.
$ oc get pods rsync-jrkrd -o yaml
    resources:
      limits:
        cpu: 500m
        memory: 1Gi
      requests:
        cpu: 100m
        memory: 1Gi

Created a limitrange resource with nil cpu values
$ oc get pods -o yaml rsync-kcvn6
    limits:
        cpu: "1"
        memory: 1Gi
      requests:
        cpu: 100m
        memory: 1Gi

Moving this to verified status

Comment 6 errata-xmlrpc 2022-03-24 06:32:27 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) 1.7.0 release advisory), 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-2022:1043


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