Skip to content

Commit e6c32f4

Browse files
authored
Merge pull request #1283 from Kuromesi/e2efix
fix possible e2e panic and update maxportnum warning
2 parents 5deb8b4 + 7a44775 commit e6c32f4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/controller/workload/workload_processor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ func (p *Processor) updateServiceMap(service, oldService *workloadapi.Service) e
671671

672672
for i, port := range ports {
673673
if i >= bpf.MaxPortNum {
674-
log.Warnf("exceed the max port count,current only support maximum of 10 ports")
674+
log.Warnf("exceed the max port count, current only support maximum of 10 ports, service: %s", serviceName)
675675
break
676676
}
677677

test/e2e/gateway_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,9 @@ func (c *ingressImpl) callEcho(opts echo.CallOptions) (echo.CallResult, error) {
238238
} else {
239239
addrs, ports = c.AddressesForPort(opts.Port.ServicePort)
240240
}
241-
if addrs == nil || ports == nil {
241+
if len(addrs) == 0 || len(ports) == 0 {
242242
scopes.Framework.Warnf("failed to get host and port for %s/%d", opts.Port.Protocol, opts.Port.ServicePort)
243+
return echo.CallResult{}, fmt.Errorf("failed to get host or port for %s/%d", opts.Port.Protocol, opts.Port.ServicePort)
243244
}
244245
addr = addrs[0]
245246
port = ports[0]

0 commit comments

Comments
 (0)