Merge pull request #13538 from rook/mergify/bp/release-1.13/pr-13479

core: fix error handling on setting watcher (backport #13479)
This commit is contained in:
Satoru Takeuchi authored and GitHub committed 2024-01-10 13:08:14 +09:00
commit f17f7fb2b5
1 file changed
+1 -1
+1 -1
View File
@@ -218,10 +218,10 @@ func (c *Cluster) updateAndCreateOSDsLoop(
ResourceVersion: configMapList.ResourceVersion,
}
watcher, err := cmClient.Watch(c.clusterInfo.Context, watchOptions)
defer watcher.Stop()
if err != nil {
return false, errors.Wrapf(err, "failed to start watching OSD provisioning status ConfigMaps")
}
defer watcher.Stop()
// tick after a short time of waiting for new OSD provision status configmaps to change state
// in order to allow opportunistic deployment updates while we wait