Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster Stats command fails early if an application references a removed cluster #21808

Open
3 tasks
rumstead opened this issue Feb 6, 2025 · 1 comment
Open
3 tasks
Labels
bug Something isn't working

Comments

@rumstead
Copy link
Member

rumstead commented Feb 6, 2025

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

when issuing an argocd admin cluster stats command the stats will not show up if a cluster is no longer registered with Argo CD but an application references it.

To Reproduce

Add a cluster to Argo CD, deploy an application there, remove the cluster, and try to run the stats command.

Expected behavior
A warning message is logged saying the unreachable cluster is skipped and stats are generated for the other clusters OR the unreachable cluster is still included in the output with an error message.

Screenshots

❯ argocd admin cluster stats
FATA[0051] unable to find destination server: error getting cluster name by server "https://my.clusterrrr.com:443": rpc error: code = NotFound desc = cluster "https://my.clusterrrr.com:443" not found

Version

❯ argocd version
argocd: v2.14.1+3345d05
  BuildDate: 2025-02-03T22:58:25Z
  GitCommit: 3345d05a43d8edd7ec42ec71ffe8b5f95bc68dbe
  GitTreeState: clean
  GoVersion: go1.23.5
  Compiler: gc
  Platform: darwin/arm64
argocd-server: v2.12.4+27d1e64
  BuildDate: 2024-09-26T06:36:13Z
  GitCommit: 27d1e641b6ea99d9f4bf788c032aeaeefd782910
  GitTreeState: clean
  GoVersion: go1.22.4
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v5.4.2 2024-05-22T15:20:33Z
  Helm Version: v3.15.2+g1a500d5
  Kubectl Version: v0.29.6
  Jsonnet Version: v0.20.0

Logs

Paste any relevant application logs here.
@rumstead rumstead added the bug Something isn't working label Feb 6, 2025
@rumstead
Copy link
Member Author

rumstead commented Feb 7, 2025

It is happening here:

destCluster, err := argo.GetDestinationCluster(ctx, app.Spec.Destination, argoDB)

@rumstead rumstead changed the title Cluster Stats command fails early if a cluster cannot be reached Cluster Stats command fails early if an application references a removed cluster Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant