parent
ae7f2899e1
commit
1a05288052
@ -0,0 +1,70 @@
|
||||
From d4d2dd5066b62210a05c1256c6aee39609e3a974 Mon Sep 17 00:00:00 2001
|
||||
From: Thanasis Katsios <thkatsios@gmail.com>
|
||||
Date: Mon, 1 Nov 2021 12:31:36 +0200
|
||||
Subject: [PATCH 1/3] fence_vmware_soap: Use --login-timeout option
|
||||
|
||||
Fixes issue #446.
|
||||
---
|
||||
agents/vmware_soap/fence_vmware_soap.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py
|
||||
index a7f08b3d6..034695931 100644
|
||||
--- a/agents/vmware_soap/fence_vmware_soap.py
|
||||
+++ b/agents/vmware_soap/fence_vmware_soap.py
|
||||
@@ -57,7 +57,8 @@ def soap_login(options):
|
||||
|
||||
try:
|
||||
headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : "vim25"}
|
||||
- conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers)
|
||||
+ login_timeout = int(options["--login-timeout"])
|
||||
+ conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers, timeout=login_timeout)
|
||||
|
||||
mo_ServiceInstance = Property('ServiceInstance')
|
||||
mo_ServiceInstance._type = 'ServiceInstance'
|
||||
|
||||
From 1e8f0d7582c7768149269f8d002d71b2febbdda0 Mon Sep 17 00:00:00 2001
|
||||
From: Thanasis Katsios <thkatsios@gmail.com>
|
||||
Date: Tue, 2 Nov 2021 16:52:59 +0200
|
||||
Subject: [PATCH 2/3] Set timeout to 60s when disable-timeouts is used
|
||||
|
||||
---
|
||||
agents/vmware_soap/fence_vmware_soap.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py
|
||||
index 034695931..38101352e 100644
|
||||
--- a/agents/vmware_soap/fence_vmware_soap.py
|
||||
+++ b/agents/vmware_soap/fence_vmware_soap.py
|
||||
@@ -57,7 +57,7 @@ def soap_login(options):
|
||||
|
||||
try:
|
||||
headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : "vim25"}
|
||||
- login_timeout = int(options["--login-timeout"])
|
||||
+ login_timeout = 60 if "--disable-timeout" in options and options["--disable-timeout"] != "false" else int(options["--login-timeout"])
|
||||
conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers, timeout=login_timeout)
|
||||
|
||||
mo_ServiceInstance = Property('ServiceInstance')
|
||||
|
||||
From 8094c8a5a06adf0bd891d4fddcc0b72861a0947e Mon Sep 17 00:00:00 2001
|
||||
From: Thanasis Katsios <thkatsios@gmail.com>
|
||||
Date: Tue, 2 Nov 2021 18:51:02 +0200
|
||||
Subject: [PATCH 3/3] Support disable-timeout simplification
|
||||
|
||||
---
|
||||
agents/vmware_soap/fence_vmware_soap.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py
|
||||
index 38101352e..2cd45e0b3 100644
|
||||
--- a/agents/vmware_soap/fence_vmware_soap.py
|
||||
+++ b/agents/vmware_soap/fence_vmware_soap.py
|
||||
@@ -57,7 +57,7 @@ def soap_login(options):
|
||||
|
||||
try:
|
||||
headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : "vim25"}
|
||||
- login_timeout = 60 if "--disable-timeout" in options and options["--disable-timeout"] != "false" else int(options["--login-timeout"])
|
||||
+ login_timeout = int(options["--login-timeout"]) or 60
|
||||
conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers, timeout=login_timeout)
|
||||
|
||||
mo_ServiceInstance = Property('ServiceInstance')
|
@ -0,0 +1,23 @@
|
||||
From 2d4b3ea47fa7a9a301d34cefc8f279cae7df4afd Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Thu, 26 Jan 2023 13:19:16 +0100
|
||||
Subject: [PATCH] fence_vmware_soap: set login_timeout lower than default
|
||||
pcmk_monitor_timeout (20s) to remove tmp dirs on fail
|
||||
|
||||
---
|
||||
agents/vmware_soap/fence_vmware_soap.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py
|
||||
index b1d27a9fb..4a4ec1780 100644
|
||||
--- a/agents/vmware_soap/fence_vmware_soap.py
|
||||
+++ b/agents/vmware_soap/fence_vmware_soap.py
|
||||
@@ -57,7 +57,7 @@ def soap_login(options):
|
||||
|
||||
try:
|
||||
headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : "vim25"}
|
||||
- login_timeout = int(options["--login-timeout"]) or 60
|
||||
+ login_timeout = int(options["--login-timeout"]) or 15
|
||||
conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers, timeout=login_timeout)
|
||||
|
||||
mo_ServiceInstance = Property('ServiceInstance')
|
@ -0,0 +1,51 @@
|
||||
From d664c254608c9342785f92d3da2ff6ba2466df3b Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Tue, 4 Oct 2022 13:43:13 +0200
|
||||
Subject: [PATCH] fence_virt: add note that reboot-action doesnt power on nodes
|
||||
that are powered off
|
||||
|
||||
---
|
||||
agents/virt/client/options.c | 7 ++++---
|
||||
tests/data/metadata/fence_virt.xml | 4 +++-
|
||||
2 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/agents/virt/client/options.c b/agents/virt/client/options.c
|
||||
index ff624481b..ddd6bc4e0 100644
|
||||
--- a/agents/virt/client/options.c
|
||||
+++ b/agents/virt/client/options.c
|
||||
@@ -734,9 +734,9 @@ args_usage(char *progname, const char *optstr, int print_stdin)
|
||||
|
||||
if (!print_stdin) {
|
||||
if (progname) {
|
||||
- printf("usage: %s [args]\n", progname);
|
||||
+ printf("usage: %s [args]\n\nNOTE: reboot-action does not power on nodes that are powered off.\n\n", progname);
|
||||
} else {
|
||||
- printf("usage: fence_virt [args]\n");
|
||||
+ printf("usage: fence_virt [args]\n\nNOTE: reboot-action does not power on nodes that are powered off.\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -766,7 +766,8 @@ args_metadata(char *progname, const char *optstr)
|
||||
printf("<?xml version=\"1.0\" ?>\n");
|
||||
printf("<resource-agent name=\"%s\" shortdesc=\"Fence agent for virtual machines\">\n", basename(progname));
|
||||
printf("<longdesc>%s is an I/O Fencing agent which can be used with "
|
||||
- "virtual machines.</longdesc>\n", basename(progname));
|
||||
+ "virtual machines.\n\nNOTE: reboot-action does not power on nodes that are powered off."
|
||||
+ "</longdesc>\n", basename(progname));
|
||||
printf("<vendor-url>https://libvirt.org</vendor-url>\n");
|
||||
printf("<parameters>\n");
|
||||
|
||||
diff --git a/tests/data/metadata/fence_virt.xml b/tests/data/metadata/fence_virt.xml
|
||||
index eb1959a11..612d4d3cb 100644
|
||||
--- a/tests/data/metadata/fence_virt.xml
|
||||
+++ b/tests/data/metadata/fence_virt.xml
|
||||
@@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" ?>
|
||||
<resource-agent name="fence_virt" shortdesc="Fence agent for virtual machines">
|
||||
-<longdesc>fence_virt is an I/O Fencing agent which can be used with virtual machines.</longdesc>
|
||||
+<longdesc>fence_virt is an I/O Fencing agent which can be used with virtual machines.
|
||||
+
|
||||
+NOTE: reboot-action does not power on nodes that are powered off.</longdesc>
|
||||
<vendor-url>https://libvirt.org</vendor-url>
|
||||
<parameters>
|
||||
<parameter name="debug" unique="0" required="0">
|
@ -0,0 +1,33 @@
|
||||
From 46f94d4dbad868afc70b96bd612323221991d06e Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Tue, 11 Oct 2022 09:51:24 +0200
|
||||
Subject: [PATCH] fence_lpar: only output additional error output on DEBUG
|
||||
level
|
||||
|
||||
Without this patch we get ERROR logged with trace info when doing
|
||||
status-action for nodes that doesnt exist.
|
||||
---
|
||||
agents/lpar/fence_lpar.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/agents/lpar/fence_lpar.py b/agents/lpar/fence_lpar.py
|
||||
index 2046b0e4e..975971a57 100644
|
||||
--- a/agents/lpar/fence_lpar.py
|
||||
+++ b/agents/lpar/fence_lpar.py
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
import sys, re
|
||||
import atexit
|
||||
+import logging
|
||||
sys.path.append("@FENCEAGENTSLIBDIR@")
|
||||
from fencing import *
|
||||
from fencing import fail, fail_usage, EC_STATUS_HMC
|
||||
@@ -48,7 +49,7 @@ def get_power_status(conn, options):
|
||||
elif options["--hmc-version"] in ["4", "IVM"]:
|
||||
status = re.compile(",state=(.*?),", re.IGNORECASE).search(conn.before).group(1)
|
||||
except AttributeError as e:
|
||||
- fail_usage("Command on HMC failed: {}\n{}".format(command, str(e)), False)
|
||||
+ logging.debug("Command on HMC failed: {}\n{}".format(command, str(e)))
|
||||
fail(EC_STATUS_HMC)
|
||||
|
||||
return _normalize_status(status)
|
@ -0,0 +1,46 @@
|
||||
From 3373431dc49d6e429bbf613765385cb33a56e917 Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Tue, 25 Oct 2022 10:39:29 +0200
|
||||
Subject: [PATCH] fence_ibm_powervs: improve defaults based on testing
|
||||
|
||||
---
|
||||
agents/ibm_powervs/fence_ibm_powervs.py | 4 ++--
|
||||
tests/data/metadata/fence_ibm_powervs.xml | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/agents/ibm_powervs/fence_ibm_powervs.py b/agents/ibm_powervs/fence_ibm_powervs.py
|
||||
index b0caed7c5..183893616 100755
|
||||
--- a/agents/ibm_powervs/fence_ibm_powervs.py
|
||||
+++ b/agents/ibm_powervs/fence_ibm_powervs.py
|
||||
@@ -232,10 +232,10 @@ def main():
|
||||
atexit.register(atexit_handler)
|
||||
define_new_opts()
|
||||
|
||||
- all_opt["shell_timeout"]["default"] = "15"
|
||||
+ all_opt["shell_timeout"]["default"] = "500"
|
||||
all_opt["power_timeout"]["default"] = "30"
|
||||
all_opt["power_wait"]["default"] = "1"
|
||||
- all_opt["stonith_status_sleep"]["default"] = "3"
|
||||
+ all_opt["stonith_status_sleep"]["default"] = "2"
|
||||
all_opt["api-type"]["default"] = "private"
|
||||
all_opt["proxy"]["default"] = ""
|
||||
|
||||
diff --git a/tests/data/metadata/fence_ibm_powervs.xml b/tests/data/metadata/fence_ibm_powervs.xml
|
||||
index 40c494110..326bc2378 100644
|
||||
--- a/tests/data/metadata/fence_ibm_powervs.xml
|
||||
+++ b/tests/data/metadata/fence_ibm_powervs.xml
|
||||
@@ -119,12 +119,12 @@
|
||||
</parameter>
|
||||
<parameter name="shell_timeout" unique="0" required="0">
|
||||
<getopt mixed="--shell-timeout=[seconds]" />
|
||||
- <content type="second" default="15" />
|
||||
+ <content type="second" default="500" />
|
||||
<shortdesc lang="en">Wait X seconds for cmd prompt after issuing command</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="stonith_status_sleep" unique="0" required="0">
|
||||
<getopt mixed="--stonith-status-sleep=[seconds]" />
|
||||
- <content type="second" default="3" />
|
||||
+ <content type="second" default="2" />
|
||||
<shortdesc lang="en">Sleep X seconds between status calls during a STONITH action</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="retry_on" unique="0" required="0">
|
@ -0,0 +1,29 @@
|
||||
From 6817d9ff018aa1af6fb9775bc9ae1f1cc07fa1ea Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Mon, 31 Oct 2022 10:54:10 +0100
|
||||
Subject: [PATCH] fence_virtd: add link and non-user socket example to man page
|
||||
|
||||
---
|
||||
agents/virt/man/fence_virt.conf.5 | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/agents/virt/man/fence_virt.conf.5 b/agents/virt/man/fence_virt.conf.5
|
||||
index c23ffd943..c8434ed65 100644
|
||||
--- a/agents/virt/man/fence_virt.conf.5
|
||||
+++ b/agents/virt/man/fence_virt.conf.5
|
||||
@@ -230,6 +230,15 @@ by a user running a cluster of virtual machines on a single desktop computer.
|
||||
.
|
||||
the URI to use when connecting to libvirt.
|
||||
|
||||
+All libvirt URIs are accepted and passed as-is.
|
||||
+
|
||||
+See https://libvirt.org/uri.html#remote-uris for examples.
|
||||
+
|
||||
+NOTE: When VMs are run as non-root user the socket path must be set as part
|
||||
+of the URI.
|
||||
+
|
||||
+Example: qemu:///session?socket=/run/user/<UID>/libvirt/virtqemud-sock
|
||||
+
|
||||
.SS libvirt-qmf
|
||||
|
||||
The libvirt-qmf plugin acts as a QMFv2 Console to the libvirt-qmf daemon in
|
@ -0,0 +1,114 @@
|
||||
From 3b311a1b069cec59f3d47242282f5d9c67a82e06 Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Mon, 21 Nov 2022 12:33:22 +0100
|
||||
Subject: [PATCH] fence_virtd: make fence_virtd.conf file mode 600 and fail if
|
||||
fence_virtd.conf or key file are not mode 600
|
||||
|
||||
---
|
||||
agents/virt/config/Makefile.am | 3 +++
|
||||
agents/virt/include/simpleconfig.h | 2 ++
|
||||
agents/virt/server/config.c | 26 ++++++++++++++++++++++++++
|
||||
agents/virt/server/main.c | 16 ++++++++++++++++
|
||||
4 files changed, 47 insertions(+)
|
||||
|
||||
diff --git a/agents/virt/config/Makefile.am b/agents/virt/config/Makefile.am
|
||||
index 86d8df415..19d974278 100644
|
||||
--- a/agents/virt/config/Makefile.am
|
||||
+++ b/agents/virt/config/Makefile.am
|
||||
@@ -37,5 +37,8 @@ y.tab.c: config.y
|
||||
config.c: y.tab.c config.l
|
||||
$(LEX) -oconfig.c $(srcdir)/config.l
|
||||
|
||||
+install-exec-hook:
|
||||
+ chmod 600 $(DESTDIR)$(sysconfdir)/fence_virt.conf
|
||||
+
|
||||
clean-local:
|
||||
rm -f config.tab.c config.tab.h config.c y.tab.c y.tab.h
|
||||
diff --git a/agents/virt/include/simpleconfig.h b/agents/virt/include/simpleconfig.h
|
||||
index 83d54377a..6aba85f02 100644
|
||||
--- a/agents/virt/include/simpleconfig.h
|
||||
+++ b/agents/virt/include/simpleconfig.h
|
||||
@@ -49,6 +49,8 @@ config_object_t *sc_init(void);
|
||||
/* Frees a previously-allocated copy of our simple config object */
|
||||
void sc_release(config_object_t *c);
|
||||
|
||||
+int check_file_permissions(const char *fname);
|
||||
+
|
||||
int do_configure(config_object_t *config, const char *filename);
|
||||
|
||||
#endif
|
||||
diff -uNr a/agents/virt/server/config.c b/agents/virt/server/config.c
|
||||
--- a/agents/virt/server/config.c 2021-07-08 13:09:05.000000000 +0200
|
||||
+++ b/agents/virt/server/config.c 2022-11-22 10:59:09.547919852 +0100
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <net/if.h>
|
||||
#include <arpa/inet.h>
|
||||
+#include <errno.h>
|
||||
|
||||
#include "simpleconfig.h"
|
||||
#include "static_map.h"
|
||||
@@ -595,6 +596,31 @@ listener_configure(config_object_t *config)
|
||||
}
|
||||
|
||||
|
||||
+int
|
||||
+check_file_permissions(const char *fname)
|
||||
+{
|
||||
+ struct stat st;
|
||||
+ mode_t file_perms = 0600;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = stat(fname, &st);
|
||||
+ if (ret != 0) {
|
||||
+ printf("stat failed on file '%s': %s\n",
|
||||
+ fname, strerror(errno));
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ if ((st.st_mode & 0777) != file_perms) {
|
||||
+ printf("WARNING: invalid permissions on file "
|
||||
+ "'%s': has 0%o should be 0%o\n", fname,
|
||||
+ (unsigned int)(st.st_mode & 0777),
|
||||
+ (unsigned int)file_perms);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
int
|
||||
do_configure(config_object_t *config, const char *config_file)
|
||||
{
|
||||
diff -uNr a/agents/virt/server/main.c b/agents/virt/server/main.c
|
||||
--- a/agents/virt/server/main.c 2021-07-08 13:09:05.000000000 +0200
|
||||
+++ b/agents/virt/server/main.c 2022-11-22 10:58:05.894530187 +0100
|
||||
@@ -14,7 +14,9 @@
|
||||
/* Local includes */
|
||||
#include "simpleconfig.h"
|
||||
#include "static_map.h"
|
||||
+#include "xvm.h"
|
||||
#include "server_plugin.h"
|
||||
+#include "simple_auth.h"
|
||||
#include "debug.h"
|
||||
|
||||
/* configure.c */
|
||||
@@ -203,6 +205,18 @@
|
||||
snprintf(pid_file, PATH_MAX, "/var/run/%s.pid", basename(argv[0]));
|
||||
}
|
||||
|
||||
+ check_file_permissions(config_file);
|
||||
+
|
||||
+ sprintf(val, "listeners/%s/@key_file", listener_name);
|
||||
+ if (sc_get(config, val,
|
||||
+ val, sizeof(val)-1) == 0) {
|
||||
+ dbg_printf(1, "Got %s for key_file\n", val);
|
||||
+ } else {
|
||||
+ snprintf(val, sizeof(val), "%s", DEFAULT_KEY_FILE);
|
||||
+ }
|
||||
+
|
||||
+ check_file_permissions(val);
|
||||
+
|
||||
openlog(basename(argv[0]), LOG_NDELAY | LOG_PID, LOG_DAEMON);
|
||||
|
||||
daemon_init(basename(argv[0]), pid_file, foreground);
|
@ -0,0 +1,55 @@
|
||||
From 6f213eb637bf7d957ba035e3aa09ce1f1bbccf84 Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Tue, 29 Nov 2022 16:21:18 +0100
|
||||
Subject: [PATCH] fence_virtd: add info about using multiple uuid/ip entries
|
||||
for groups
|
||||
|
||||
---
|
||||
agents/virt/man/fence_virt.conf.5 | 17 +++++++++++------
|
||||
1 file changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/agents/virt/man/fence_virt.conf.5 b/agents/virt/man/fence_virt.conf.5
|
||||
index c8434ed65..dfb3504f5 100644
|
||||
--- a/agents/virt/man/fence_virt.conf.5
|
||||
+++ b/agents/virt/man/fence_virt.conf.5
|
||||
@@ -1,4 +1,4 @@
|
||||
-.TH fence_virtd.conf 5
|
||||
+.TH fence_virt.conf 5
|
||||
|
||||
.SH NAME
|
||||
fence_virt.conf - configuration file for fence_virtd
|
||||
@@ -304,15 +304,17 @@ This defines a group.
|
||||
.TP
|
||||
.B uuid
|
||||
.
|
||||
-defines UUID as a member of a group.
|
||||
+Defines UUID as a member of a group. It can be used multiple times
|
||||
+to specify both node name and UUID values that can be fenced.
|
||||
|
||||
.TP
|
||||
.B ip
|
||||
.
|
||||
-defines an IP which is allowed to send fencing requests
|
||||
-for members of this group (e.g. for multicast). It is
|
||||
-highly recommended that this be used in conjunction with
|
||||
-a key file.
|
||||
+Defines an IP which is allowed to send fencing requests
|
||||
+for members of this group (e.g. for multicast). It can be used
|
||||
+multiple times to allow more than 1 IP to send fencing requests to
|
||||
+the group. It is highly recommended that this be used in conjunction
|
||||
+with a key file.
|
||||
|
||||
|
||||
|
||||
@@ -340,8 +342,11 @@ a key file.
|
||||
groups {
|
||||
group {
|
||||
ip = "192.168.1.1";
|
||||
+ ip = "192.168.1.2";
|
||||
uuid = "44179d3f-6c63-474f-a212-20c8b4b25b16";
|
||||
uuid = "1ce02c4b-dfa1-42cb-b5b1-f0b1091ece60";
|
||||
+ uuid = "node1";
|
||||
+ uuid = "node2";
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,74 @@
|
||||
From 90ea995038e560222f9345310f31a79b595a5219 Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Thu, 24 Nov 2022 10:19:29 +0100
|
||||
Subject: [PATCH 1/2] fencing: add plug_separator parameter to be able to
|
||||
specify one that isnt part of the plug name(s)
|
||||
|
||||
---
|
||||
lib/fencing.py.py | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/fencing.py.py b/lib/fencing.py.py
|
||||
index 940bd01d1..cf1c48e78 100644
|
||||
--- a/lib/fencing.py.py
|
||||
+++ b/lib/fencing.py.py
|
||||
@@ -322,6 +322,13 @@
|
||||
"help" : "-6, --inet6-only Forces agent to use IPv6 addresses only",
|
||||
"required" : "0",
|
||||
"order" : 1},
|
||||
+ "plug_separator" : {
|
||||
+ "getopt" : ":",
|
||||
+ "longopt" : "plug-separator",
|
||||
+ "help" : "--plug-separator=[char] Separator for plug parameter when specifying more than 1 plug",
|
||||
+ "default" : ",",
|
||||
+ "required" : "0",
|
||||
+ "order" : 100},
|
||||
"separator" : {
|
||||
"getopt" : "C:",
|
||||
"longopt" : "separator",
|
||||
@@ -934,7 +941,7 @@ def fence_action(connection, options, set_power_fn, get_power_fn, get_outlet_lis
|
||||
|
||||
try:
|
||||
if "--plug" in options:
|
||||
- options["--plugs"] = options["--plug"].split(",")
|
||||
+ options["--plugs"] = options["--plug"].split(options["--plug-separator"])
|
||||
|
||||
## Process options that manipulate fencing device
|
||||
#####
|
||||
|
||||
From 55e2a56b81ed2188dedfce07cc3155e2175183cd Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Mon, 28 Nov 2022 12:40:00 +0100
|
||||
Subject: [PATCH 2/2] fence_wti: increase login timeout to avoid random
|
||||
timeouts
|
||||
|
||||
---
|
||||
agents/wti/fence_wti.py | 1 +
|
||||
tests/data/metadata/fence_wti.xml | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/agents/wti/fence_wti.py b/agents/wti/fence_wti.py
|
||||
index 68640ae65..97cc66de2 100644
|
||||
--- a/agents/wti/fence_wti.py
|
||||
+++ b/agents/wti/fence_wti.py
|
||||
@@ -178,6 +178,7 @@ def main():
|
||||
atexit.register(atexit_handler)
|
||||
|
||||
all_opt["cmd_prompt"]["default"] = ["RSM>", "MPC>", "IPS>", "TPS>", "NBB>", "NPS>", "VMR>"]
|
||||
+ all_opt["login_timeout"]["default"] = "10"
|
||||
|
||||
options = check_input(device_opt, process_input(device_opt))
|
||||
|
||||
diff --git a/tests/data/metadata/fence_wti.xml b/tests/data/metadata/fence_wti.xml
|
||||
index 6bdccd2dc..8e15f4852 100644
|
||||
--- a/tests/data/metadata/fence_wti.xml
|
||||
+++ b/tests/data/metadata/fence_wti.xml
|
||||
@@ -153,7 +153,7 @@
|
||||
</parameter>
|
||||
<parameter name="login_timeout" unique="0" required="0">
|
||||
<getopt mixed="--login-timeout=[seconds]" />
|
||||
- <content type="second" default="5" />
|
||||
+ <content type="second" default="10" />
|
||||
<shortdesc lang="en">Wait X seconds for cmd prompt after login</shortdesc>
|
||||
</parameter>
|
||||
<parameter name="power_timeout" unique="0" required="0">
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,30 @@
|
||||
From a416a367a804f1e5abaf142c629fe6ab5572d3b6 Mon Sep 17 00:00:00 2001
|
||||
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||
Date: Thu, 12 Jan 2023 15:46:41 +0100
|
||||
Subject: [PATCH] fence_scsi: skip key generation during validate-all action
|
||||
|
||||
---
|
||||
agents/scsi/fence_scsi.py | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py
|
||||
index e33339614..f9e6823b2 100644
|
||||
--- a/agents/scsi/fence_scsi.py
|
||||
+++ b/agents/scsi/fence_scsi.py
|
||||
@@ -566,11 +566,12 @@ def main():
|
||||
or ("--key" in options and options["--key"])):
|
||||
fail_usage("Failed: nodename or key is required", stop_after_error)
|
||||
|
||||
- if not ("--key" in options and options["--key"]):
|
||||
- options["--key"] = generate_key(options)
|
||||
+ if options["--action"] != "validate-all":
|
||||
+ if not ("--key" in options and options["--key"]):
|
||||
+ options["--key"] = generate_key(options)
|
||||
|
||||
- if options["--key"] == "0" or not options["--key"]:
|
||||
- fail_usage("Failed: key cannot be 0", stop_after_error)
|
||||
+ if options["--key"] == "0" or not options["--key"]:
|
||||
+ fail_usage("Failed: key cannot be 0", stop_after_error)
|
||||
|
||||
if "--key-value" in options\
|
||||
and (options["--key-value"] != "id" and options["--key-value"] != "hash"):
|
Loading…
Reference in new issue