scality / metalk8s

An opinionated Kubernetes distribution with a focus on long-term on-prem deployments
Apache License 2.0
357 stars 45 forks source link

UI: auto-refresh of nodes and volumes is stopped after any API or Network error #3242

Open JBWatenbergScality opened 3 years ago

JBWatenbergScality commented 3 years ago

Component:

UI

What happened:

Nodes and volumes not refreshed automatically.

What was expected:

Nodes and volumes to be refreshed.

Steps to reproduce

  1. Log into MetalK8s ui
  2. Switch your computer to sleep mode
  3. The nodes and volumes do not get refreshed anymore

Resolution proposal:

The issue comes from https://github.com/scality/metalk8s/blob/development/2.9/ui/src/ducks/app/nodes.js#L466 and https://github.com/scality/metalk8s/blob/development/2.9/ui/src/ducks/app/volumes.js#L413. The UI currently deliberately stop polling the API as soon as an error occurred, no matter which kind of error.

JBWatenbergScality commented 3 years ago

May be related to https://github.com/scality/metalk8s/issues/2035

Except this statement

if there is an error during fetchAlerts, we can just yield put({type: STOP_REFRESH_ALERTS}), to stop the refresh in the fetchAlerts saga

Which should be replaced by a retry pattern on 5xx errors and network errors, in addition with a new attempt to poll the API on user focus.