Skip to content

Commit

Permalink
Add retry mechanism while ContainedInspectContainer return NotFound
Browse files Browse the repository at this point in the history
  • Loading branch information
derricheng committed May 17, 2024
1 parent 526c1ee commit 7e70362
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/gc/flannel_gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (gc *flannelGC) shouldCleanup(cid string) bool {
if stausErr, ok := status.FromError(err); ok {
if stausErr.Code() == codes.NotFound {
glog.Infof("container %s not found once", cid)
time.Sleep(3 * time.Second)
// time.Sleep(3 * time.Second)
if _, err := gc.dockerCli.ContainedInspectContainer(cid); err != nil {
if stausErr, ok := status.FromError(err); ok {
if stausErr.Code() == codes.NotFound {
Expand Down

0 comments on commit 7e70362

Please sign in to comment.