[AKS] BREAKING CHANGE: `az aks create`: Remove deprecated parameter `--docker-bridge-cidr`
Related command
az aks create
Description
This field was deprecated in newest api so now getting this warning with every create
docker_bridge_cidr is not a known attribute of class <class 'azure.mgmt.containerservice.v2023_06_01.models._models_py3.ContainerServiceNetworkProfile'> and will be ignored
Forked from PR #27192.
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature
This checklist is used to make sure that common guidelines for a pull request are followed.
-
[x] The PR title and description has followed the guideline in Submitting Pull Requests.
-
[x] I adhere to the Command Guidelines.
-
[x] I adhere to the Error Handling Guidelines.
❌AzureCLI-FullTest
️✔️acr
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
❌acs
❌2020-09-01-hybrid
❌3.11
Type Test Case Error Message Line Failed test_aks_create_default_setting self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f64cf7c0610>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f64cf66ea10>
command = 'aks create --resource-group=clitest000001 --name=cliakstest000001 --location=westus2 --dns-name-prefix=cliaksdns00000...=1 --ssh-key-value=/tmp/tmphds256sz --service-principal=clitest000002 --client-secret=ReplacedSPPassword123* --no-wait'
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:301:
env/lib/python3.11/site-packages/knack/cli.py:245: in invoke
exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
return handle_exception(ex)
ex = ValueError('too many values to unpack (expected 4)'), args = ()
kwargs = {}
def handle_main_exception(ex, *args, *kwargs): # pylint: disable=unused-argument
if isinstance(ex, CannotOverwriteExistingCassetteException):
# This exception usually caused by a no match HTTP request. This is a product error
# that is caused by change of SDK invocation.
raise ex
> raise CliExecutionError(ex)
E azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ValueError during execution and fails the command.
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError
During handling of the above exception, another exception occurred:
self = <azure.cli.command_modules.acs.tests.hybrid_2020_09_01.test_aks_commands.AzureKubernetesServiceScenarioTest testMethod=test_aks_create_default_setting>
resource_group = 'clitest000001', resource_group_location = 'westus2'
sp_name = 'clitest000002', sp_password = 'ReplacedSPPassword123'
@AllowLargeResponse()
@ResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
@RoleBasedServicePrincipalPreparer()
def test_aks_create_default_setting(self, resource_group, resource_group_location, sp_name, sp_password):
# reset the count so in replay mode the random names will start with 0
self.test_resources_count = 0
# kwargs for string formatting
aks_name = self.create_random_name('cliakstest', 16)
self.kwargs.update({
'resource_group': resource_group,
'name': aks_name,
'dns_name_prefix': self.create_random_name('cliaksdns', 16),
'ssh_key_value': self.generate_ssh_keys().replace('\', '\\'),
'location': resource_group_location,
'service_principal': sp_name,
'client_secret': sp_password,
'resource_type': 'Microsoft.ContainerService/ManagedClusters'
})
# create
create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' <br> '--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} ' <br> '--service-principal={service_principal} --client-secret={client_secret} ' <br> '--no-wait'
> self.cmd(create_cmd, checks=[self.is_empty()])
src/azure-cli/azure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:187:
src/azure-cli-testsdk/azure/cli/testsdk/base.py:175: in cmd
return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:250: in init
self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:313: in in_process_execute
raise ex.exception
env/lib/python3.11/site-packages/knack/cli.py:233: in invoke
cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:663: in execute
raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_jobs_serially
results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:697: in run_job
result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:333: in call
return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:121: in handler
return op(**command_args)
src/azure-cli/azure/cli/command_modules/acs/custom.py:639: in aks_create
mc = aks_create_decorator.construct_mc_profile_default()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:6025: in construct_mc_profile_default
mc = self.set_up_network_profile(mc)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:5357: in set_up_network_profile
network_plugin = self.context.get_network_plugin()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2205: in get_network_plugin
return self.get_network_plugin(enable_validation=True)
self = <azure.cli.command_modules.acs.managed_cluster_decorator.AKSManagedClusterContext object at 0x7f64cf455bd0>
enable_validation = True
def _get_network_plugin(self, enable_validation: bool = False) -> Union[str, None]:
"""Internal function to obtain the value of network_plugin.
Note: SDK provides default value "kubenet" for network_plugin.
This function supports the option of enable_validation. When enabled, in case network_plugin is assigned, if
pod_cidr is assigned and the value of network_plugin is azure, an InvalidArgumentValueError will be
raised; otherwise, if any of pod_cidr, service_cidr, dns_service_ip, or network_policy
is assigned, a RequiredArgumentMissingError will be raised.
:return: string or None
"""
# read the original value passed by the command
network_plugin = self.raw_param.get("network_plugin")
# try to read the property value corresponding to the parameter from themcobject
if (
self.mc and
self.mc.network_profile and
self.mc.network_profile.network_plugin is not None
):
network_plugin = self.mc.network_profile.network_plugin
# this parameter does not need dynamic completion
# validation
if enable_validation:
> (
pod_cidr,
service_cidr,
dns_service_ip,
network_policy,
) = self._get_pod_cidr_and_service_cidr_and_dns_service_ip_and_and_network_policy(
enable_validation=False
)
E ValueError: too many values to unpack (expected 4)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2164: ValueErrorazure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:161 Failed test_aks_nodepool_create_scale_delete self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f64cf6deb90>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f64cf66f450>
command = 'aks create --resource-group=clitest000001 --name=cliakstest000001 --location=westus2 --dns-name-prefix=cliaksdns00000...node-count=1 --ssh-key-value=/tmp/tmpym63n9o0 --service-principal=clitest000002 --client-secret=ReplacedSPPassword123*'
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:301:
env/lib/python3.11/site-packages/knack/cli.py:245: in invoke
exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
return handle_exception(ex)
ex = ValueError('too many values to unpack (expected 4)'), args = ()
kwargs = {}
def handle_main_exception(ex, *args, *kwargs): # pylint: disable=unused-argument
if isinstance(ex, CannotOverwriteExistingCassetteException):
# This exception usually caused by a no match HTTP request. This is a product error
# that is caused by change of SDK invocation.
raise ex
> raise CliExecutionError(ex)
E azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ValueError during execution and fails the command.
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError
During handling of the above exception, another exception occurred:
self = <azure.cli.command_modules.acs.tests.hybrid_2020_09_01.test_aks_commands.AzureKubernetesServiceScenarioTest testMethod=test_aks_nodepool_create_scale_delete>
resource_group = 'clitest000001', resource_group_location = 'westus2'
sp_name = 'clitest000002', sp_password = 'ReplacedSPPassword123'
@AllowLargeResponse()
@ResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
@RoleBasedServicePrincipalPreparer()
def test_aks_nodepool_create_scale_delete(self, resource_group, resource_group_location, sp_name, sp_password):
# reset the count so in replay mode the random names will start with 0
self.test_resources_count = 0
# kwargs for string formatting
aks_name = self.create_random_name('cliakstest', 16)
nodepool1_name = "nodepool1"
nodepool2_name = "nodepool2"
tags = "key1=value1"
new_tags = "key2=value2"
labels = "label1=value1"
self.kwargs.update({
'resource_group': resource_group,
'name': aks_name,
'dns_name_prefix': self.create_random_name('cliaksdns', 16),
'ssh_key_value': self.generate_ssh_keys().replace('\', '\\'),
'location': resource_group_location,
'service_principal': sp_name,
'client_secret': sp_password,
'resource_type': 'Microsoft.ContainerService/ManagedClusters',
'tags': tags,
'new_tags': new_tags,
'labels': labels,
'nodepool1_name': nodepool1_name,
'nodepool2_name': nodepool2_name
})
# create
create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' <br> '--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} ' <br> '--service-principal={service_principal} --client-secret={client_secret}'
> self.cmd(create_cmd, checks=[
self.exists('fqdn'),
self.exists('nodeResourceGroup'),
self.check('provisioningState', 'Succeeded')
])
src/azure-cli/azure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:283:
src/azure-cli-testsdk/azure/cli/testsdk/base.py:175: in cmd
return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:250: in init
self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:313: in in_process_execute
raise ex.exception
env/lib/python3.11/site-packages/knack/cli.py:233: in invoke
cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:663: in execute
raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_jobs_serially
results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:697: in run_job
result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:333: in call
return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:121: in handler
return op(**command_args)
src/azure-cli/azure/cli/command_modules/acs/custom.py:639: in aks_create
mc = aks_create_decorator.construct_mc_profile_default()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:6025: in construct_mc_profile_default
mc = self.set_up_network_profile(mc)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:5357: in set_up_network_profile
network_plugin = self.context.get_network_plugin()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2205: in get_network_plugin
return self.get_network_plugin(enable_validation=True)
self = <azure.cli.command_modules.acs.managed_cluster_decorator.AKSManagedClusterContext object at 0x7f64cf704b90>
enable_validation = True
def _get_network_plugin(self, enable_validation: bool = False) -> Union[str, None]:
"""Internal function to obtain the value of network_plugin.
Note: SDK provides default value "kubenet" for network_plugin.
This function supports the option of enable_validation. When enabled, in case network_plugin is assigned, if
pod_cidr is assigned and the value of network_plugin is azure, an InvalidArgumentValueError will be
raised; otherwise, if any of pod_cidr, service_cidr, dns_service_ip, or network_policy
is assigned, a RequiredArgumentMissingError will be raised.
:return: string or None
"""
# read the original value passed by the command
network_plugin = self.raw_param.get("network_plugin")
# try to read the property value corresponding to the parameter from themcobject
if (
self.mc and
self.mc.network_profile and
self.mc.network_profile.network_plugin is not None
):
network_plugin = self.mc.network_profile.network_plugin
# this parameter does not need dynamic completion
# validation
if enable_validation:
> (
pod_cidr,
service_cidr,
dns_service_ip,
network_policy,
) = self._get_pod_cidr_and_service_cidr_and_dns_service_ip_and_and_network_policy(
enable_validation=False
)
E ValueError: too many values to unpack (expected 4)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2164: ValueErrorazure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:249 Failed test_aks_upgrade_node_image_only_cluster self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f64cf675dd0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f64cf66f950>
command = 'aks create --resource-group=clitest000001 --name=cliakstest000001 --nodepool-name c000002 --vm-set-type VirtualMachineScaleSets --node-count=1 --ssh-key-value=/tmp/tmpxpg48a__ -o json'
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:301:
env/lib/python3.11/site-packages/knack/cli.py:245: in invoke
exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
return handle_exception(ex)
ex = ValueError('too many values to unpack (expected 4)'), args = ()
kwargs = {}
def handle_main_exception(ex, *args, **kwargs): # pylint: disable=unused-argument
if isinstance(ex, CannotOverwriteExistingCassetteException):
# This exception usually caused by a no match HTTP request. This is a product error
# that is caused by change of SDK invocation.
raise ex
> raise CliExecutionError(ex)
E azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ValueError during execution and fails the command.
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError
During handling of the above exception, another exception occurred:
self = <azure.cli.command_modules.acs.tests.hybrid_2020_09_01.test_aks_commands.AzureKubernetesServiceScenarioTest testMethod=test_aks_upgrade_node_image_only_cluster>
resource_group = 'clitest000001', resource_group_location = 'westus2'
@AllowLargeResponse()
@ResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
@RoleBasedServicePrincipalPreparer()
def test_aks_upgrade_node_image_only_cluster(self, resource_group, resource_group_location):
# reset the count so in replay mode the random names will start with 0
self.test_resources_count = 0
# kwargs for string formatting
aks_name = self.create_random_name('cliakstest', 16)
node_pool_name = self.create_random_name('c', 6)
self.kwargs.update({
'resource_group': resource_group,
'name': aks_name,
'node_pool_name': node_pool_name,
'ssh_key_value': self.generate_ssh_keys().replace('\', '\\')
})
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' <br> '--nodepool-name {node_pool_name} ' <br> '--vm-set-type VirtualMachineScaleSets --node-count=1 ' <br> '--ssh-key-value={ssh_key_value} ' <br> '-o json'
> self.cmd(create_cmd, checks=[
self.check('provisioningState', 'Succeeded')
])
src/azure-cli/azure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:395:
src/azure-cli-testsdk/azure/cli/testsdk/base.py:175: in cmd
return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:250: in init
self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:313: in in_process_execute
raise ex.exception
env/lib/python3.11/site-packages/knack/cli.py:233: in invoke
cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:663: in execute
raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_jobs_serially
results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:697: in run_job
result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:333: in call
return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:121: in handler
return op(**command_args)
src/azure-cli/azure/cli/command_modules/acs/custom.py:639: in aks_create
mc = aks_create_decorator.construct_mc_profile_default()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:6025: in construct_mc_profile_default
mc = self.set_up_network_profile(mc)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:5357: in set_up_network_profile
network_plugin = self.context.get_network_plugin()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2205: in get_network_plugin
return self.get_network_plugin(enable_validation=True)
self = <azure.cli.command_modules.acs.managed_cluster_decorator.AKSManagedClusterContext object at 0x7f64cf655350>
enable_validation = True
def _get_network_plugin(self, enable_validation: bool = False) -> Union[str, None]:
"""Internal function to obtain the value of network_plugin.
Note: SDK provides default value "kubenet" for network_plugin.
This function supports the option of enable_validation. When enabled, in case network_plugin is assigned, if
pod_cidr is assigned and the value of network_plugin is azure, an InvalidArgumentValueError will be
raised; otherwise, if any of pod_cidr, service_cidr, dns_service_ip, or network_policy
is assigned, a RequiredArgumentMissingError will be raised.
:return: string or None
"""
# read the original value passed by the command
network_plugin = self.raw_param.get("network_plugin")
# try to read the property value corresponding to the parameter from themcobject
if (
self.mc and
self.mc.network_profile and
self.mc.network_profile.network_plugin is not None
):
network_plugin = self.mc.network_profile.network_plugin
# this parameter does not need dynamic completion
# validation
if enable_validation:
> (
pod_cidr,
service_cidr,
dns_service_ip,
network_policy,
) = self._get_pod_cidr_and_service_cidr_and_dns_service_ip_and_and_network_policy(
enable_validation=False
)
E ValueError: too many values to unpack (expected 4)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2164: ValueErrorazure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:373 Failed test_aks_upgrade_node_image_only_nodepool self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f64cf687050>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f64cf66fe90>
command = 'aks create --resource-group=clitest000001 --name=cliakstest000001 --nodepool-name c000002 --vm-set-type VirtualMachineScaleSets --node-count=1 --ssh-key-value=/tmp/tmpkzqboaom -o json'
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:301:
env/lib/python3.11/site-packages/knack/cli.py:245: in invoke
exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
return handle_exception(ex)
ex = ValueError('too many values to unpack (expected 4)'), args = ()
kwargs = {}
def handle_main_exception(ex, *args, **kwargs): # pylint: disable=unused-argument
if isinstance(ex, CannotOverwriteExistingCassetteException):
# This exception usually caused by a no match HTTP request. This is a product error
# that is caused by change of SDK invocation.
raise ex
> raise CliExecutionError(ex)
E azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ValueError during execution and fails the command.
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError
During handling of the above exception, another exception occurred:
self = <azure.cli.command_modules.acs.tests.hybrid_2020_09_01.test_aks_commands.AzureKubernetesServiceScenarioTest testMethod=test_aks_upgrade_node_image_only_nodepool>
resource_group = 'clitest000001', resource_group_location = 'westus2'
@AllowLargeResponse()
@ResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
@RoleBasedServicePrincipalPreparer()
def test_aks_upgrade_node_image_only_nodepool(self, resource_group, resource_group_location):
# reset the count so in replay mode the random names will start with 0
self.test_resources_count = 0
# kwargs for string formatting
aks_name = self.create_random_name('cliakstest', 16)
node_pool_name = self.create_random_name('c', 6)
self.kwargs.update({
'resource_group': resource_group,
'name': aks_name,
'node_pool_name': node_pool_name,
'ssh_key_value': self.generate_ssh_keys().replace('\', '\\')
})
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' <br> '--nodepool-name {node_pool_name} ' <br> '--vm-set-type VirtualMachineScaleSets --node-count=1 ' <br> '--ssh-key-value={ssh_key_value} ' <br> '-o json'
> self.cmd(create_cmd, checks=[
self.check('provisioningState', 'Succeeded')
])
src/azure-cli/azure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:430:
src/azure-cli-testsdk/azure/cli/testsdk/base.py:175: in cmd
return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:250: in init
self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:313: in in_process_execute
raise ex.exception
env/lib/python3.11/site-packages/knack/cli.py:233: in invoke
cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:663: in execute
raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_jobs_serially
results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:697: in run_job
result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:333: in call
return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:121: in handler
return op(**command_args)
src/azure-cli/azure/cli/command_modules/acs/custom.py:639: in aks_create
mc = aks_create_decorator.construct_mc_profile_default()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:6025: in construct_mc_profile_default
mc = self.set_up_network_profile(mc)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:5357: in set_up_network_profile
network_plugin = self.context.get_network_plugin()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2205: in get_network_plugin
return self.get_network_plugin(enable_validation=True)
self = <azure.cli.command_modules.acs.managed_cluster_decorator.AKSManagedClusterContext object at 0x7f64cf6e1f50>
enable_validation = True
def _get_network_plugin(self, enable_validation: bool = False) -> Union[str, None]:
"""Internal function to obtain the value of network_plugin.
Note: SDK provides default value "kubenet" for network_plugin.
This function supports the option of enable_validation. When enabled, in case network_plugin is assigned, if
pod_cidr is assigned and the value of network_plugin is azure, an InvalidArgumentValueError will be
raised; otherwise, if any of pod_cidr, service_cidr, dns_service_ip, or network_policy
is assigned, a RequiredArgumentMissingError will be raised.
:return: string or None
"""
# read the original value passed by the command
network_plugin = self.raw_param.get("network_plugin")
# try to read the property value corresponding to the parameter from themcobject
if (
self.mc and
self.mc.network_profile and
self.mc.network_profile.network_plugin is not None
):
network_plugin = self.mc.network_profile.network_plugin
# this parameter does not need dynamic completion
# validation
if enable_validation:
> (
pod_cidr,
service_cidr,
dns_service_ip,
network_policy,
) = self._get_pod_cidr_and_service_cidr_and_dns_service_ip_and_and_network_policy(
enable_validation=False
)
E ValueError: too many values to unpack (expected 4)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2164: ValueErrorazure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:408 ❌3.9
Type Test Case Error Message Line Failed test_aks_create_default_setting self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f0050c78bb0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0050d68430>
command = 'aks create --resource-group=clitest000001 --name=cliakstest000001 --location=westus2 --dns-name-prefix=cliaksdns00000...=1 --ssh-key-value=/tmp/tmptipo6ln8 --service-principal=clitest000002 --client-secret=ReplacedSPPassword123* --no-wait'
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:301:
env/lib/python3.9/site-packages/knack/cli.py:245: in invoke
exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
return handle_exception(ex)
ex = ValueError('too many values to unpack (expected 4)'), args = ()
kwargs = {}
def handle_main_exception(ex, *args, *kwargs): # pylint: disable=unused-argument
if isinstance(ex, CannotOverwriteExistingCassetteException):
# This exception usually caused by a no match HTTP request. This is a product error
# that is caused by change of SDK invocation.
raise ex
> raise CliExecutionError(ex)
E azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ValueError during execution and fails the command.
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError
During handling of the above exception, another exception occurred:
self = <azure.cli.command_modules.acs.tests.hybrid_2020_09_01.test_aks_commands.AzureKubernetesServiceScenarioTest testMethod=test_aks_create_default_setting>
resource_group = 'clitest000001', resource_group_location = 'westus2'
sp_name = 'clitest000002', sp_password = 'ReplacedSPPassword123'
@AllowLargeResponse()
@ResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
@RoleBasedServicePrincipalPreparer()
def test_aks_create_default_setting(self, resource_group, resource_group_location, sp_name, sp_password):
# reset the count so in replay mode the random names will start with 0
self.test_resources_count = 0
# kwargs for string formatting
aks_name = self.create_random_name('cliakstest', 16)
self.kwargs.update({
'resource_group': resource_group,
'name': aks_name,
'dns_name_prefix': self.create_random_name('cliaksdns', 16),
'ssh_key_value': self.generate_ssh_keys().replace('\', '\\'),
'location': resource_group_location,
'service_principal': sp_name,
'client_secret': sp_password,
'resource_type': 'Microsoft.ContainerService/ManagedClusters'
})
# create
create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' <br> '--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} ' <br> '--service-principal={service_principal} --client-secret={client_secret} ' <br> '--no-wait'
> self.cmd(create_cmd, checks=[self.is_empty()])
src/azure-cli/azure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:187:
src/azure-cli-testsdk/azure/cli/testsdk/base.py:175: in cmd
return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:250: in init
self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:313: in in_process_execute
raise ex.exception
env/lib/python3.9/site-packages/knack/cli.py:233: in invoke
cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:663: in execute
raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_jobs_serially
results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:697: in run_job
result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:333: in call
return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:121: in handler
return op(**command_args)
src/azure-cli/azure/cli/command_modules/acs/custom.py:639: in aks_create
mc = aks_create_decorator.construct_mc_profile_default()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:6025: in construct_mc_profile_default
mc = self.set_up_network_profile(mc)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:5357: in set_up_network_profile
network_plugin = self.context.get_network_plugin()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2205: in get_network_plugin
return self.get_network_plugin(enable_validation=True)
self = <azure.cli.command_modules.acs.managed_cluster_decorator.AKSManagedClusterContext object at 0x7f0050b9deb0>
enable_validation = True
def _get_network_plugin(self, enable_validation: bool = False) -> Union[str, None]:
"""Internal function to obtain the value of network_plugin.
Note: SDK provides default value "kubenet" for network_plugin.
This function supports the option of enable_validation. When enabled, in case network_plugin is assigned, if
pod_cidr is assigned and the value of network_plugin is azure, an InvalidArgumentValueError will be
raised; otherwise, if any of pod_cidr, service_cidr, dns_service_ip, or network_policy
is assigned, a RequiredArgumentMissingError will be raised.
:return: string or None
"""
# read the original value passed by the command
network_plugin = self.raw_param.get("network_plugin")
# try to read the property value corresponding to the parameter from themcobject
if (
self.mc and
self.mc.network_profile and
self.mc.network_profile.network_plugin is not None
):
network_plugin = self.mc.network_profile.network_plugin
# this parameter does not need dynamic completion
# validation
if enable_validation:
> (
pod_cidr,
service_cidr,
dns_service_ip,
network_policy,
) = self._get_pod_cidr_and_service_cidr_and_dns_service_ip_and_and_network_policy(
enable_validation=False
)
E ValueError: too many values to unpack (expected 4)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2164: ValueErrorazure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:161 Failed test_aks_nodepool_create_scale_delete self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f0050ba12b0>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0050d69520>
command = 'aks create --resource-group=clitest000001 --name=cliakstest000001 --location=westus2 --dns-name-prefix=cliaksdns00000...node-count=1 --ssh-key-value=/tmp/tmpkxof833p --service-principal=clitest000002 --client-secret=ReplacedSPPassword123*'
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:301:
env/lib/python3.9/site-packages/knack/cli.py:245: in invoke
exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
return handle_exception(ex)
ex = ValueError('too many values to unpack (expected 4)'), args = ()
kwargs = {}
def handle_main_exception(ex, *args, *kwargs): # pylint: disable=unused-argument
if isinstance(ex, CannotOverwriteExistingCassetteException):
# This exception usually caused by a no match HTTP request. This is a product error
# that is caused by change of SDK invocation.
raise ex
> raise CliExecutionError(ex)
E azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ValueError during execution and fails the command.
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError
During handling of the above exception, another exception occurred:
self = <azure.cli.command_modules.acs.tests.hybrid_2020_09_01.test_aks_commands.AzureKubernetesServiceScenarioTest testMethod=test_aks_nodepool_create_scale_delete>
resource_group = 'clitest000001', resource_group_location = 'westus2'
sp_name = 'clitest000002', sp_password = 'ReplacedSPPassword123'
@AllowLargeResponse()
@ResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
@RoleBasedServicePrincipalPreparer()
def test_aks_nodepool_create_scale_delete(self, resource_group, resource_group_location, sp_name, sp_password):
# reset the count so in replay mode the random names will start with 0
self.test_resources_count = 0
# kwargs for string formatting
aks_name = self.create_random_name('cliakstest', 16)
nodepool1_name = "nodepool1"
nodepool2_name = "nodepool2"
tags = "key1=value1"
new_tags = "key2=value2"
labels = "label1=value1"
self.kwargs.update({
'resource_group': resource_group,
'name': aks_name,
'dns_name_prefix': self.create_random_name('cliaksdns', 16),
'ssh_key_value': self.generate_ssh_keys().replace('\', '\\'),
'location': resource_group_location,
'service_principal': sp_name,
'client_secret': sp_password,
'resource_type': 'Microsoft.ContainerService/ManagedClusters',
'tags': tags,
'new_tags': new_tags,
'labels': labels,
'nodepool1_name': nodepool1_name,
'nodepool2_name': nodepool2_name
})
# create
create_cmd = 'aks create --resource-group={resource_group} --name={name} --location={location} ' <br> '--dns-name-prefix={dns_name_prefix} --node-count=1 --ssh-key-value={ssh_key_value} ' <br> '--service-principal={service_principal} --client-secret={client_secret}'
> self.cmd(create_cmd, checks=[
self.exists('fqdn'),
self.exists('nodeResourceGroup'),
self.check('provisioningState', 'Succeeded')
])
src/azure-cli/azure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:283:
src/azure-cli-testsdk/azure/cli/testsdk/base.py:175: in cmd
return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:250: in init
self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:313: in in_process_execute
raise ex.exception
env/lib/python3.9/site-packages/knack/cli.py:233: in invoke
cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:663: in execute
raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_jobs_serially
results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:697: in run_job
result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:333: in call
return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:121: in handler
return op(**command_args)
src/azure-cli/azure/cli/command_modules/acs/custom.py:639: in aks_create
mc = aks_create_decorator.construct_mc_profile_default()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:6025: in construct_mc_profile_default
mc = self.set_up_network_profile(mc)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:5357: in set_up_network_profile
network_plugin = self.context.get_network_plugin()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2205: in get_network_plugin
return self.get_network_plugin(enable_validation=True)
self = <azure.cli.command_modules.acs.managed_cluster_decorator.AKSManagedClusterContext object at 0x7f0050b32070>
enable_validation = True
def _get_network_plugin(self, enable_validation: bool = False) -> Union[str, None]:
"""Internal function to obtain the value of network_plugin.
Note: SDK provides default value "kubenet" for network_plugin.
This function supports the option of enable_validation. When enabled, in case network_plugin is assigned, if
pod_cidr is assigned and the value of network_plugin is azure, an InvalidArgumentValueError will be
raised; otherwise, if any of pod_cidr, service_cidr, dns_service_ip, or network_policy
is assigned, a RequiredArgumentMissingError will be raised.
:return: string or None
"""
# read the original value passed by the command
network_plugin = self.raw_param.get("network_plugin")
# try to read the property value corresponding to the parameter from themcobject
if (
self.mc and
self.mc.network_profile and
self.mc.network_profile.network_plugin is not None
):
network_plugin = self.mc.network_profile.network_plugin
# this parameter does not need dynamic completion
# validation
if enable_validation:
> (
pod_cidr,
service_cidr,
dns_service_ip,
network_policy,
) = self._get_pod_cidr_and_service_cidr_and_dns_service_ip_and_and_network_policy(
enable_validation=False
)
E ValueError: too many values to unpack (expected 4)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2164: ValueErrorazure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:249 Failed test_aks_upgrade_node_image_only_cluster self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f0050c68a60>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0050d69640>
command = 'aks create --resource-group=clitest000001 --name=cliakstest000001 --nodepool-name c000002 --vm-set-type VirtualMachineScaleSets --node-count=1 --ssh-key-value=/tmp/tmpgui9pv7m -o json'
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:301:
env/lib/python3.9/site-packages/knack/cli.py:245: in invoke
exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
return handle_exception(ex)
ex = ValueError('too many values to unpack (expected 4)'), args = ()
kwargs = {}
def handle_main_exception(ex, *args, **kwargs): # pylint: disable=unused-argument
if isinstance(ex, CannotOverwriteExistingCassetteException):
# This exception usually caused by a no match HTTP request. This is a product error
# that is caused by change of SDK invocation.
raise ex
> raise CliExecutionError(ex)
E azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ValueError during execution and fails the command.
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError
During handling of the above exception, another exception occurred:
self = <azure.cli.command_modules.acs.tests.hybrid_2020_09_01.test_aks_commands.AzureKubernetesServiceScenarioTest testMethod=test_aks_upgrade_node_image_only_cluster>
resource_group = 'clitest000001', resource_group_location = 'westus2'
@AllowLargeResponse()
@ResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
@RoleBasedServicePrincipalPreparer()
def test_aks_upgrade_node_image_only_cluster(self, resource_group, resource_group_location):
# reset the count so in replay mode the random names will start with 0
self.test_resources_count = 0
# kwargs for string formatting
aks_name = self.create_random_name('cliakstest', 16)
node_pool_name = self.create_random_name('c', 6)
self.kwargs.update({
'resource_group': resource_group,
'name': aks_name,
'node_pool_name': node_pool_name,
'ssh_key_value': self.generate_ssh_keys().replace('\', '\\')
})
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' <br> '--nodepool-name {node_pool_name} ' <br> '--vm-set-type VirtualMachineScaleSets --node-count=1 ' <br> '--ssh-key-value={ssh_key_value} ' <br> '-o json'
> self.cmd(create_cmd, checks=[
self.check('provisioningState', 'Succeeded')
])
src/azure-cli/azure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:395:
src/azure-cli-testsdk/azure/cli/testsdk/base.py:175: in cmd
return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:250: in init
self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:313: in in_process_execute
raise ex.exception
env/lib/python3.9/site-packages/knack/cli.py:233: in invoke
cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:663: in execute
raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_jobs_serially
results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:697: in run_job
result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:333: in call
return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:121: in handler
return op(**command_args)
src/azure-cli/azure/cli/command_modules/acs/custom.py:639: in aks_create
mc = aks_create_decorator.construct_mc_profile_default()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:6025: in construct_mc_profile_default
mc = self.set_up_network_profile(mc)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:5357: in set_up_network_profile
network_plugin = self.context.get_network_plugin()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2205: in get_network_plugin
return self.get_network_plugin(enable_validation=True)
self = <azure.cli.command_modules.acs.managed_cluster_decorator.AKSManagedClusterContext object at 0x7f0050ba93a0>
enable_validation = True
def _get_network_plugin(self, enable_validation: bool = False) -> Union[str, None]:
"""Internal function to obtain the value of network_plugin.
Note: SDK provides default value "kubenet" for network_plugin.
This function supports the option of enable_validation. When enabled, in case network_plugin is assigned, if
pod_cidr is assigned and the value of network_plugin is azure, an InvalidArgumentValueError will be
raised; otherwise, if any of pod_cidr, service_cidr, dns_service_ip, or network_policy
is assigned, a RequiredArgumentMissingError will be raised.
:return: string or None
"""
# read the original value passed by the command
network_plugin = self.raw_param.get("network_plugin")
# try to read the property value corresponding to the parameter from themcobject
if (
self.mc and
self.mc.network_profile and
self.mc.network_profile.network_plugin is not None
):
network_plugin = self.mc.network_profile.network_plugin
# this parameter does not need dynamic completion
# validation
if enable_validation:
> (
pod_cidr,
service_cidr,
dns_service_ip,
network_policy,
) = self._get_pod_cidr_and_service_cidr_and_dns_service_ip_and_and_network_policy(
enable_validation=False
)
E ValueError: too many values to unpack (expected 4)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2164: ValueErrorazure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:373 Failed test_aks_upgrade_node_image_only_nodepool self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f0050c64a30>
cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f0050d69700>
command = 'aks create --resource-group=clitest000001 --name=cliakstest000001 --nodepool-name c000002 --vm-set-type VirtualMachineScaleSets --node-count=1 --ssh-key-value=/tmp/tmpqu2pj21r -o json'
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:301:
env/lib/python3.9/site-packages/knack/cli.py:245: in invoke
exit_code = self.exception_handler(ex)
src/azure-cli-core/azure/cli/core/init.py:127: in exception_handler
return handle_exception(ex)
ex = ValueError('too many values to unpack (expected 4)'), args = ()
kwargs = {}
def handle_main_exception(ex, *args, **kwargs): # pylint: disable=unused-argument
if isinstance(ex, CannotOverwriteExistingCassetteException):
# This exception usually caused by a no match HTTP request. This is a product error
# that is caused by change of SDK invocation.
raise ex
> raise CliExecutionError(ex)
E azure.cli.testsdk.exceptions.CliExecutionError: The CLI throws exception ValueError during execution and fails the command.
src/azure-cli-testsdk/azure/cli/testsdk/patches.py:35: CliExecutionError
During handling of the above exception, another exception occurred:
self = <azure.cli.command_modules.acs.tests.hybrid_2020_09_01.test_aks_commands.AzureKubernetesServiceScenarioTest testMethod=test_aks_upgrade_node_image_only_nodepool>
resource_group = 'clitest000001', resource_group_location = 'westus2'
@AllowLargeResponse()
@ResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='westus2')
@RoleBasedServicePrincipalPreparer()
def test_aks_upgrade_node_image_only_nodepool(self, resource_group, resource_group_location):
# reset the count so in replay mode the random names will start with 0
self.test_resources_count = 0
# kwargs for string formatting
aks_name = self.create_random_name('cliakstest', 16)
node_pool_name = self.create_random_name('c', 6)
self.kwargs.update({
'resource_group': resource_group,
'name': aks_name,
'node_pool_name': node_pool_name,
'ssh_key_value': self.generate_ssh_keys().replace('\', '\\')
})
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' <br> '--nodepool-name {node_pool_name} ' <br> '--vm-set-type VirtualMachineScaleSets --node-count=1 ' <br> '--ssh-key-value={ssh_key_value} ' <br> '-o json'
> self.cmd(create_cmd, checks=[
self.check('provisioningState', 'Succeeded')
])
src/azure-cli/azure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:430:
src/azure-cli-testsdk/azure/cli/testsdk/base.py:175: in cmd
return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:250: in init
self.in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:313: in in_process_execute
raise ex.exception
env/lib/python3.9/site-packages/knack/cli.py:233: in invoke
cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/init.py:663: in execute
raise ex
src/azure-cli-core/azure/cli/core/commands/init.py:726: in run_jobs_serially
results.append(self.run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/init.py:697: in run_job
result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/init.py:333: in call
return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:121: in handler
return op(**command_args)
src/azure-cli/azure/cli/command_modules/acs/custom.py:639: in aks_create
mc = aks_create_decorator.construct_mc_profile_default()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:6025: in construct_mc_profile_default
mc = self.set_up_network_profile(mc)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:5357: in set_up_network_profile
network_plugin = self.context.get_network_plugin()
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2205: in get_network_plugin
return self.get_network_plugin(enable_validation=True)
self = <azure.cli.command_modules.acs.managed_cluster_decorator.AKSManagedClusterContext object at 0x7f0050ba9370>
enable_validation = True
def _get_network_plugin(self, enable_validation: bool = False) -> Union[str, None]:
"""Internal function to obtain the value of network_plugin.
Note: SDK provides default value "kubenet" for network_plugin.
This function supports the option of enable_validation. When enabled, in case network_plugin is assigned, if
pod_cidr is assigned and the value of network_plugin is azure, an InvalidArgumentValueError will be
raised; otherwise, if any of pod_cidr, service_cidr, dns_service_ip, or network_policy
is assigned, a RequiredArgumentMissingError will be raised.
:return: string or None
"""
# read the original value passed by the command
network_plugin = self.raw_param.get("network_plugin")
# try to read the property value corresponding to the parameter from themcobject
if (
self.mc and
self.mc.network_profile and
self.mc.network_profile.network_plugin is not None
):
network_plugin = self.mc.network_profile.network_plugin
# this parameter does not need dynamic completion
# validation
if enable_validation:
> (
pod_cidr,
service_cidr,
dns_service_ip,
network_policy,
) = self._get_pod_cidr_and_service_cidr_and_dns_service_ip_and_and_network_policy(
enable_validation=False
)
E ValueError: too many values to unpack (expected 4)
src/azure-cli/azure/cli/command_modules/acs/managed_cluster_decorator.py:2164: ValueErrorazure/cli/command_modules/acs/tests/hybrid_2020_09_01/test_aks_commands.py:408 🔄latest
🔄3.11
🔄3.9
️✔️advisor
️✔️latest
️✔️3.11
️✔️3.9
🔄ams
🔄latest
️✔️3.11
🔄3.9
🔄apim
🔄latest
️✔️3.11
🔄3.9
️✔️appconfig
️✔️latest
️✔️3.11
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.11
️✔️3.9
🔄aro
🔄latest
🔄3.11
🔄3.9
🔄backup
🔄latest
🔄3.11
🔄3.9
🔄batch
🔄latest
🔄3.11
🔄3.9
️✔️batchai
️✔️latest
️✔️3.11
️✔️3.9
️✔️billing
️✔️latest
️✔️3.11
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.11
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.11
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.11
️✔️3.9
🔄cognitiveservices
🔄latest
️✔️3.11
🔄3.9
🔄config
🔄latest
️✔️3.11
🔄3.9
️✔️configure
️✔️latest
️✔️3.11
️✔️3.9
🔄consumption
🔄latest
️✔️3.11
🔄3.9
️✔️container
️✔️latest
️✔️3.11
️✔️3.9
🔄containerapp
🔄latest
️✔️3.11
🔄3.9
🔄core
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
🔄latest
🔄3.11
🔄3.9
🔄cosmosdb
🔄latest
🔄3.11
🔄3.9
🔄databoxedge
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
🔄latest
🔄3.11
🔄3.9
🔄dla
🔄latest
️✔️3.11
🔄3.9
🔄dls
🔄latest
️✔️3.11
🔄3.9
🔄dms
🔄latest
️✔️3.11
🔄3.9
️✔️eventgrid
️✔️latest
️✔️3.11
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.11
️✔️3.9
🔄feedback
🔄latest
🔄3.11
🔄3.9
️✔️find
️✔️latest
️✔️3.11
️✔️3.9
🔄hdinsight
🔄latest
️✔️3.11
🔄3.9
🔄identity
🔄latest
🔄3.11
🔄3.9
️✔️iot
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
🔄keyvault
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
🔄latest
🔄3.11
🔄3.9
🔄kusto
🔄latest
🔄3.11
🔄3.9
️✔️lab
️✔️latest
️✔️3.11
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.11
️✔️3.9
🔄maps
🔄latest
️✔️3.11
🔄3.9
🔄marketplaceordering
🔄latest
🔄3.11
🔄3.9
️✔️monitor
️✔️latest
️✔️3.11
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.11
️✔️3.9
🔄netappfiles
🔄latest
🔄3.11
🔄3.9
️✔️network
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.11
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.11
️✔️3.9
🔄profile
🔄latest
🔄3.11
🔄3.9
🔄rdbms
🔄latest
🔄3.11
🔄3.9
️✔️redis
️✔️latest
️✔️3.11
️✔️3.9
️✔️relay
️✔️latest
️✔️3.11
️✔️3.9
️✔️resource
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️latest
️✔️3.11
️✔️3.9
🔄role
🔄latest
🔄3.11
🔄3.9
️✔️search
️✔️latest
️✔️3.11
️✔️3.9
🔄security
🔄latest
🔄3.11
🔄3.9
️✔️servicebus
️✔️latest
️✔️3.11
️✔️3.9
🔄serviceconnector
🔄latest
️✔️3.11
🔄3.9
️✔️servicefabric
️✔️latest
️✔️3.11
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.11
️✔️3.9
️✔️sql
️✔️latest
️✔️3.11
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.11
️✔️3.9
🔄storage
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
🔄latest
🔄3.11
🔄3.9
️✔️synapse
️✔️latest
️✔️3.11
️✔️3.9
🔄telemetry
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
🔄latest
️✔️3.11
🔄3.9
️✔️util
️✔️latest
️✔️3.11
️✔️3.9
🔄vm
️✔️2018-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.11
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.11
️✔️3.9
🔄latest
️✔️3.11
🔄3.9
❌AzureCLI-BreakingChangeTest
❌acs
rule cmd_name rule_message suggest_message ❌ 1007 - ParaRemove aks create cmd aks createremoved parameterdocker_bridge_addressplease add back parameter docker_bridge_addressfor cmdaks create
AKS
Could you please fix these CI issues?
Marked as draft, as this is a breaking change, reschedule to the next breaking change window (next Build Event sprint).