Skip to content

Commit

Permalink
fix crash when there are attachments with null network
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Kolomentsev <andrey.kolomentsev@gmail.com>
  • Loading branch information
andrey-ko committed Feb 8, 2019
1 parent 6894bde commit c73ba12
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions manager/allocator/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,9 @@ func (a *Allocator) allocateNode(ctx context.Context, node *api.Node, existingAd
// for every attachment, go through every network. if the attachment
// belongs to one of the networks, then go to the next attachment. if
// no network matches, then the the attachment should be removed.
if attach.Network == nil {
continue
}
attachmentBelongs := false
for _, network := range networks {
if network.ID == attach.Network.ID {
Expand Down

0 comments on commit c73ba12

Please sign in to comment.