Azure / Azure/aks-desktop

Register Cluster: concurrent addon updates cause EtagMismatch and cilium flags outdated

Open
#426 1 comment 0 reactions 1 assignee Claimed by @gambtho View on GitHub
bug triage
Dominant language
TypeScript
Stars
102
Forks
25
Avg merge
1d 4h
Merged PRs (30d)
22

Description

## Bug Report

### Bug 1: Concurrent cluster update operations cause EtagMismatch

**Steps to reproduce:**
1. Create an AKS cluster with `az aks create` (with `--enable-aad`, `--enable-oidc-issuer`, `--enable-workload-identity`, `--enable-azure-rbac`, `--attach-acr`, `--network-plugin azure --network-plugin-mode overlay --network-dataplane cilium`)
2. Register the cluster in AKS Desktop — all 3 addon options (Azure Monitor Metrics, KEDA, VPA) are ticked as missing
3. Click "Configure Cluster"

**Expected:** All addons are enabled successfully.

**Actual:** `EtagMismatch` / "Another operation is in progress" errors. The UI fires separate `az aks update` commands for each addon in parallel via `Promise.allSettled`, but AKS only allows one cluster update at a time.

Additionally, when one addon completes, the UI does not update to show it as already configured — it may attempt to re-install it.

### Bug 2: Cilium enable flags are outdated

The network policy info message references `--network-policy cilium`, but the current Azure CLI uses `--network-plugin azure --network-plugin-mode overlay --network-dataplane cilium`.

### Fix Plan

1. **Combine addon flags into a single `az aks update` command** instead of firing parallel calls — e.g., `az aks update --enable-keda --enable-vpa --enable-azure-monitor-metrics --no-wait`
2. **Show already-enabled addons** as checked+disabled checkboxes with "(already enabled)" label instead of hiding them
3. **Update cilium flags** in the network policy info message

### Files affected
- `plugins/aks-desktop/src/utils/azure/az-cli.ts`
- `plugins/aks-desktop/src/components/CreateAKSProject/components/ClusterConfigurePanel.tsx`
- `plugins/aks-desktop/src/components/CreateAKSProject/components/ClusterConfigurePanel.test.tsx`
- `plugins/aks-desktop/src/utils/test/getClusterCapabilities.test.ts`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.