Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions pkg/crcwatch/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,19 @@ func (w *Watch) Start(stopCh <-chan struct{}) {
}
if err.CompactRevision != nil {
klog.Fatalf("crc event missed, compacted error : %v, compact revision %s", err, *err.CompactRevision)
} else if err.Err != nil {
klog.Errorf("crc error event: %v", err)
if err.Type == watchor.ErrorEventTypeUnsupported {
// after unsupported error, crc will stop event loop
return
}
} else {
klog.Errorf("crc error event: %v, return watch", err)
return
}
case warning := <-w.crcWatchClient.WarningChannel():
if warning.Err != nil {
klog.Warningf("crc warning event %s", warning.Err.Error())
}
case event := <-w.crcWatchClient.Channel():
if event == nil {
klog.Error("crc watch get nil event, skip")
continue
}
w.eventHandler(event)
case <-stopCh:
return
Expand All @@ -83,7 +84,7 @@ func (w *Watch) Start(stopCh <-chan struct{}) {
return
default:
crcwLoop()
// crcwLoop will return when crc not supported
// crcwLoop will return when get error
// restart after 10 minutes for tower upgrade
time.Sleep(10 * time.Minute)
}
Expand Down
Loading