Change:
return "", "", fmt.Errorf("invalid ip config ID %s", ipConfigurationID) } <del> prefix := matches[1] suffix := matches[2] nodeName := fmt.Sprintf("%s-%s", prefix, suffix) </del> <ins> nicResourceGroup, nicName := matches[1], matches[2] if nicResourceGroup == "" || nicName == "" { return "", "", fmt.Errorf("invalid ip config ID %s", ipConfigurationID) } nic, rerr := as.InterfacesClient.Get(context.Background(), nicResourceGroup, nicName, "") if rerr != nil { return "", "", fmt.Errorf("GetNodeNameByIPConfigurationID(%s): failed to get interface of name %s: %s", ipConfigurationID, nicName, rerr.Error().Error()) } vmID := "" if nic.InterfacePropertiesFormat != nil && nic.VirtualMachine != nil { vmID = to.String(nic.VirtualMachine.ID) } if vmID == "" { klog.V(2).Infof("GetNodeNameByIPConfigurationID(%s): empty vmID", ipConfigurationID) return "", "", nil } </ins> <del> vm, err := as.getVirtualMachine(types.NodeName(nodeName), azcache.CacheReadTypeDefault) </del> <ins> matches = vmIDRE.FindStringSubmatch(vmID) if len(matches) != 2 { return "", "", fmt.Errorf("invalid virtual machine ID %s", vmID) } vmName := matches[1] vm, err := as.getVirtualMachine(types.NodeName(vmName), azcache.CacheReadTypeDefault) </ins> if err != nil { <del> return "", "", fmt.Errorf("cannot get the virtual machine by node name %s", nodeName) </del> <ins> return "", "", fmt.Errorf("cannot get the virtual machine by node name %s", vmName) </ins> } asID := "" if vm.VirtualMachineProperties != nil && vm.AvailabilitySet != nil { asID = to.String(vm.AvailabilitySet.ID) } if asID == "" { <del> return "", "", fmt.Errorf("cannot get the availability set ID from the virtual machine with node name %s", nodeName) </del> <ins> return vmName, "", nil </ins> } asName, err := getAvailabilitySetNameByID(asID) if err != nil { return "", "", fmt.Errorf("cannot get the availability set name by the availability set ID %s", asID) } <del> return nodeName, strings.ToLower(asName), nil </del> <ins> return vmName, strings.ToLower(asName), nil </ins> }

Discussion:
What happened: introduced new dependency on Availability Sets which is too restrictive for some existing installations: What you expected to happen: Azure cloud provider to successfully manage LBs, like it had been doing before. Instead, it died [with][1]: How to reproduce it (as minimally and precisely as possible): Fails every time in OpenShift CI. Can you point us to documentation around the infrastructure options that the Azure cloud provider expects for LB management? https://kubernetes- doesn't say anything about NIC names, and it doesn't have specifics around what things should look like without Availability Sets, or whether "without Availability Sets" is not supported (when previous iterations of the cloud provider had no problem with our lack of Availability Sets). Documenting cloud-provider assumptions about host hardware would have also helped avoid ; CC /sig cloud-provider /area provider/azure [1]:
/triage accepted
/assign
Notes on OpenShift's Azure infrastructure in ARM templates [here][1], in case that helps clarify the infra we use today. Those are OpenShift 4.6 docs, and 4.6 is based on Kubernetes 1.19, and things worked fine. The trouble we've been having when we took the same Azure-infra approach and tried to use it with Kubernetes 1.20, after openshift/kubernetes. [1]:
could you share an example of resourceID (please replace your subscription/resourceName with fake ones)?
Example CI run [here][1] from the NIC-renaming openshift/installer. Installer logs [here][2] include: I'm hoping that the subscription name is not sensitive, because we've been dumping them in public logs for a long time now . Should be IDs for any other resources you're interested in in those logs as well. [1]: [2]: https://gcsweb-
Looks like this is about the master node. Are you using standard LB or a basic one? For standard LB, the master node would be excluded from the LB by default.
[Standard][1] (and [here][2]). Is this documented somewhere? We've been using standard LBs [for years][3], with no problems until the bump to the Kube 1.20 Azure cloud-provider. [1]: [2]: [3]:
Are you referring to the built-in logic of Kube to never target master nodes with a service type LoadBalancer?

That used to be a problem (), but my understanding is that it has since been fixed.
Can we re-open this? kubernetes-sigs/cloud-provider-azure was [not sufficient][1] to get the cloud-provider happy on our infra, which again, contains no Availability Sets. There are some more notes about our infrastructure [here][2] (with discussion in [rhbz][3]), in case that helps. [1]: [2]: [3]:
who has a better grasp on this than me, also just opened . Sounds like fixing that broader issue might obsolete this ticket, because "the cloud-provider expects Availability Sets which OpenShift infra doesn't have in order to figure out which nodes to remove" doesn't matter if the cloud-provider isn't removing any OpenShift nodes in the first place.
can you please confirm the standalone VM scenario is supported? It's a critical use case for CAPZ (our control plane VMs in zone-enabled regions are not placed in availability sets)

What happened: introduced new regex which is too restrictive for some existing installations: This new restriction causes LBs to fail to sync if just one ipConf fails regex. What you expected to happen: This change was to enable optional behavior, any ipConf that fails regex should just be ignored. This will allow existing installs to work as they did prior to the change. How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): Cloud provider or hardware configuration: OS (e.g: ): Kernel (e.g. ): Install tools: Network plugin and version (if this is a network-related bug): Others:
Suggest putting a continue here: This will restore previous functionality and appears to have no undesirable impact.
/sig cloud-provider /area provider/azure
Unclear if we should also put a continue here as well:
/assign
could you share an example of resourceID (please replace your subscription/resourceName with fake ones)? /triage accepted
Here's the error we're seeing: Just the string