Bug 1857211 - install-config is not a reliable way to determine the cluster version, can cause operator failure
Summary: install-config is not a reliable way to determine the cluster version, can ca...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: General
Version: 1.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 1.3.0
Assignee: John Matthews
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks: 1857212
TreeView+ depends on / blocked
 
Reported: 2020-07-15 13:08 UTC by Erik Nelson
Modified: 2023-12-15 18:28 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1857212 (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
Github konveyor mig-operator pull 445 0 None closed [Bug 1857211]: use infrastructure resource to get cluster URL 2020-12-03 02:25:40 UTC
Red Hat Knowledge Base (Solution) 5227331 0 None None None 2020-07-16 07:12:45 UTC
Red Hat Product Errata RHBA-2020:4148 0 None None None 2020-09-30 18:42:56 UTC

Description Erik Nelson 2020-07-15 13:08:53 UTC
Description of problem:
We currently use the "install-config" section of the kube-system/cluster-config-v1 to determine the cluster version (https://github.com/konveyor/mig-operator/blob/release-1.2.3/roles/migrationcontroller/tasks/main.yml#L62).

This is not reliable, and there's no guarantee that the install-config key will exist. We have had reported operator failures in customer clusters with the following error:

u001b[0m\n\r\nTASK [migrationcontroller : set_fact] ******************************************\r\n\u001b[1;30mtask path: /opt/ansible/roles/migrationcontroller/tasks/main.yml:62\u001b[0m\n\u001b[0;31mfatal: [localhost]: FAILED! => {\"msg\": \"The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'metadata'\\n\\nThe error appears to be in '/opt/ansible/roles/migrationcontroller/tasks/main.yml': line 62, column 7, but may\\nbe elsewhere in the file depending on the exact syntax problem.\\n\\nThe offending line appears to be:\\n\\n\\n    - set_fact:\\n      ^ here\\n\"}\u001b[0m\n\r\nTASK [migrationcontroller : k8s_status]

Also see the failed lookup: https://github.com/konveyor/mig-operator/blob/release-1.2.3/roles/migrationcontroller/tasks/main.yml#L68

We have a more reliable source proposed here: https://github.com/konveyor/mig-operator/issues/380

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

How reproducible:
It's undetermined what would cause the install-config to be missing, but if it is, the operator will fail on this task every time.

Comment 1 Jason Montleon 2020-07-15 13:14:30 UTC
We need to confirm the infrastructure resource is available for all 4.x releases and wasn't introduced at a later time. We can still use it for supported releases if only available later; we just need to be sure not to break older 4.x releases.

Comment 8 Jason Montleon 2020-08-27 21:28:28 UTC
Moving back to assigned. I had to revert the PR since it was failing. More details @ https://github.com/konveyor/mig-operator/issues/380

Comment 15 Xin jiang 2020-09-23 12:26:18 UTC
verified with MTC 1.3.0 on OCP 4.5

Comment 19 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.