Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

TKG client library makes assumption about standard-package-repo existence when doing upgrades, breaking TCE cluster upgrades #1749

Closed
joshrosso opened this issue Mar 1, 2022 · 1 comment · Fixed by #1760
Labels
kind/bug PR/Issue related to a bug needs-triage Indicates an issue or PR needs to be triaged

Comments

@joshrosso
Copy link

joshrosso commented Mar 1, 2022

Bug description

When users in TCE attempt to upgrade their clusters, they will see:

Error: unable to upgrade management cluster: failed to update metadata configmaps after kubernetes upgrade: error while upgrading additional component 'addons-management/standard-package-repo': kubectl apply failed, output: error: no objects passed to apply : exit status 1

The standard-package-repo does not exist for TCE clusters.

Talking to @shivaani0505, they said:

Issue is at the following line: https://github.com/vmware-tanzu/tanzu-framework/blob/main/pkg/v1/tkg/client/upgrade_addon.go#L252 when handling upgrade.
So the manifest file is empty when BUILD is TCE. Applying empty file results in that error.
I verified it by also running the below command on cluster and it returns the same error as you are getting:

echo "" | kubectl apply -f -
error: no objects passed to apply

For TCE, we need this fix backported into a new patch release, v0.11.2 in order to support vmware-tanzu/community-edition#3285.

@joshrosso joshrosso added kind/bug PR/Issue related to a bug needs-triage Indicates an issue or PR needs to be triaged labels Mar 1, 2022
@tenczar
Copy link
Contributor

tenczar commented Mar 1, 2022

In this list, what are the addons that do not apply to TCE

"addons-management/tanzu-addons-manager",
"tkr/tkr-controller",
"addons-management/core-package-repo",
"capabilities/capabilities-controller",
"packages/management-package-repo",
"packages/management-package")
?

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
kind/bug PR/Issue related to a bug needs-triage Indicates an issue or PR needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants