* [pve-devel] [PATCH manager] ui: ceph: osd: handle edge case with dead node
@ 2021-11-16 13:08 Fabian Ebner
2021-11-16 13:24 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Ebner @ 2021-11-16 13:08 UTC (permalink / raw)
To: pve-devel
If there is a left-over entry for a dead node in the ceph osd tree
the panel wouldn't show and produce an
Uncaught TypeError: data.versions is undefined
because of an access
node.version = data.versions[node.name];
further below (not visible in the patch itself).
AFAICT, the same issue would also happen when something went wrong
with getting the broadcasted ceph-versions, or when a node is part
of Ceph, but not PVE.
Handle the situation gracefully by always initializing data.versions.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
www/manager6/ceph/OSD.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js
index 9e737852..30671dc4 100644
--- a/www/manager6/ceph/OSD.js
+++ b/www/manager6/ceph/OSD.js
@@ -316,7 +316,8 @@ Ext.define('PVE.node.CephOsdTree', {
if (selected.length) {
name = selected[0].data.name;
}
- vm.set('versions', data.versions || {});
+ data.versions = data.versions || {};
+ vm.set('versions', data.versions);
// extract max version
let maxversion = "0";
let mixedversions = false;
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH manager] ui: ceph: osd: handle edge case with dead node
2021-11-16 13:08 [pve-devel] [PATCH manager] ui: ceph: osd: handle edge case with dead node Fabian Ebner
@ 2021-11-16 13:24 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-11-16 13:24 UTC (permalink / raw)
To: Proxmox VE development discussion, Fabian Ebner
On 16.11.21 14:08, Fabian Ebner wrote:
> If there is a left-over entry for a dead node in the ceph osd tree
> the panel wouldn't show and produce an
> Uncaught TypeError: data.versions is undefined
> because of an access
> node.version = data.versions[node.name];
> further below (not visible in the patch itself).
>
> AFAICT, the same issue would also happen when something went wrong
> with getting the broadcasted ceph-versions, or when a node is part
> of Ceph, but not PVE.
>
> Handle the situation gracefully by always initializing data.versions.
>
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
> www/manager6/ceph/OSD.js | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-16 13:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 13:08 [pve-devel] [PATCH manager] ui: ceph: osd: handle edge case with dead node Fabian Ebner
2021-11-16 13:24 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox