public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-manager] ui: ha: consider status/presence of qdevice for warning
@ 2025-09-12 10:16 Hannes Laimer
  2025-09-12 16:36 ` Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Laimer @ 2025-09-12 10:16 UTC (permalink / raw)
  To: pve-devel

We showed this warning for setups with two nodes and a qdevice, but for
setups like this this warning didn't make Sense. This checks if a
qdevice is connected to the cluster before showing the 'not enough votes
for reliable HA'-warning.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
This came up in support[1].

[1] https://my.proxmox.com/en/dbsfk/ticket/view/20332

 www/manager6/ha/ResourceEdit.js | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/www/manager6/ha/ResourceEdit.js b/www/manager6/ha/ResourceEdit.js
index 428672a8..04795da7 100644
--- a/www/manager6/ha/ResourceEdit.js
+++ b/www/manager6/ha/ResourceEdit.js
@@ -54,7 +54,18 @@ Ext.define('PVE.ha.VMResourceInputPanel', {
                 });
 
                 if (votes < MIN_QUORUM_VOTES) {
-                    fewVotesHint.setVisible(true);
+                    Proxmox.Utils.API2Request({
+                        url: '/cluster/config/qdevice',
+                        method: 'GET',
+                        failure: function (response) {
+                            fewVotesHint.setVisible(true);
+                        },
+                        success: function (response) {
+                            let qdeviceStatus = response.result.data;
+                            let qdeviceConnected = qdeviceStatus.State === 'Connected';
+                            fewVotesHint.setVisible(!qdeviceConnected);
+                        },
+                    });
                 }
             },
         });
-- 
2.47.3



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

* Re: [pve-devel] [PATCH pve-manager] ui: ha: consider status/presence of qdevice for warning
  2025-09-12 10:16 [pve-devel] [PATCH pve-manager] ui: ha: consider status/presence of qdevice for warning Hannes Laimer
@ 2025-09-12 16:36 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-09-12 16:36 UTC (permalink / raw)
  To: Proxmox VE development discussion, Hannes Laimer

Am 12.09.25 um 12:17 schrieb Hannes Laimer:
> We showed this warning for setups with two nodes and a qdevice, but for
> setups like this this warning didn't make Sense. This checks if a
> qdevice is connected to the cluster before showing the 'not enough votes
> for reliable HA'-warning.

Maybe it would be a bit more robust if we fleece that info in already in
the backend – but disclaimer: I did not just check, so you really need
to evaluate if it indeed makes sense or if applying this now as is might
be the better route forward.

> 
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> This came up in support[1].
> 
> [1] https://my.proxmox.com/en/dbsfk/ticket/view/20332
> 
>  www/manager6/ha/ResourceEdit.js | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/www/manager6/ha/ResourceEdit.js b/www/manager6/ha/ResourceEdit.js
> index 428672a8..04795da7 100644
> --- a/www/manager6/ha/ResourceEdit.js
> +++ b/www/manager6/ha/ResourceEdit.js
> @@ -54,7 +54,18 @@ Ext.define('PVE.ha.VMResourceInputPanel', {
>                  });
>  
>                  if (votes < MIN_QUORUM_VOTES) {
> -                    fewVotesHint.setVisible(true);
> +                    Proxmox.Utils.API2Request({
> +                        url: '/cluster/config/qdevice',
> +                        method: 'GET',
> +                        failure: function (response) {
> +                            fewVotesHint.setVisible(true);
> +                        },
> +                        success: function (response) {
> +                            let qdeviceStatus = response.result.data;
> +                            let qdeviceConnected = qdeviceStatus.State === 'Connected';
> +                            fewVotesHint.setVisible(!qdeviceConnected);
> +                        },
> +                    });

nit: I would slightly prefer such inline requests to use the async
Proxmox.Async.api2 method, that makes the code-flow a bit more linear
and easier to grasp.

>                  }
>              },
>          });



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

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

end of thread, other threads:[~2025-09-12 16:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-12 10:16 [pve-devel] [PATCH pve-manager] ui: ha: consider status/presence of qdevice for warning Hannes Laimer
2025-09-12 16:36 ` 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