[pve-devel] [PATCH] Fix typo in fence_pve and set SSL as default

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Aug 11 10:44:28 CEST 2015


Current fence_pve is broken, as a misstyped variable caused
an exception. Also SSL was set do default for the connection
to comply with pveproxy's behaviour.
This changes where already pushed upstream, but not found in
any stable release. fence_agents 4.0.20 should make this patch
obsolete.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 debian/patches/fix-typo-in-fence-pve-agent.patch | 34 ++++++++++++++++++++++++
 debian/patches/series                            |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 debian/patches/fix-typo-in-fence-pve-agent.patch

diff --git a/debian/patches/fix-typo-in-fence-pve-agent.patch b/debian/patches/fix-typo-in-fence-pve-agent.patch
new file mode 100644
index 0000000..775cb0f
--- /dev/null
+++ b/debian/patches/fix-typo-in-fence-pve-agent.patch
@@ -0,0 +1,34 @@
+From 2a9b63bf792ed467b521f58814adb386f6060aaa Mon Sep 17 00:00:00 2001
+From: Thomas Lamprecht <t.lamprecht at proxmox.com>
+Date: Tue, 11 Aug 2015 10:28:18 +0200
+Subject: [PATCH] Correct typo and set SSL as default
+
+This patch corrects a typo and set ssl as default for the
+fence_pve agent. Pushed to upstream, not yet in a stable release.
+
+Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
+---
+ fence/agents/pve/fence_pve.py | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/fence/agents/pve/fence_pve.py b/fence/agents/pve/fence_pve.py
+index bb59a9b..39d0e86 100755
+--- a/fence/agents/pve/fence_pve.py
++++ b/fence/agents/pve/fence_pve.py
+@@ -106,11 +106,10 @@ def send_cmd(options, cmd, post=None):
+ 		conn.setopt(pycurl.POSTFIELDS, urllib.urlencode(post))
+ 	conn.setopt(pycurl.WRITEFUNCTION, output_buffer.write)
+ 	conn.setopt(pycurl.TIMEOUT, int(options["--shell-timeout"]))
+-	if opt.has_key("--ssl") or opt.has_key("--ssl-secure"):
++	if options.has_key("--ssl") or options.has_key("--ssl-secure"):
+ 		conn.setopt(pycurl.SSL_VERIFYPEER, 1)
+ 		conn.setopt(pycurl.SSL_VERIFYHOST, 2)
+-
+-	if opt.has_key("--ssl-insecure"):
++	else:
+ 		conn.setopt(pycurl.SSL_VERIFYPEER, 0)
+ 		conn.setopt(pycurl.SSL_VERIFYHOST, 0)
+ 
+-- 
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 7cb244d..22aa5ca 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 #fix-make-check.patch
 fix-vgs-path.patch
+fix-typo-in-fence-pve-agent.patch
-- 
2.1.4




More information about the pve-devel mailing list