]> git.proxmox.com Git - pve-manager.git/commit
ui: workspace: cope better with upgrade related false positive 401 HTTP codes
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 24 Jun 2019 12:52:05 +0000 (14:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 25 Jun 2019 09:42:29 +0000 (11:42 +0200)
commit4719a0751fa4d5055f4d7b48e1c658a82f67a4da
tree29f0856161ab06a9d0314b329ba4fb8d4891a8de
parent5b17681098b4f1cd0ca8ecc08ab4fa8a9d5282a9
ui: workspace: cope better with upgrade related false positive 401 HTTP codes

While we nowadays can work much better with package upgrades relating
the cluster stack it still happens that a pve-cluster upgrade can
produce a false-positive 401 (auth failure) code for a currently
valid ticket, e.g., because a pmxcfs lock was requested but the
pmxcfs was currently not mounted due an upgrade triggered restart.

A frequent case for a few false positive 401 is also a cluster
creation, especially if not done over the web GUI.

Thus add a counter, which gets set to 0 on each successful login or
ticket renewal and gets increased on each 401 error. Only show the
logged out window if we get five or more 401 responses. While 5 may
sound a bit much one needs to remember that we always have quite a
few API call in flight (resource update store, stores from current
panel ...) and thus, if one got really auth denied it will still show
quite fast (1 to 5 seconds, depending on which panel is currently
opened). Further, the backend naturally does not allows to do
anything during this time, this has no security implications
whatsoever.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/Workspace.js