Skip to contentSkip to conversation

backend plugin for Pacemaker

PATCH New Kazunori INOUE 2 participants 5 messages Sep 20, 2011 – Feb 7, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backend plugin for Pacemaker

Hi,

I created the backend "pm-fence" which has met the following configurations / requirements.
- Both hosts and VMs, cluster (Pacemaker) have been configured.
* This backend has STONITH (fencing) function of the VM cluster.
- The VMs are managed as resources (RA is VirtualDomain) by the host cluster.
* In this configuration, in order to stop a VM,
it is necessary to stop the resource through the host cluster. When the VM was stopped without through the host cluster (e.g., run the 'virsh destory'), the host cluster considers that VM resource failed.

Here's an overview of function. Please refer to attached 'overview.png'.
(1) pacemaker detects failure of resource.
(2) STONITH (STONITH plugin is vm-stonith) is executed, target is srv-B.
(3) vm-stonith requests 'fencing' to a host with fence_virt.
(4) use the serial listener.
(5~7) fence_virtd (pm-fence backend) requests 'forced stop' of VM
resource (that is, srv-B) to pacemaker.
(8) destroy the srv-B.

Here's a description of the attached files.
* pm-fence_backend_for_pacemaker.patch
- add the server/pm-fence.c
- change the configure.in and server/Makefile.in
* VirtualDoamin
- Resource Agent for domains managed.
- I'm going to post this RA to the appropriate community
(https://github.com/ClusterLabs/resource-agents).
* vm-stonith
- STONITH plugin (External STONITH module) for VM.
- I'm going to post this plugin to the appropriate community

    (http://hg.linux-ha.org/glue/).

* overview.png
- figure of the overview.
* fence_virt.conf
- sample configuration.
* host.cli, mon-host.txt
- sample configuration file of a host cluster, and mon-host.txt is an output of the crm_mon command.
* VM.cli, mon-VM.txt
- sample configuration file of a VM cluster, and mon-VM.txt is an output of the crm_mon command.

Best Regards,
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pm-fence_backend_for_pacemaker.patch
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20110920/e3e2a0c5/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: VirtualDomain
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20110920/e3e2a0c5/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vm-stonith
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20110920/e3e2a0c5/attachment-0002.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: overview.png
Type: image/png
Size: 32112 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20110920/e3e2a0c5/attachment.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fence_virt.conf
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20110920/e3e2a0c5/attachment.conf>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: host.cli
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20110920/e3e2a0c5/attachment-0003.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mon-host.txt
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20110920/e3e2a0c5/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: VM.cli
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20110920/e3e2a0c5/attachment-0004.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mon-VM.txt
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20110920/e3e2a0c5/attachment-0001.txt>

#1 lore raw

PATCH 1/1 backend plugin for Pacemaker

Quoted 13 lines · Kazunori INOUE

Hi,

I created the backend "pm-fence" which has met the following configurations / requirements.
- Both hosts and VMs, cluster (Pacemaker) have been configured.
* This backend has STONITH (fencing) function of the VM cluster.
- The VMs are managed as resources (RA is VirtualDomain) by the host cluster.
* In this configuration, in order to stop a VM,
it is necessary to stop the resource through the host cluster. When the VM was stopped without through the host cluster (e.g., run the 'virsh destory'), the host cluster considers that VM resource failed.

This patch is good, but the server/Makefile.in needs to use pkg-config --cflags / --libs glib-2.0 rather than static definitions. I have included an updated patch.

Otherwise, I do like this patch quite a lot.

The only question I had is why there needs to be an external STONITH plugin; I was of the impression that fence_virt and fence_xvm work out of the box with Pacemaker 1.1.x. That doesn't affect this particular patch, as far as I can tell (it looks like just a glue wrapper between pacemaker and fence_virt itself).

-- Lon
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-backend-plugin-for-Pacemaker.patch
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20111025/90d12774/attachment.ksh>

#2 lore raw

PATCH 1/1 backend plugin for Pacemaker

Hi, Lon

Quoted 15 lines · Lon Hohberger
Quoted 13 lines · Kazunori INOUE

Hi,

I created the backend "pm-fence" which has met the following configurations / requirements.
- Both hosts and VMs, cluster (Pacemaker) have been configured.
* This backend has STONITH (fencing) function of the VM cluster.
- The VMs are managed as resources (RA is VirtualDomain) by the host cluster.
* In this configuration, in order to stop a VM,
it is necessary to stop the resource through the host cluster. When the VM was stopped without through the host cluster (e.g., run the 'virsh destory'), the host cluster considers that VM resource failed.

Quoted 4 lines

This patch is good, but the server/Makefile.in needs to use pkg-config --cflags / --libs glib-2.0 rather than static definitions. I have included an updated patch.

OK. But please correct the target of 'pkg-config -libs' to ncurses.

# diff 0001-backend-plugin-for-Pacemaker.patch mod
64c64
< +PACEMAKER_LIBS=-lcib -lpe_status `pkg-config --libs glib-2.0`
---
Quoted 1 line

+PACEMAKER_LIBS=-lcib -lpe_status pkg-config --libs ncurses

#

When glib-2.0 is the target, it fail in load.

# pkg-config --libs glib-2.0
-lglib-2.0
#
# fence_virtd -d99 -F
   :
Loading plugin from /DEV/fence-virt/plugins/pm-fence.so
Could not dlopen /DEV/fence-virt/plugins/pm-fence.so:
/usr/lib64/libpe_status.so.2: undefined symbol: stdscr
Quoted 5 lines

Otherwise, I do like this patch quite a lot.

The only question I had is why there needs to be an external STONITH plugin; I was of the impression that fence_virt and fence_xvm work out of the box with Pacemaker 1.1.x. That doesn't affect this particular

We do not know how to do it...

Quoted 3 lines

patch, as far as I can tell (it looks like just a glue wrapper between pacemaker and fence_virt itself).

That's right. The purpose of this STONITH plugin is to adapt the request from a pacemaker to usage of fence_virt/fence_xvm.

Best Regards,
Kazunori INOUE

#3 lore raw

PATCH 1/1 backend plugin for Pacemaker

Quoted 49 lines · Kazunori INOUE

Hi, Lon

Quoted 15 lines · Lon Hohberger
Quoted 13 lines · Kazunori INOUE

Hi,

I created the backend "pm-fence" which has met the following configurations / requirements.
- Both hosts and VMs, cluster (Pacemaker) have been configured.
* This backend has STONITH (fencing) function of the VM cluster.
- The VMs are managed as resources (RA is VirtualDomain) by the host cluster.
* In this configuration, in order to stop a VM,
it is necessary to stop the resource through the host cluster. When the VM was stopped without through the host cluster (e.g., run the 'virsh destory'), the host cluster considers that VM resource failed.

Quoted 4 lines

This patch is good, but the server/Makefile.in needs to use pkg-config --cflags / --libs glib-2.0 rather than static definitions. I have included an updated patch.

OK. But please correct the target of 'pkg-config -libs' to ncurses.

# diff 0001-backend-plugin-for-Pacemaker.patch mod
64c64
<  +PACEMAKER_LIBS=-lcib -lpe_status `pkg-config --libs glib-2.0`
---
Quoted 1 line

+PACEMAKER_LIBS=-lcib -lpe_status pkg-config --libs ncurses

#

When glib-2.0 is the target, it fail in load.

# pkg-config --libs glib-2.0
-lglib-2.0
#
# fence_virtd -d99 -F
    :
Loading plugin from /DEV/fence-virt/plugins/pm-fence.so
Could not dlopen /DEV/fence-virt/plugins/pm-fence.so:
/usr/lib64/libpe_status.so.2: undefined symbol: stdscr
Quoted 5 lines

Otherwise, I do like this patch quite a lot.

The only question I had is why there needs to be an external STONITH plugin; I was of the impression that fence_virt and fence_xvm work out of the box with Pacemaker 1.1.x. That doesn't affect this particular

We do not know how to do it...

Quoted 8 lines
Quoted 3 lines

patch, as far as I can tell (it looks like just a glue wrapper between pacemaker and fence_virt itself).

That's right. The purpose of this STONITH plugin is to adapt the request from a pacemaker to usage of fence_virt/fence_xvm.

Best Regards,
Kazunori INOUE

Hi,

Is there a plan to merge this patch?
To that end, what do I need to do?

Regards,
Kazunori INOUE