Skip to content

Commit

Permalink
Improve e2e and ensureBackendPoolDeletedFromVmssUniform log * vmSetNa…
Browse files Browse the repository at this point in the history
…me is for basic LB so move it to basic LB branch * e2e: print Service describe info if exposure fails

Signed-off-by: Zhecheng Li <[email protected]>
  • Loading branch information
lzhecheng authored and k8s-infra-cherrypick-robot committed Aug 10, 2023
1 parent bbcce35 commit a4ecbaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/provider/azure_vmss.go
Original file line number Diff line number Diff line change
Expand Up @@ -1708,8 +1708,6 @@ func (ss *ScaleSet) ensureBackendPoolDeletedFromVMSS(backendPoolIDs []string, vm
}

func (ss *ScaleSet) ensureBackendPoolDeletedFromVmssUniform(backendPoolIDs []string, vmSetName string) error {
klog.V(2).Infof("ensureBackendPoolDeletedFromVmssUniform: vmSetName (%s), backendPoolIDs (%q)", vmSetName, backendPoolIDs)

vmssNamesMap := make(map[string]bool)
// the standard load balancer supports multiple vmss in its backend while the basic sku doesn't
if ss.useStandardLoadBalancer() && !ss.EnableMultipleStandardLoadBalancers {
Expand All @@ -1728,7 +1726,7 @@ func (ss *ScaleSet) ensureBackendPoolDeletedFromVmssUniform(backendPoolIDs []str
} else if v, ok := value.(*compute.VirtualMachineScaleSet); ok {
vmss = v
}
klog.V(2).Infof("ensureBackendPoolDeletedFromVmssUniform: vmss (%s)", pointer.StringDeref(vmss.Name, ""))
klog.V(2).Infof("ensureBackendPoolDeletedFromVmssUniform: vmss %q, backendPoolIDs %q", pointer.StringDeref(vmss.Name, ""), backendPoolIDs)

// 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.
Expand Down Expand Up @@ -1787,6 +1785,7 @@ func (ss *ScaleSet) ensureBackendPoolDeletedFromVmssUniform(backendPoolIDs []str
return utilerrors.Flatten(utilerrors.NewAggregate(errorList))
}
} else {
klog.V(2).Infof("ensureBackendPoolDeletedFromVmssUniform: vmss %q, backendPoolIDs %q", vmSetName, backendPoolIDs)
vmssNamesMap[vmSetName] = true
}

Expand Down Expand Up @@ -1968,7 +1967,7 @@ func (ss *ScaleSet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolIDs
vmssFlexBackendIPConfigurationsMap[backendPoolID] = append(vmssFlexBackendIPConfigurationsMap[backendPoolID], ipConf)
}
if vmManagementType == ManagedByVmssUniform {
// vm is managed by vmss flex.
// vm is managed by vmss uniform.
vmssUniformBackendIPConfigurationsMap[backendPoolID] = append(vmssUniformBackendIPConfigurationsMap[backendPoolID], ipConf)
}
}
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/utils/service_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ func WaitServiceExposure(cs clientset.Interface, namespace string, name string,

return true, nil
}); err != nil {
output, _ := RunKubectl(namespace, "describe", "service", name)
Logf("Service describe info: %s", output)
return nil, err
}

Expand Down

0 comments on commit a4ecbaa

Please sign in to comment.