{AKS} az aks create/update: Update container network logs error message to mention portal enablement of ACNS#9837
Conversation
Improve the error message for container network logs (CNL) validation to provide clearer guidance on how to enable Advanced Container Networking Services and the additional requirements. Related command: az aks create / az aks update
️✔️Azure CLI Extensions Breaking Change Test
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
There was a problem hiding this comment.
Pull request overview
Updates the aks-preview extension to improve user guidance when az aks create/update validation fails for container network logs (CNL) due to missing ACNS enablement.
Changes:
- Bump aks-preview extension version to
20.0.0b6. - Update the CNL validation error message to provide more explicit remediation guidance (portal /
--enable-acns) and list additional prerequisites. - Add a
20.0.0b6entry to the changelog.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/aks-preview/setup.py |
Bumps extension version to 20.0.0b6. |
src/aks-preview/azext_aks_preview/managed_cluster_decorator.py |
Updates the InvalidArgumentValueError message for CNL prerequisite validation. |
src/aks-preview/HISTORY.rst |
Adds release notes entry for 20.0.0b6. |
| if not acns_enabled or not monitoring_enabled: | ||
| raise InvalidArgumentValueError( | ||
| "Container network logs requires '--enable-acns', advanced networking " | ||
| "to be enabled, and the monitoring addon to be enabled." | ||
| "Container network logs require Advanced Container Networking Services to be enabled. " | ||
| "Activate this service through the portal or use the CLI with --enable-acns flag. " | ||
| "Additionally, the monitoring addon must be enabled and the cilium network dataplane " | ||
| "is required." |
There was a problem hiding this comment.
The raised error message mentions requirements (ACNS enablement via portal/--enable-acns, monitoring addon, and cilium dataplane), but the validation here only checks ACNS + monitoring (no cilium check) and it triggers for either missing prerequisite. This can mislead users (e.g., ACNS already enabled but monitoring missing). Consider tailoring the message based on which condition failed and either (a) add an explicit cilium dataplane validation if it’s truly required, or (b) drop/soften the cilium statement to match what is validated here.
| +++++++ | ||
|
|
||
| 20.0.0b6 | ||
| +++++++ |
There was a problem hiding this comment.
The section underline for the new "20.0.0b6" heading is shorter than the heading text (7 '+' vs 8 chars). In reStructuredText, section adornment lines should be at least as long as the title to avoid rendering/parsing warnings; please adjust the underline length accordingly.
| +++++++ | |
| ++++++++ |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az aks create,az aks updateGeneral Guidelines
azdev style aks-previewlocally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)Description
Improves the error message for container network logs (CNL) validation when ACNS is not enabled.
The previous message was terse and did not guide users on how to resolve the issue. The new message
clearly states that Advanced Container Networking Services must be enabled, explains how to activate
it (via portal or CLI with --enable-acns), and notes the additional requirements (monitoring addon
and cilium network dataplane).