Skip to content

Commit

Permalink
Fixing HostNetwork Bug (#109)
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Talerico <[email protected]>
Co-authored-by: Joe Talerico <[email protected]>
  • Loading branch information
jtaleric and Joe Talerico authored Oct 6, 2023
1 parent 5e39470 commit 35f19c2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/k8s-netperf/k8s-netperf.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,11 @@ func executeWorkload(nc config.Config, s config.PerfScenarios, hostNet bool, ipe
serverIP = s.NetperfService.Spec.ClusterIP
}
} else {
serverIP = s.Server.Items[0].Status.PodIP
if hostNet {
serverIP = s.ServerHost.Items[0].Status.PodIP
} else {
serverIP = s.Server.Items[0].Status.PodIP
}
}
if !s.NodeLocal {
Client = s.ClientAcross
Expand Down Expand Up @@ -360,7 +364,7 @@ func executeWorkload(nc config.Config, s config.PerfScenarios, hostNet bool, ipe
npr.AcrossAZ = nc.AcrossAZ
}
npr.StartTime = time.Now()
log.Debugf("Executing workloads. Server on %s client on %s, hostNetwork is %t, service is %t", s.ServerNodeInfo.Hostname, s.ClientNodeInfo.Hostname, hostNet, service)
log.Debugf("Executing workloads. hostNetwork is %t, service is %t", hostNet, service)
for i := 0; i < nc.Samples; i++ {
nr := sample.Sample{}
if iperf3 {
Expand Down

0 comments on commit 35f19c2

Please sign in to comment.