44
44
// virtualMachineScaleSetsDeallocating indicates VMSS instances are in Deallocating state.
45
45
virtualMachineScaleSetsDeallocating = "Deallocating"
46
46
47
- // ErrorNotVmssInstance indicates an instance is not belongint to any vmss.
47
+ // ErrorNotVmssInstance indicates an instance is not belonging to any vmss.
48
48
ErrorNotVmssInstance = errors .New ("not a vmss instance" )
49
49
50
50
scaleSetNameRE = regexp .MustCompile (`.*/subscriptions/(?:.*)/Microsoft.Compute/virtualMachineScaleSets/(.+)/virtualMachines(?:.*)` )
@@ -289,7 +289,7 @@ func (ss *scaleSet) GetNodeNameByProviderID(providerID string) (types.NodeName,
289
289
// NodeName is not part of providerID for vmss instances.
290
290
scaleSetName , err := extractScaleSetNameByProviderID (providerID )
291
291
if err != nil {
292
- klog .V (4 ).Infof ("Can not extract scale set name from providerID (%s), assuming it is mananaged by availability set: %v" , providerID , err )
292
+ klog .V (4 ).Infof ("Can not extract scale set name from providerID (%s), assuming it is managed by availability set: %v" , providerID , err )
293
293
return ss .availabilitySet .GetNodeNameByProviderID (providerID )
294
294
}
295
295
@@ -300,7 +300,7 @@ func (ss *scaleSet) GetNodeNameByProviderID(providerID string) (types.NodeName,
300
300
301
301
instanceID , err := getLastSegment (providerID )
302
302
if err != nil {
303
- klog .V (4 ).Infof ("Can not extract instanceID from providerID (%s), assuming it is mananaged by availability set: %v" , providerID , err )
303
+ klog .V (4 ).Infof ("Can not extract instanceID from providerID (%s), assuming it is managed by availability set: %v" , providerID , err )
304
304
return ss .availabilitySet .GetNodeNameByProviderID (providerID )
305
305
}
306
306
@@ -433,11 +433,11 @@ func (ss *scaleSet) GetIPByNodeName(nodeName string) (string, string, error) {
433
433
return internalIP , publicIP , nil
434
434
}
435
435
436
- func (ss * scaleSet ) getVMSSPublicIPAddress (resourceGroupName string , virtualMachineScaleSetName string , virtualmachineIndex string , networkInterfaceName string , IPConfigurationName string , publicIPAddressName string ) (network.PublicIPAddress , bool , error ) {
436
+ func (ss * scaleSet ) getVMSSPublicIPAddress (resourceGroupName string , virtualMachineScaleSetName string , virtualMachineIndex string , networkInterfaceName string , IPConfigurationName string , publicIPAddressName string ) (network.PublicIPAddress , bool , error ) {
437
437
ctx , cancel := getContextWithCancel ()
438
438
defer cancel ()
439
439
440
- pip , err := ss .PublicIPAddressesClient .GetVirtualMachineScaleSetPublicIPAddress (ctx , resourceGroupName , virtualMachineScaleSetName , virtualmachineIndex , networkInterfaceName , IPConfigurationName , publicIPAddressName , "" )
440
+ pip , err := ss .PublicIPAddressesClient .GetVirtualMachineScaleSetPublicIPAddress (ctx , resourceGroupName , virtualMachineScaleSetName , virtualMachineIndex , networkInterfaceName , IPConfigurationName , publicIPAddressName , "" )
441
441
exists , rerr := checkResourceExistsFromError (err )
442
442
if rerr != nil {
443
443
return pip , false , rerr .Error ()
@@ -712,7 +712,7 @@ func (ss *scaleSet) GetPrimaryInterface(nodeName string) (network.Interface, err
712
712
exists , realErr := checkResourceExistsFromError (rerr )
713
713
if realErr != nil {
714
714
klog .Errorf ("error: ss.GetPrimaryInterface(%s), ss.GetVirtualMachineScaleSetNetworkInterface.Get(%s, %s, %s), err=%v" , nodeName , resourceGroup , ssName , nicName , realErr )
715
- return network.Interface {}, err
715
+ return network.Interface {}, realErr . Error ()
716
716
}
717
717
718
718
if ! exists {
@@ -956,7 +956,7 @@ func (ss *scaleSet) ensureVMSSInPool(service *v1.Service, nodes []*v1.Node, back
956
956
}
957
957
958
958
if vmss .VirtualMachineProfile .NetworkProfile .NetworkInterfaceConfigurations == nil {
959
- klog .V (4 ).Infof ("EnsureHostInPool: cannot obtain the primary network interface configuration, of vmss %s" , vmssName )
959
+ klog .V (4 ).Infof ("EnsureHostInPool: cannot obtain the primary network interface configuration of vmss %s" , vmssName )
960
960
continue
961
961
}
962
962
vmssNIC := * vmss .VirtualMachineProfile .NetworkProfile .NetworkInterfaceConfigurations
0 commit comments