[Pacemaker] pacemaker-mgmt (pygui) on fedora 20
Gao,Yan
ygao at suse.com
Thu Jan 8 13:39:04 UTC 2015
On 01/08/2015 02:25 PM, Gao,Yan wrote:
> Hi Dori,
>
> On 01/08/2015 10:32 AM, Dori Seliskar wrote:
>> 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),
> Nice! Thanks for doing this :)
>
>> 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,
> This only works if running on corosync-1.x, which is able to help spawn
> pacemaker daemons and mgmtd.
>
>
>> 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 ?
> Actually, for corosync-2, the decent way would be an init script or a
> systemd service file for mgmtd to start it after pacemaker. Patches are
> welcome ;)
>
>>
>> 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 ?
> Hmm, I guess sbd has failed to be built in that repo. Anyway, here is
> the sbd upstream:
> https://github.com/l-mb/sbd
>
>>
>> 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 =====
> Yeah, correct. There have been some changes of APIs in pacemaker. I was
> thinking about to figure out some way to conditionally compile the bits
> so that it would not break the compatibility with older pacemaker, but
> didn't get the chance. But maybe that would not be necessary any more. I
> guess most people are with pacemaker-1.1.11 or 1.1.22 already.
Pushed them:
https://github.com/ClusterLabs/pacemaker-mgmt/commit/f27fc27fd4d69dfc3bef3134abb79258ab8debc4
https://github.com/ClusterLabs/pacemaker-mgmt/commit/79579ac8ed7b073749cc702527cfc4187ec1edf5
Regards,
Yan
>
>
> Regards,
> Yan
>
>>
>> # patch it
>>
>> patch -p1 < patch.txt
>>
>> ./ConfigureMe install --disable-fatal-warnings
>>
>> # run mgmtd
>>
>> /usr/lib64/heartbeat/mgmtd -v &
>>
>> # run gui
>>
>> crm_gui &
>>
>>
>>
>> _______________________________________________
>> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>>
>> Project Home: http://www.clusterlabs.org
>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> Bugs: http://bugs.clusterlabs.org
>>
>
--
Gao,Yan <ygao at suse.com>
Senior Software Engineer
SUSE LINUX Products GmbH
More information about the Pacemaker
mailing list