[Pacemaker] pacemaker-mgmt (pygui) on fedora 20

Dori Seliskar dori at delo.si
Thu Jan 8 09:32:35 UTC 2015


Hi all,

In the past I have put to good use the pacemaker-mgmt  (crm_gui) , mostly when I have to
delegate management of cluster to third person, so much easier to explain ...
So for latest cluster I managed to get pacemaker-mgmt working on Fedora 20 (since it is not so straight forward
I included rough procedure below, for those interested),  not tested to the extent yet, but all frequently used
operations work (creating resource, starting/stopping resource,  put cluster/resource in unmanaged state ...)

My question is following:

Before the mgmtd was started by corosync like this:

corosync.conf:

service {
	# Load the Pacemaker Cluster Resource Manager
	name: pacemaker
	ver:  0
	use_mgmtd: 1
}
that is apparently not the case anymore, so I start mgmtd l by hand like this:

/usr/lib64/heartbeat/mgmtd -v &

This mostly work. But if corosync/pacemaker  is not started  or just starting it fails miserably with message Aborted.
If I wait that cluster comes up and online then it works.

My question is - how to start mgmtd by cluster itself properly as before ?

I use:

corosync-2.3.4-1.fc20.x86_64
corosynclib-devel-2.3.4-1.fc20.x86_64
pacemaker-doc-1.1.12-2.fc20.x86_64
corosynclib-2.3.4-1.fc20.x86_64
pacemaker-libs-1.1.12-2.fc20.x86_64
pacemaker-cts-1.1.12-2.fc20.x86_64
pacemaker-cli-1.1.12-2.fc20.x86_64
pacemaker-libs-devel-1.1.12-2.fc20.x86_64
pacemaker-1.1.12-2.fc20.x86_64
pcs-0.9.48-1.fc20.x86_64
pacemaker-cluster-libs-1.1.12-2.fc20.x86_64
pacemaker-remote-1.1.12-2.fc20.x86_64

Best regards,
ds

#  procedure to get pacemaker-mgmt working on Fedora 20 starting from minimal install, rather long, safe to skip ;)

yum install pacemaker pacemaker-cli pacemaker-cluster-libs pacemaker-doc pacemaker-cts pacemaker-libs pacemaker-libs-devel pacemaker-remote

wget http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/Fedora_20/x86_64/cluster-glue-1.0.12-1.15.2.x86_64.rpm
wget http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/Fedora_20/x86_64/cluster-glue-libs-1.0.12-1.15.2.x86_64.rpm
wget http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/Fedora_20/x86_64/cluster-glue-libs-devel-1.0.12-1.15.2.x86_64.rpm

# --nodeps because of sdb missing dependency, if you are not using sdb you should be fine, btw where is sbd nowadays ?
rpm -ivh --nodeps  cluster-glue-1.0.12-1.15.2.x86_64.rpm cluster-glue-libs-1.0.12-1.15.2.x86_64.rpm cluster-glue-libs-devel-1.0.12-1.15.2.x86_64.rpm

# install some more dependencies
yum install OpenIPMI-devel asciidoc autoconf automake docbook-dtds docbook-style-xsl libaio-devel libtool openssl-devel python-devel libcurl-devel net-snmp-devel openhpi-devel
yum install intltool gettext gettext-devel gettext-common gettext-common-devel gettext-libs gnutls-devel gnutls swig pam-devel python-devel pygtk2 xauth


wget https://github.com/ClusterLabs/pacemaker-mgmt/archive/master.zip
unzip pacemaker-mgmt/archive/master.zip

cd pacemaker-mgmt-master/

#save following text into patch.txt

===== SNIP =====
--- pacemaker-mgmt-master/configure.in	2014-10-20 17:17:56.000000000 +0200
+++ pacemaker-mgmt-master.patched/configure.in	2015-01-07 11:43:09.622664993 +0100
@@ -55,7 +55,7 @@
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
 #IT_PROG_INTLTOOL([0.40.5], [no-xml])
-AC_PROG_INTLTOOL(0.35.2)
+AC_PROG_INTLTOOL
 AM_PO_SUBDIRS
 
 # Set DATADIRNAME correctly if it is not set yet
--- pacemaker-mgmt-master/mgmt/daemon/mgmt_crm.c	2014-10-20 17:17:56.000000000 +0200
+++ pacemaker-mgmt-master.patched/mgmt/daemon/mgmt_crm.c	2015-01-07 11:46:05.960668547 +0100
@@ -1652,7 +1652,7 @@
 	delete_lrm_rsc(crmd_channel, argv[1], argv[2]);
 	refresh_lrm(crmd_channel, NULL); 
 	
-	rc = query_node_uuid(cib_conn, argv[1], &dest_node);
+	rc = query_node_uuid(cib_conn, argv[1], &dest_node, NULL);
 	if (rc != 0) {
 		mgmt_log(LOG_WARNING, "Could not map uname=%s to a UUID: %s\n",
 				argv[1], pcmk_strerror(rc));
@@ -1678,7 +1678,7 @@
 		    XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, NULL, "last-lrm-refresh", now_s, FALSE);
 #else
 	update_attr_delegate(cib_conn, cib_sync_call,
-		    XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, NULL, "last-lrm-refresh", now_s, FALSE, NULL);
+		    XML_CIB_TAG_CRMCONFIG, NULL, NULL, NULL, NULL, "last-lrm-refresh", now_s, FALSE, NULL, NULL);
 #endif
 	free(now_s);
===== SNIP =====


# patch it
patch -p1 < patch.txt

./ConfigureMe install --disable-fatal-warnings

# run mgmtd
/usr/lib64/heartbeat/mgmtd -v &

# run gui
crm_gui &
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20150108/ac798e5f/attachment-0003.html>


More information about the Pacemaker mailing list