Error: upgrade version compatibility validation failed: unable to parse management cluster version : could not parse "" as version
search cancel

Error: upgrade version compatibility validation failed: unable to parse management cluster version : could not parse "" as version

book

Article ID: 379643

calendar_today

Updated On:

Products

Tanzu Kubernetes Grid VMware Tanzu Kubernetes Grid VMware Tanzu Kubernetes Grid 1.x VMware Tanzu Kubernetes Grid Management VMware Tanzu Kubernetes Grid Plus VMware Tanzu Kubernetes Grid Plus 1.x Tanzu Kubernetes Runtime

Issue/Introduction

SCENARIO:

Upgrading a TKG Management Cluster (MC) fails.

 

DETAILS:

Using the tanzu cli to upgrade your Management Cluster.

tanzu management-cluster upgrade

or 

tanzu mc upgrade

 

FAILS with ERROR:

Error: upgrade version compatibility validation failed: unable to parse management cluster version : could not parse "" as version

Environment

NOTE: Has been seen to occur when upgrading a MC from multiple source TKG versions to target TKG versions.

For example: 

From TKG 2.4.1 to 2.5.1

From TKG 2.5.1 to 2.5.2

Cause

The Cluster object associated with the Management Cluster has an empty string value "" associated with the annotation for TKGVERSION.

Example:

$ kubectl get clusters -n tkg-system MANAGEMENT_CLUSTER_NAME -o yaml | grep TKGVERSION

TKGVERSION: ""

 

Whereas, the value of the TKGVERSION annotation is expected to be the value of the current TKG version running (before upgrade).

Example.  If you are upgrading your MC "from" TKG 2.5.1 to TKG 2.5.2, it should show the value of 2.5.1.

$ kubectl get clusters -n tkg-system MANAGEMENT_CLUSTER_NAME -o yaml | grep TKGVERSION

TKGVERSION: 2.5.1

 

For more details, refer to Check Your TKG Version

Resolution

NOTE: There is a workaround.  We are asking that Tanzu Customers open a Tanzu Kubernetes Runtime support request so that a Tanzu Engineer can obtain some important data for TKG R&D prior to performing the operation with you. 

 

STEPS:

  • Open a Tanzu Kubernetes Runtime support request for this issue.

  • Also, include the errors in the SR

  • Also mention this KB number: 379643

  • A Tanzu Engineer will assist you with the workaround and gather data for Engineering