You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps did you take and what happened:
Tried to bootstrap a new cluster with an AzureMachineTemplate that worked in CAPZ v1.7.0. The azurejson_machinetemplate_controller failed to create a secret for the azure json. The following error was emitted in the logs:
E0530 20:42:02.758002 1 controller.go:329] "msg"="Reconciler error" "error"="failed to get user-assigned identity ClientID: invalid resource ID: resource id 'azure:///subscriptions/<snip>/resourcegroups/<snip>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<snip>' must start with '/'" "AzureMachineTemplate"={"name":"<snip>","namespace":"<snip>"} "controller"="azuremachinetemplate" "controllerGroup"="infrastructure.cluster.x-k8s.io" "controllerKind"="AzureMachineTemplate" "name"="<snip>" "namespace"="<snip>" "reconcileID"="<snip>"
If I use an AzureMachineTemplate that has a userAssignedIdentity providerID value that starts with /subscriptions instead of azure:///subscriptions the error goes away and things work as expected. However this is not how the field is documented to be used here.
/kind bug
What steps did you take and what happened:
Tried to bootstrap a new cluster with an AzureMachineTemplate that worked in CAPZ v1.7.0. The azurejson_machinetemplate_controller failed to create a secret for the azure json. The following error was emitted in the logs:
If I use an AzureMachineTemplate that has a userAssignedIdentity providerID value that starts with
/subscriptions
instead ofazure:///subscriptions
the error goes away and things work as expected. However this is not how the field is documented to be used here.It looks like this bug was introduced because the behavior of the new
ParseResourceID
function from the new arm package is not fully compatible with theParseResourceID
function from the autorest package that was used previously.Old function: https://github.com/Azure/go-autorest/blob/autorest/v0.11.29/autorest/azure/azure.go#L215-L217
New function: https://github.com/Azure/azure-sdk-for-go/blob/sdk/azcore/v1.6.0/sdk/azcore/arm/internal/resource/resource_identifier.go#L64C6-L71
What did you expect to happen:
Existing, working AzureMachineTemplate yaml should work when upgrading CAPZ from v1.7.0 to v1.9.2.
Anything else you would like to add:
It looks like the breaking change was introduced in #3337.
Environment:
kubectl version
): v1.21.14/etc/os-release
): Ubuntu 20.04The text was updated successfully, but these errors were encountered: