mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #94306 from knight42/fix/azure-error-from-getVMSS
fix(azure): check error returned by scaleSet.getVMSS
This commit is contained in:
		@@ -1406,6 +1406,9 @@ func (ss *scaleSet) ensureBackendPoolDeletedFromVMSS(service *v1.Service, backen
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	for vmssName := range vmssNamesMap {
 | 
						for vmssName := range vmssNamesMap {
 | 
				
			||||||
		vmss, err := ss.getVMSS(vmssName, azcache.CacheReadTypeDefault)
 | 
							vmss, err := ss.getVMSS(vmssName, azcache.CacheReadTypeDefault)
 | 
				
			||||||
 | 
							if err != nil {
 | 
				
			||||||
 | 
								return err
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// When vmss is being deleted, CreateOrUpdate API would report "the vmss is being deleted" error.
 | 
							// When vmss is being deleted, CreateOrUpdate API would report "the vmss is being deleted" error.
 | 
				
			||||||
		// Since it is being deleted, we shouldn't send more CreateOrUpdate requests for it.
 | 
							// Since it is being deleted, we shouldn't send more CreateOrUpdate requests for it.
 | 
				
			||||||
@@ -1413,10 +1416,6 @@ func (ss *scaleSet) ensureBackendPoolDeletedFromVMSS(service *v1.Service, backen
 | 
				
			|||||||
			klog.V(3).Infof("ensureVMSSInPool: found vmss %s being deleted, skipping", vmssName)
 | 
								klog.V(3).Infof("ensureVMSSInPool: found vmss %s being deleted, skipping", vmssName)
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					 | 
				
			||||||
		if err != nil {
 | 
					 | 
				
			||||||
			return err
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		if vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations == nil {
 | 
							if vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations == nil {
 | 
				
			||||||
			klog.V(4).Infof("EnsureHostInPool: cannot obtain the primary network interface configuration, of vmss %s", vmssName)
 | 
								klog.V(4).Infof("EnsureHostInPool: cannot obtain the primary network interface configuration, of vmss %s", vmssName)
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user