public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] status/plugin: do not test connection if disabled
@ 2020-12-07 14:37 Dominik Csapak
  2020-12-07 16:21 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2020-12-07 14:37 UTC (permalink / raw)
  To: pve-devel

so that if one disables the plugin (e.g. because it is offline),
it will work even when the server is not reachable

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
if my other series is ok, i'll rebase either this, or my other
series, depending what gets applied first ;)

 PVE/Status/Plugin.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/Status/Plugin.pm b/PVE/Status/Plugin.pm
index c3e0bec1..040b4538 100644
--- a/PVE/Status/Plugin.pm
+++ b/PVE/Status/Plugin.pm
@@ -129,6 +129,9 @@ sub send {
 sub test_connection {
     my ($class, $cfg) = @_;
 
+    # do not check connection for disabled plugins
+    return if $cfg->{disable};
+
     my $conn = $class->_connect($cfg);
     $class->_disconnect($conn);
 }
-- 
2.20.1





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

* [pve-devel] applied: [PATCH manager] status/plugin: do not test connection if disabled
  2020-12-07 14:37 [pve-devel] [PATCH manager] status/plugin: do not test connection if disabled Dominik Csapak
@ 2020-12-07 16:21 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2020-12-07 16:21 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

On 07.12.20 15:37, Dominik Csapak wrote:
> so that if one disables the plugin (e.g. because it is offline),
> it will work even when the server is not reachable
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> if my other series is ok, i'll rebase either this, or my other
> series, depending what gets applied first ;)
> 
>  PVE/Status/Plugin.pm | 3 +++
>  1 file changed, 3 insertions(+)
> 
>

applied, thanks!




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

end of thread, other threads:[~2020-12-07 16:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-07 14:37 [pve-devel] [PATCH manager] status/plugin: do not test connection if disabled Dominik Csapak
2020-12-07 16:21 ` [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