Skip to content

Commit

Permalink
Merge pull request #9363 from 42wim/fixcni
Browse files Browse the repository at this point in the history
cni: use correct interface for netStatus
  • Loading branch information
nickethier authored Nov 17, 2020
2 parents e5be40b + 19934d3 commit abc19a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/allocrunner/networking_cni.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ func (c *cniNetworkConfigurator) Setup(ctx context.Context, alloc *structs.Alloc
if len(res.Interfaces) > 0 {
iface, name := func(r *cni.CNIResult) (*cni.Config, string) {
for i := range r.Interfaces {
return r.Interfaces[i], i
if r.Interfaces[i].Sandbox != "" {
return r.Interfaces[i], i
}
}
return nil, ""
}(res)
Expand Down

0 comments on commit abc19a4

Please sign in to comment.