lb-manager role missing required right Microsoft.Network/networkSecurityGroups/read

Bug #1929619 reported by Drew Freiberger
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Azure Integrator Charm
Fix Released
High
Unassigned

Bug Description

Action "Microsoft.Network/networkSecurityGroups/read" is needed for the EnsureLoadBalancer process within kube-controller-manager when running on Azure while using network security groups.

Please add this action into the lb-manager.json:
https://github.com/juju-solutions/charm-azure-integrator/blob/master/files/roles/lb-manager.json

Missing the configuration results in errors like:
  Warning UpdateLoadBalancerFailed 4m7s (x170 over 4h27m) service-controller Error updating load balancer with new hosts map[prd-aifactory-k8s-worker-vm-0:{} prd-aifactory-k8s-worker-vm-1:{} prd-aifactory-k8s-worker-vm-2:{} prd-aifactory-k8s-worker-vm-3:{} prd-aifactory-k8s-worker-vm-4:{} prd-aifactory-k8s-worker-vm-5:{} prd-aifactory-k8s-worker-vm-6:{} prd-aifactory-k8s-worker-vm-7:{}]: Retriable: false, RetryAfter: 0s, HTTPStatusCode: 403, RawError: Retriable: false, RetryAfter: 0s, HTTPStatusCode: 403, RawError: {"error":{"code":"AuthorizationFailed","message":"The client '$clientuuid' with object id '$clientuuid' does not have authorization to perform action 'Microsoft.Network/networkSecurityGroups/read' over scope '/subscriptions/$MYSUBUUID/resourceGroups/$mynetwork/providers/Microsoft.Network/networkSecurityGroups/juju-internal-nsg' or the scope is invalid. If access was recently granted, please refresh your credentials."}}

The charm continues to update this and reverts manual changes made to the role definition causing recurring production outages for loadbalancers and ends up flooding the API with too many calls to EnsureLoadBalancer.

Revision history for this message
Drew Freiberger (afreiberger) wrote :

Adding field-high as the charm reverts manual changes and affects LB creation/update and causes Azure API denial of service due to retries of failed LB updates.

Revision history for this message
Drew Freiberger (afreiberger) wrote :

Workaround:
Find the LB-manager role definition:

az role definition list -o table|grep juju-charm-lb-manager
az role definition list --name $role-name-uuid --output json > lb-role.json
vi lb-role.json
  # remove the surrounding [ ] list brackets from top and bottom lines
  # add a comma after the last Actions section item, and add this line within Actions:
  "Microsoft.Network/networkSecurityGroups/read"
  # save the file and quit vi
az role definition update --role-definition ./lb-role.json

Revision history for this message
Drew Freiberger (afreiberger) wrote :
George Kraft (cynerva)
Changed in charm-azure-integrator:
importance: Undecided → High
George Kraft (cynerva)
Changed in charm-azure-integrator:
status: New → Fix Committed
tags: added: backport-needed
Changed in charm-azure-integrator:
milestone: none → 1.21+ck3
Revision history for this message
George Kraft (cynerva) wrote :
tags: removed: backport-needed
Changed in charm-azure-integrator:
milestone: 1.21+ck3 → 1.21+ck2
Revision history for this message
Cory Johns (johnsca) wrote :

This was released on May 28th with azure-integrator rev 97.

Changed in charm-azure-integrator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.