From: Aaron Lauterer Date: Wed, 2 Mar 2022 10:12:49 +0000 (+0100) Subject: ui: osd: send in/out cmd to currently used node X-Git-Url: https://git.proxmox.com/?p=pve-manager.git;a=commitdiff_plain;h=8fdc97938b853dafe0ca874e9352a42444e1025e ui: osd: send in/out cmd to currently used node The in & out commands for OSDs are not node specific and can be run on any node in the Ceph cluster. By sending them to the node currently used to access the UI they can still be sent even if the node on which the OSDs are located is down. This helps in a disaster scenario where a node is down. By default Ceph will mark a downed OSD as out after 10 minutes. This could be too long in some situations. Running the CLI command to mark the OSD as out earlier on one of the remaining nodes does work, but if the admin is not used doing it this way, this adds stress, in a potentially already stressful situation. Signed-off-by: Aaron Lauterer --- diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js index e126f8d0..78f226ff 100644 --- a/www/manager6/ceph/OSD.js +++ b/www/manager6/ceph/OSD.js @@ -391,8 +391,13 @@ Ext.define('PVE.node.CephOsdTree', { let osdid = vm.get('osdid'); let doRequest = function() { + let targetnode = vm.get('osdhost'); + // cmds not node specific and need to work if the OSD node is down + if (['in', 'out'].includes(cmd)) { + targetnode = vm.get('nodename'); + } Proxmox.Utils.API2Request({ - url: "/nodes/" + vm.get('osdhost') + "/ceph/osd/" + osdid + '/' + cmd, + url: `/nodes/${targetnode}/ceph/osd/${osdid}/${cmd}`, waitMsgTarget: me.getView(), method: 'POST', params: params,