Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

allowing the auto-reconnect logic to work after an onClose exception #3018

Merged
merged 3 commits into from
Apr 22, 2021

Conversation

shawkins
Copy link
Contributor

@shawkins shawkins commented Apr 20, 2021

Description

As seen in #2992 if there is a failure with the shared informer watch, and then an exception thrown from the ReflectorWatcher.onClose(WatcherException) method, the watch is effectively terminated.

Related to this, there isn't a great way from the available apis to determine when a index informer has failed.
Fix #2992

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes

@centos-ci
Copy link

Can one of the admins verify this patch?

@rohanKanojia rohanKanojia self-requested a review April 20, 2021 17:35
@manusa
Copy link
Member

manusa commented Apr 21, 2021

Hi @shawkins, does this one require backporting to 5.3.1 too? (like #2995)

@manusa manusa requested review from manusa and oscerd April 21, 2021 05:08
@shawkins
Copy link
Contributor Author

Hi @shawkins, does this one require backporting to 5.3.1 too? (like #2995)

Yes, we'd like this in 5.3.1 as well.

@rohanKanojia rohanKanojia added this to the 5.3.1 milestone Apr 21, 2021
@manusa manusa force-pushed the informer-reconnect branch from 7a2b4f3 to b2ad62e Compare April 22, 2021 09:09
@sonarqubecloud
Copy link

@manusa manusa merged commit e11be37 into fabric8io:master Apr 22, 2021
manusa pushed a commit that referenced this pull request Apr 22, 2021
…3018)

* allowing the auto-reconnect logic to work after an onClose exception

* cannotReconnect returns false when the watcher is auto-reconnecting

* setting the timeout to an appropriate value

(cherry picked from commit e11be37)
shawkins added a commit to shawkins/kubernetes-client that referenced this pull request Apr 27, 2021
this incorporates the reflector changes from fabric8io#3029

It goes further in refining responsibilities by mostly relying on the
watch for tracking the lastResourceVersion and removing onClose behavior
that is no longer necessary due to fabric8io#3018
@manusa
Copy link
Member

manusa commented May 5, 2021

Relates to: #2010

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SharedInformer does not survive to an API server restart
5 participants