mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Return an error when zone info is not found.
This commit is contained in:
parent
ac6c77c440
commit
19c09ff309
@ -315,6 +315,11 @@ func (ss *scaleSet) GetZoneByNodeName(name string) (cloudprovider.Zone, error) {
|
|||||||
} else if vm.InstanceView != nil && vm.InstanceView.PlatformFaultDomain != nil {
|
} else if vm.InstanceView != nil && vm.InstanceView.PlatformFaultDomain != nil {
|
||||||
// Availability zone is not used for the node, falling back to fault domain.
|
// Availability zone is not used for the node, falling back to fault domain.
|
||||||
failureDomain = strconv.Itoa(int(*vm.InstanceView.PlatformFaultDomain))
|
failureDomain = strconv.Itoa(int(*vm.InstanceView.PlatformFaultDomain))
|
||||||
|
} else {
|
||||||
|
err = fmt.Errorf("failed to get zone info")
|
||||||
|
klog.Errorf("GetZoneByNodeName: got unexpected error %v", err)
|
||||||
|
ss.deleteCacheForNode(name)
|
||||||
|
return cloudprovider.Zone{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return cloudprovider.Zone{
|
return cloudprovider.Zone{
|
||||||
|
Loading…
Reference in New Issue
Block a user