Skip to content

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

Closed
carlotaarvela wants to merge 2 commits intoAzure:devfrom
carlotaarvela:update-cnl-error-message
Closed

{AKS} az aks create/update: Update container network logs error message to mention portal enablement of ACNS#33299
carlotaarvela wants to merge 2 commits intoAzure:devfrom
carlotaarvela:update-cnl-error-message

Conversation

@carlotaarvela
Copy link
Copy Markdown
Contributor

Related command
az aks create, az aks update

Description

Updated the error message shown when a user tries to enable container network logs (CNL) without having Advanced Container Networking Services (ACNS) enabled. Previously, the message only referenced the --enable-acns CLI flag. Since ACNS can now also be enabled through the Azure portal, the error message has been updated to inform users of both options.

New message:

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

Testing Guide

# Attempt to enable CNL without ACNS — should show updated error message
az aks create -g myRG -n myCluster --network-plugin azure --network-plugin-mode overlay --network-dataplane cilium --enable-addons monitoring --enable-container-network-logs

History Notes

[AKS] az aks create/update: Update container network logs error message to mention portal enablement of ACNS


Copilot AI review requested due to automatic review settings April 30, 2026 10:51
@azure-client-tools-bot-prd
Copy link
Copy Markdown

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

❌AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
❌appservice
❌latest
❌3.12
Type Test Case Error Message Line
Failed test_linux_webapp_quick_create_cd self = <azure.cli.testsdk.base.ExecutionResult object at 0x7fec56b9cb60>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7fec5771b260>
command = 'webapp create -g clitest.rg000001 -n webapp-linux-cd000002 --plan plan-quick-linux-cd -u https://github.com/yugangw-msft/azure-site-test.git&nbsp;-r&nbsp;"NODE
20-lts"'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.12/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:157: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                       _ 

ex = ValidationError("Linux Runtime 'NODE
Failed test_win_webapp_quick_create_cd The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:174
Failed test_win_webapp_quick_create_runtime The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:156
Failed test_download_win_web_log The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:480
Failed test_webapp_config The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:732
Failed test_linux_webapp The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1261
Failed test_linux_webapp_remote_ssh The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1366
Failed test_acr_integration The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1427
Failed test_webapp_linux_acr_use_identity The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2592
Failed test_webapp_deployment_source_track_runtimestatus_buildfailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3368
Failed test_webapp_deployment_source_track_runtimestatus_runtimefailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3381
Failed test_webapp_track_runtimestatus_buildfailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3307
Failed test_webapp_track_runtimestatus_runtimefailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3320
❌3.13
Type Test Case Error Message Line
Failed test_linux_webapp_quick_create_cd self = <azure.cli.testsdk.base.ExecutionResult object at 0x7ff47bc5ec10>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7ff47cc4a990>
command = 'webapp create -g clitest.rg000001 -n webapp-linux-cd000002 --plan plan-quick-linux-cd -u https://github.com/yugangw-msft/azure-site-test.git&nbsp;-r&nbsp;"NODE
20-lts"'
expect_failure = False

    def in_process_execute(self, cli_ctx, command, expect_failure=False):
        from io import StringIO
        from vcr.errors import CannotOverwriteExistingCassetteException
    
        if command.startswith('az '):
            command = command[3:]
    
        stdout_buf = StringIO()
        logging_buf = StringIO()
        try:
            # issue: stderr cannot be redirect in this form, as a result some failure information
            # is lost when command fails.
>           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/azure-cli-testsdk/azure/cli/testsdk/base.py:303: 
                                        
env/lib/python3.13/site-packages/knack/cli.py:245: in invoke
    exit_code = self.exception_handler(ex)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
src/azure-cli-core/azure/cli/core/init.py:157: in exception_handler
    return handle_exception(ex)
           ^^^^^^^^^^^^^^^^^^^^
                                       _ 

ex = ValidationError("Linux Runtime 'NODE
Failed test_win_webapp_quick_create_cd The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:174
Failed test_win_webapp_quick_create_runtime The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:156
Failed test_download_win_web_log The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:480
Failed test_webapp_config The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:732
Failed test_linux_webapp The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1261
Failed test_linux_webapp_remote_ssh The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1366
Failed test_acr_integration The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1427
Failed test_webapp_linux_acr_use_identity The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:2592
Failed test_webapp_deployment_source_track_runtimestatus_buildfailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3368
Failed test_webapp_deployment_source_track_runtimestatus_runtimefailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3381
Failed test_webapp_track_runtimestatus_buildfailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3307
Failed test_webapp_track_runtimestatus_runtimefailed The error message is too long, please check the pipeline log for details. azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3320
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link
Copy Markdown

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

️✔️AzureCLI-BreakingChangeTest
️✔️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

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>

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 managed cluster decorator validation message shown when users enable container network logs (CNL) without meeting prerequisites, expanding the guidance beyond just the CLI flag.

Changes:

  • Updated the InvalidArgumentValueError message for CNL prerequisite validation to mention enabling ACNS via portal or --enable-acns.
  • Reworded the message to be more descriptive about required services/addons.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +2771 to +2772
"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. "
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 new error message introduces the term "Advanced Container Networking Services" for ACNS, but the rest of this command module’s help/params text expands ACNS as "Azure Container Networking Solution (ACNS)". To avoid user confusion, please align this message’s terminology with the existing ACNS naming (or update the other user-facing strings consistently in the same PR). Also consider saying "Azure portal" (consistent with other help strings) instead of the generic "portal".

Suggested change
"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. "
"Container network logs require Azure Container Networking Solution (ACNS) to be enabled. "
"Activate this service through the Azure portal or use the CLI with --enable-acns flag. "

Copilot uses AI. Check for mistakes.
@carlotaarvela carlotaarvela changed the title Update CNL error message to mention portal and --enable-acns flag [AKS] Update container network logs error message to mention portal and --enable-acns flag Apr 30, 2026
@carlotaarvela carlotaarvela changed the title [AKS] Update container network logs error message to mention portal and --enable-acns flag {AKS} az aks create/update: Update container network logs error message to mention portal enablement of ACNS Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants