Azure / Azure/azure-cli-extensions

az ml computetarget create aks is always ignoring --service-cidr value and use default one

Open
#4,555 3 comments 0 reactions 0 assignees View on GitHub
Auto-Assign customer-reported extension/ml feature-request Machine Learning Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Extension name (the extension in question)
azure-cli-ml

### Description of issue (in as much detail as possible)
Version details:
{
"azure-cli": "2.33.0",
"azure-cli-core": "2.33.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"azure-cli-ml": "1.37.0",
"azure-devops": "0.23.0"
}
}

**Issue**: Seems like when running *az ml computetarget create aks* it always want to create it with service CIDR 10.0.0.0/16, even when different value has been provided.

**Prerequisites for reproduction**:
- Create Vnet (10.0.0.0/8, called test-vnet) with default subnet (10.0.0.0/24) and second AKS dedicated subnet (10.240.0.0/16, called test-subnet)

Run following command:
```
az ml computetarget create aks --name testaks --resource-group test-rg --subnet-name test-subnet--vnet-name test-vnet --workspace-name test-ml --vnet-resourcegroup-name test-rg --docker-bridge-cidr 172.17.0.1/16 --service-cidr 10.10.0.0/16 --dns-service-ip 10.10.0.10 -v
```

It will throw error like:
```
{'Azure-cli-ml Version': '1.37.0', 'Error': ComputeTargetException:
Message: Compute object provisioning polling reached non-successful terminal state, current provisioning state: Failed
Provisioning operation error:
{'code': 'BadRequest', 'message': 'Cluster Deployment failed. Service invocation failed!\r\nRequest: PUT https://westeurope.management.azure.com//subscriptions/****/resourceGroups/***/providers/Microsoft.ContainerService/managedClusters/***?api-version=2020-09-01\r\nStatus Code: 400 BadRequest\r\nReason Phrase: Bad Request\r\nResponse Body: {\n "code": "ServiceCidrOverlapExistingSubnetsCidr",\n "message": "The specified service CIDR 10.0.0.0/16 is conflicted with an existing subnet CIDR 10.0.0.0/24",\n "target": "networkProfile.serviceCIDR"\n }'}
InnerException None
ErrorResponse
{
"error": {
"message": "Compute object provisioning polling reached non-successful terminal state, current provisioning state: Failed\nProvisioning operation error:\n{'code': 'BadRequest', 'message': 'Cluster Deployment failed. Service invocation failed!\\r\\nRequest: PUT https://westeurope.management.azure.com//subscriptions/****/resourceGroups/****/providers/Microsoft.ContainerService/managedClusters/***?api-version=2020-09-01\\r\\nStatus Code: 400 BadRequest\\r\\nReason Phrase: Bad Request\\r\\nResponse Body: {\\n \"code\": \"ServiceCidrOverlapExistingSubnetsCidr\",\\n \"message\": \"The specified service CIDR 10.0.0.0/16 is conflicted with an existing subnet CIDR 10.0.0.0/24\",\\n \"target\": \"networkProfile.serviceCIDR\"\\n }'}"
}
}}
```

Whatever I specified for *--service-cidr* it always want to create it with default 10.0.0.0/16.
I tried with 10.1.0.0/16, 10.2.0.0/16 etc -> always the same.
To fix it, I had to edit my default subnet range (10.0.0.0/24) to 10.1.0.0/24.

So tu summarize, it looks like whatever is passed to *--service-cidr* it is ignored and command is trying to use default 10.0.0.0/16.

-----

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.