Azure / Azure/azure-cli-extensions
az connectedk8s connect fails without a helpful error when extension is out of date
- Dominant language
- Python
- Stars
- 454
- Forks
- 1.7k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 64
Description
### Describe the bug
`az connectedk8s connect` failed when the version was 1.7.2 and succeeded when the version was 1.9.2. If the error text suggested an update then could save time. The documentation does mention using the latest version, however, we have had several users find that the next step was not obvious.
### Related command
```
az connectedk8s connect --name "${prefix}-arc" --resource-group "${prefix}-rg" --location "${location}"
```
### Errors
```
xxx-dev0 ~/xxx $ az connectedk8s connect --name "${prefix}-arc" --resource-group "${prefix}-rg" --location "${location}"
This operation might take a while...
Cluster diagnostics job didn't reach completed state in the kubernetes cluster. The possible reasons can be resource constraints on the cluster.
The pre-check result logs have been saved at this path: /home/xxx/.azure/pre_onboarding_check_logs/xxx-aks-arc-xxx.
These logs can be attached while filing a support ticket for further assistance.
Execution of pre-onboarding checks failed and hence not proceeding with cluster onboarding. Please meet the prerequisites
- 'https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/quickstart-connect-cluster?tabs=azure-cli%2Cazure-cloud#prerequisites' and try onboarding again.
```
### Issue script & Debug output
Output not available.
### Expected behavior
A specific suggestion of updating the extension would be more helpful than the current error.
### Environment Summary
```
xxx-dev0 ~/xxx $ az --version
azure-cli 2.63.0 *
core 2.63.0 *
telemetry 1.1.0
Extensions:
azure-devops 1.0.0
connectedk8s 1.7.2
k8s-extension 1.6.1
serial-console 1.0.0b1
Dependencies:
msal 1.30.0
azure-mgmt-resource 23.1.1
Python location '/opt/az/bin/python3'
Extensions directory '/home/xxx/.azure/cliextensions'
Python (Linux) 3.11.8 (main, Jul 31 2024, 03:39:39) [GCC 11.4.0]
Legal docs and information: aka.ms/AzureCliLegal
You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade'
```
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.