Skip to content

{AKS} az aks create/update: Update container network logs error message to mention portal enablement of ACNS#9837

Closed
carlotaarvela wants to merge 1 commit intoAzure:mainfrom
carlotaarvela:update-cnl-error-message
Closed

{AKS} az aks create/update: Update container network logs error message to mention portal enablement of ACNS#9837
carlotaarvela wants to merge 1 commit intoAzure:mainfrom
carlotaarvela:update-cnl-error-message

Conversation

@carlotaarvela
Copy link
Copy Markdown
Contributor

This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

az aks create, az aks update

General Guidelines

  • Have you run azdev style aks-preview locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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).

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
Copilot AI review requested due to automatic review settings April 30, 2026 11:49
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Apr 30, 2026

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 30, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown
Contributor

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link
Copy Markdown
Contributor

CodeGen Tools Feedback Collection

Thank 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

@github-actions
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.0b6 entry 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.

Comment on lines 1084 to +1089
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."
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
+++++++

20.0.0b6
+++++++
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
+++++++
++++++++

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants