Bug 1846521 - CAM cluster version detection not working for some OCP 3.9 clusters "/version" endpoint Major/Minor fields missing
Summary: CAM cluster version detection not working for some OCP 3.9 clusters "/version...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Migration Tooling
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Derek Whatley
QA Contact: Xin jiang
URL:
Whiteboard:
Depends On:
Blocks: 1847191
TreeView+ depends on / blocked
 
Reported: 2020-06-11 19:21 UTC by Derek Whatley
Modified: 2023-10-06 20:35 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1847191 (view as bug list)
Environment:
Last Closed: 2020-09-30 18:42:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4148 0 None None None 2020-09-30 18:42:56 UTC

Description Derek Whatley 2020-06-11 19:21:25 UTC
Description of problem:
After providing MigCluster connection details, CAM hits a "Reconcile failed" error shown on the MigCluster due to:"error":"strconv.Atoi: parsing \"\": invalid syntax"

This problem arises on clusters where k8s major/minor versions are not filled out in the k8s `/version` endpoint

Response Body: {
  "major": "",
  "minor": "",
  "gitVersion": "v1.9.1+a0ce1bc657",
  "gitCommit": "a0ce1bc",
  "gitTreeState": "clean",
  "buildDate": "2018-04-26T16:48:23Z",
  "goVersion": "go1.9.4",
  "compiler": "gc",
  "platform": "linux/amd64"
}


Version-Release number of selected component (if applicable):
CAM v1.2.0
OCP 3.9.27 (other OCP 3.9 versions also affected)

How reproducible:
Always, on select OCP 3.9 clusters where kube major/minor versions aren't available (known to fail on OCP 3.9.27)

Steps to Reproduce:
1. Install CAM 1.2.0
2. Go to web UI (CLI also works) 
3. Set up a MigCluster ("Cluster" in web UI) using connection details of an OCP 3.9.27 cluster
4. Verify that error condition is raised on MigCluster due to reconcile failure. Error message will mention "atoi" conversion.

Actual results:
Reconcile failed on MigCluster, blocks all other actions on this MigCluster

Expected results:
Reconcile works as expected on MigCluster, migrations can be performed


Additional info:

This is a known issue with some OCP 3.9 versions: https://github.com/openshift/origin/pull/19731 

We are developing a fix to overcome the missing major/minor version fields by instead parsing gitVersion, which appears to still be available on OCP 3.9 clusters missing the major/minor fields.

Comment 2 Derek Whatley 2020-06-15 20:02:21 UTC
PRs are merged.

Comment 9 errata-xmlrpc 2020-09-30 18:42:32 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) Tool image release advisory 1.3.0), 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-2020:4148


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