Skip to content

Commit

Permalink
imagepruning: temporarily disable event handling
Browse files Browse the repository at this point in the history
Underlying gonum/graph assigns conflicting IDs to new nodes after node
deletion. Thus two different nodes amy be assigned the same ID. This
leads to panic when an edge is set between them.

Temporarily disabling event handling until the package is fixed. This
ensures that no new nodes will be added to the graph after the first
node gets removed.

Signed-off-by: Michal Minář <[email protected]>
  • Loading branch information
Michal Minář authored and deads2k committed Jun 28, 2018
1 parent 67bafb1 commit d206b32
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/oc/admin/prune/imageprune/prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -1307,10 +1307,12 @@ func (p *pruner) runLoop(
failures = append(failures, failure)
}
delete(p.processedImages, res.Job.Image)
case event := <-isUpdateChan:
p.handleImageStreamEvent(event)
case event := <-imgUpdateChan:
p.handleImageEvent(event)
case <-isUpdateChan:
// TODO: fix gonum/graph to not reuse IDs of deleted nodes and reenable event handling
//p.handleImageStreamEvent(event)
case <-imgUpdateChan:
// TODO: fix gonum/graph to not reuse IDs of deleted nodes and reenable event handling
//p.handleImageEvent(event)
}
}
}
Expand Down

0 comments on commit d206b32

Please sign in to comment.