vmware-tanzu / tanzu-cli

The Tanzu Core CLI project provides the core functionality of the Tanzu CLI. The CLI is based on a plugin architecture where CLI command functionality can be delivered through independently developed plugin binaries
Apache License 2.0
35 stars 22 forks source link

tanzu-cli 1.4.1 on AlmaLinux context create hangs on kubernetes-release #825

Open dsputnikk opened 3 days ago

dsputnikk commented 3 days ago

Bug description I am essentially here: https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-with-tanzu-tkg/GUID-E5A804FA-BB03-436F-BF01-14CBF13DBB9D.html . Attemping to create a context against my Tanzu environment.

This works on Windows with tanzu-cli 1.4.1 down to generating me my kubeconfig. The same exact process, same endpoints, hangs on linux.

There is a load of CPU activity from the kswap0 process during this hang. My only way to exit is to eventually ctrl c out of it as the system becomes quite unresponsive.

Expected behavior Plugins are installed and drops back out to shell, ready to move on to listing/connecting to a tanzu namespace.

Steps to reproduce the bug / Relevant debug output

dnf install tanzu-cli
tanzu plugin install --group vmware-tkg/default (installs pinniped auth)
tanzu context create MyContext --endpoint https://10.80.1.2

[hang on Linux Alma 9] @ - Installing plugin 'kubernetes-release:v0.29.0' with target 'kubernetes'

…
[or succeeds in Win 11]

Output of tanzu version

version: v1.4.1
buildDate: 2024-08-14
sha: bbde4b21
arch: amd64

on both OS'es

Environment where the bug was observed (cloud, OS, etc) Win11 or Alma 9.1

dsputnikk commented 3 days ago

I attempted to add 8GB of memory and rerun. It's almost as if there is a memory leak somewhere.

I am watching "free -h" during this step and in a matter of 20 seconds it eats up all available memory when hitting this step.

I have tried removing all tanzu related folders, and the effect is the same

rm -rf ~/.config/tanzu* ~/.cache/tanzu* ~/.local/share/tanzu*
dsputnikk commented 2 days ago

To add to my confusion, I tried upgrading Alma and Tanzu-CLI to latest 1.5 from the new repo.

Using the same context command I now get a hard error:

bash# tanzu context create mytanzu --endpoint https://10.80.1.2 --insecure-skip-tls-verify
[x] : error while validating the Context object: context name cannot be empty

Same result in interactive:

tanzu context create
? Select context creation type Kubernetes (Cluster Endpoint)
? Enter control plane endpoint https://10.80.1.2
? Give the context a name mytanzu
[x] : error while validating the Context object: context name cannot be empty

Update Edit:

I have now tried this on a fresh WSL Ubuntu instance with latest kubectl and both Tanzu 1.5 and 1.4.1. The outputs remain the same, 1.4.1 hangs and chews up memory. 1.5 errors out.

I am very confused :(