public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] ui: osd: send in/out cmd to currently used node
@ 2022-03-02 10:12 Aaron Lauterer
  2022-03-03 11:16 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Aaron Lauterer @ 2022-03-02 10:12 UTC (permalink / raw)
  To: pve-devel

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 <a.lauterer@proxmox.com>
---
 www/manager6/ceph/OSD.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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,
-- 
2.30.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: Re: [PATCH manager] ui: osd: send in/out cmd to currently used node
  2022-03-02 10:12 [pve-devel] [PATCH manager] ui: osd: send in/out cmd to currently used node Aaron Lauterer
@ 2022-03-03 11:16 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2022-03-03 11:16 UTC (permalink / raw)
  To: Proxmox VE development discussion, Aaron Lauterer

On 02/03/2022 11:12, Aaron Lauterer wrote:
> 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 <a.lauterer@proxmox.com>
> ---
>  www/manager6/ceph/OSD.js | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-03 11:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 10:12 [pve-devel] [PATCH manager] ui: osd: send in/out cmd to currently used node Aaron Lauterer
2022-03-03 11:16 ` [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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal