Bug 2074675

Summary: HPAs of DeploymentConfigs are not being updated when migration from Openshift 3.x to Openshift 4.x
Product: Migration Toolkit for Containers Reporter: Erik Nelson <ernelson>
Component: VeleroAssignee: Pranav Gaikwad <pgaikwad>
Status: CLOSED ERRATA QA Contact: Prasad Joshi <prajoshi>
Severity: medium Docs Contact: Richard Hoch <rhoch>
Priority: medium    
Version: 1.6.2CC: admachad, dwalsh, ernelson, pgaikwad, pmali, prajoshi, rjohnson
Target Milestone: ---   
Target Release: 1.7.2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2072311 Environment:
Last Closed: 2022-07-01 09:53:11 UTC Type: ---
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: 2072311    
Bug Blocks:    

Description Erik Nelson 2022-04-12 18:53:12 UTC
+++ This bug was initially created as a clone of Bug #2072311 +++

Description of problem:
When migrating

Version-Release number of selected component (if applicable): MTC 1.5.2


How reproducible:
Always when migrating HPAs from Openshift 3.x to 4.x


Steps to Reproduce:
1. Migrate a project based on a Openshift 3.x cluster containing a deploymentconfig and a horizontalpodautoscaler that scales this deployment config.  Check that on the destination 4.x cluster, the apiversion/kind of the spec.scaleTargetRef of the migrated HPA is not using the updated GVK of DeploymentConfig on Openshift 4.x

Actual results:
- hpa.spec.scaleTargetRef.apiVersion is "v1"

Expected results:
- hpa.spec.scaleTargetRef.apiVersion should be "apps.openshift.io/v1"

Additional info:

Comment 8 Prasad Joshi 2022-06-21 12:49:06 UTC
Verified with MTC 1.7.2 (prestage)

metadata_nvr: openshift-migration-operator-metadata-container-v1.7.2-15


HPA resource (Source cluster)

$ oc get hpa -ntest -o yaml
  spec:
    maxReplicas: 7
    minReplicas: 2
    scaleTargetRef:
      apiVersion: v1
      kind: DeploymentConfig
      name: nginx-deployment
    targetCPUUtilizationPercentage: 50


HPA resource (Target Cluster)

$ oc get hpa -ntest -o yaml
  spec:
    maxReplicas: 7
    metrics:
    - resource:
        name: cpu
        target:
          averageUtilization: 80
          type: Utilization
      type: Resource
    minReplicas: 2
    scaleTargetRef:
      apiVersion: apps.openshift.io/v1
      kind: DeploymentConfig
      name: nginx-deployment


Moving this to verified status.

Comment 14 errata-xmlrpc 2022-07-01 09:53:11 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.7.2 security and bug fix 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-2022:5483