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

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Aug 11 14:15:51 CEST 2015


Ok, "bad" timing :D Version 4.0.20 of fence_agents was released today 
few minutes ago:
> Welcome to the fence-agents 4.0.20 release
>
> This release includes several bugfixes and features:
>
> * In some cases password string was expected twice what lead to 'Unable
> to login'
> * New fence agent fence_rcd_serial for DYI fence device (look at
> https://smcleod.net/rcd-stonith/ ; thanks to Sam McLeod)
> * Fence_pve should default to SSL (thanks to Thomas Lamprecht)
> * Fixes nroff error for fence_virsh (thanks to Adrian Vondendriesch)
> * Improve monitoring for fence_scsi
> * Fixes for devices which do not have port and obtaining status is not
> possible
> * fence_ipmilan no longer print password to debug info
> * Possibility to do force-ON even if device is already ON
> * Possibility to declare that device does not have ON or OFF (usually
> only reboot works)
>
>
> Git repository can be found at https://github.com/ClusterLabs/fence-agents/
>
> The new source tarball can be downloaded here:
>
> https://github.com/ClusterLabs/fence-agents/archive/v4.0.20.tar.gz

If fence-agents-pve get's updated to this version, this patch is obsolete.

On 08/11/2015 10:44 AM, Thomas Lamprecht wrote:
> 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





More information about the pve-devel mailing list