Cluster-api-provider-azure: Errors in logs when system assigned is enabled

Created on 22 Sep 2020  路  5Comments  路  Source: kubernetes-sigs/cluster-api-provider-azure

/kind bug

What steps did you take and what happened:
[A clear and concise description of what the bug is.]

It looks like something might have changed on the Azure side. Role assignment creation used to be idempotent https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/811#issuecomment-662173226.

Now I'm seeing a bunch of RoleAssignmentExists errors in controller logs when using the system assigned flavor.

How to repro: use latest commit and deploy tilt system assigned flavor, look at capz controller logs.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • cluster-api-provider-azure version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):
kinbug

All 5 comments

cc @jackfrancis / @nader-ziada

/assign

This template is not idempotent unless the same roleNameGuid value is provided as a parameter for each deployment of the template. If no roleNameGuid is provided, by default a new GUID is generated on each deployment and subsequent deployments will fail with a Conflict: RoleAssignmentExists error.

https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-template

we need to somehow get the role assignment guid and update the VM with it?

I'm working on a fix, will have a PR out in a few minutes

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mboersma picture mboersma  路  9Comments

mboersma picture mboersma  路  6Comments

chewong picture chewong  路  3Comments

CecileRobertMichon picture CecileRobertMichon  路  5Comments

abhishek-jnpr picture abhishek-jnpr  路  8Comments