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

[API] Syncing of the tags between AKSConfig and UpstreamSpec for a newly created cluster is slow for empty tags #640

Open
1 task done
valaparthvi opened this issue Aug 21, 2024 · 4 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@valaparthvi
Copy link
Contributor

valaparthvi commented Aug 21, 2024

Create a cluster with a few tags and an empty tag, for e.g: {"owner": "pvala", "testLine": "somefile_L45", "empty-tag": ""}

When the cluster is created, Azure portal adds its own set of tags and the syncing between AKSConfig tags and UpstreamSpec tags is not immediate, it takes a few minutes after the cluster is Active before everything is synced.

I noticed that the non-empty tags immediately appear on AKS console, but the empty tag takes a while to appear, so there is something amiss with the way operator deals with empty tags.
IMO the sync should complete before the cluster becomes active.

This happens for both API and UI cluster creation. Updating the cluster with an empty tag via API works as expected.

PR's:

@kkaempf kkaempf added the kind/bug Something isn't working label Oct 8, 2024
@kkaempf kkaempf added this to the 2.9.4 milestone Oct 8, 2024
@mjura mjura self-assigned this Oct 22, 2024
@mjura mjura moved this from Backlog to In Progress (8 max) in CAPI & Hosted Kubernetes providers (EKS/AKS/GKE) Oct 22, 2024
mjura added a commit to mjura/aks-operator that referenced this issue Oct 24, 2024
mjura added a commit to mjura/aks-operator that referenced this issue Oct 24, 2024
@mjura mjura mentioned this issue Oct 24, 2024
5 tasks
@mjura mjura moved this from In Progress (8 max) to To Test in CAPI & Hosted Kubernetes providers (EKS/AKS/GKE) Oct 25, 2024
@valaparthvi
Copy link
Contributor Author

@mjura It appears to have been fixed in 2.10.0, not 2.9.4. I am changing the milestone. Please revert it back if I am wrong.

@valaparthvi valaparthvi modified the milestones: v2.9.4, v2.10.0 Nov 6, 2024
@valaparthvi
Copy link
Contributor Author

valaparthvi commented Nov 6, 2024

I tested this on 2.10.0-alpha7(rancher/aks-operator:v1.10.0-rc.2) and 2.9-head(v2.9-023781e52103c45a9bbdf3cb47d60b9336321daa-head, rancher/aks-operator:v1.9.4-rc.2), and I am unable to create AKS cluster with empty-tags or update an existing cluster with empty tag.

@thehejik
Copy link
Collaborator

thehejik commented Nov 6, 2024

Same here on v2.9-head with aks-operator:v1.9.4-rc.2, the empty tag created in rancher is discarded for some reason.

  • created two tags on azure portal: portal_empty_key: , portal_key1: value1
  • created two tags in rancher: rancher_empty_key: , rancher_key1: value1

On rancher:
image

On portal:
image

This is from aks-operator logs, it says Tags were not updated and the empty tags (the portal one and another empty created from rancher) are not present there.

time="2024-11-06T13:01:49Z" level=info msg="Checking configuration for cluster [th-aks (id: c-gkzqz)]"
time="2024-11-06T13:01:51Z" level=info msg="Updating tags for cluster [th-aks (id: c-gkzqz)]"
time="2024-11-06T13:02:01Z" level=info msg="Tags were not updated for cluster [th-aks (id: c-gkzqz)], config map[Account Owner:XXX Account Type:group Cost Center:XXX Department:XXX Environment:test Finance Business Partner:XXX General Ledger Code:XXX StakeholderXXX Team:XXX rancher_key1:value1], upstream map[Account OwnerXXX Account Type:group Cost Center:XXX Department:XXX Environment:test Finance Business Partner:XXX General Ledger Code:XXX Stakeholder:XXX Team:XXX rancher_key1:value1], moving on"

Edit: after adding another empty tag from rancher the original portal_empty_key is also discarded - not present on portal nor rancher anymore.

@thehejik
Copy link
Collaborator

thehejik commented Nov 6, 2024

Same result as in previous comment on v2.10-head with aks-operator:v1.10.0-rc.2.

@kkaempf kkaempf modified the milestones: v2.10.0, v2.10.1 Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Development

No branches or pull requests

4 participants