Heartbeat 3.0.3 introduction and RPM

Source: Internet
Author: User

This is reprintedArticle. Although the source code has been compiled, but the shellfunc file is always missing, I checked the RPM package installation and found this article. Link:

Http://www.howtoforge.com/high-availability-load-balancer-haproxy-heartbeat-fedora8

The configuration is basically done. One of the problems is that the master and slave hosts are reversed! Try again tomorrow!

I have not introduced heatbeat for the first time. With yum, you can easily install heartbeat 2.x. the heartbeat 2.x deployment method has been described in detail in the materials on the Internet (including my previous articles. However, since the release of Heartbeat 3.0.2 in February, as the first 3.x final release version, the official website has been revised and is recommended from 2. updating X to 3.0.2 makes it difficult for many old configuration documents and descriptions to find links. In addition, I considered using heartbeat3, which is also a large number of bugs I encountered when I used heartbeat 2.1.3 + drbd + Oracle configuration a few days ago. Although the problem is finally solved, but lack of official support, it may be difficult to maintain in the future. For the long term, it is imperative to use heartbeat 3.
Fortunately, heartbeat 3 is not much different from heartbeat 2.x. You can even consider heartbeat 3 as a version after heartbeat 2.x is split by module. The configuration methods are similar. Therefore, the biggest difficulty encountered during actual deployment is the installation problem. The official materials provide source code. I do not like to deploy software on the Generation System in the source code mode. This will bring great problems to the subsequent maintenance. Through hard work, I finally compiled a set of Heartbeat 3.0.3 rpm with GUI management.

 

1. About heartbeat 3
1. Version Problems
The last official heartbeat stable release 2.x version is 2.1.4.
Although RPM ora, opensuse and other projects have provided rpm versions such as 2.99 and 3.0, the actual versions are compiled based on heartbeat 3.0 and 3.0.1 source code. This version is also used for heartbeat 3, which is introduced in most online materials.
The first version officially released by heartbeat 3 is 3.0.2, which is also used to differentiate the 2.99 mentioned above. In addition, due to the official release of 3.0.2, the services provided by opensuse have also been deleted.
For more information, see announce: final release of Heartbeat 3.0.2, cluster-glue 1.0.2, and resource-agents 1.0.2.
These principles are basically the same for heartbeat 3 and 2.x. For more information, see [original] Heartbeat 2.x infrastructure.

2. Composition
The biggest difference between heartbeat 3 and 2.x is that 3 splits the original 2.x into multiple sub-projects by module and provides a cluster-glue component dedicated to local ResourceManager management. Heartbeat + cluster-glue + resouce-AGENT:

Reference (1) hearbeat itself is the basis of the entire cluster (cluster messaging layer), responsible for maintaining the information of each node in the cluster and their previous communication;
(2) cluster-glue is equivalent to a middle layer. It can associate heartbeat with CRM (pacemaker), which consists of two parts: LRM and stonith;
(3) Resource-agent is the OCF scripts of various resources. These scripts are called by LRM to start, stop, and monitor various resources.


These three components can constitute a complete HA cluster system. However, this is not enough because there is no management tool.
The original GUI tool Cluster Resource Manager (CRM for short) is also split by another independent project pacemaker. Pacemaker provides multiple user interfaces:

Reference (1) CRM shell character-based management;
(2) A web konsole Window Using ajax web configuration;
(3) hb_gui, that is, heartbeat GUI graphical Configuration tool, which is also the default GUI Configuration tool of 2.x;
(4) DRBD-MC, a Java-based configuration management tool.


For more details, see: Here.
Choose one of the preceding user management interfaces. In cluster stacks supported by pacemaker, besides heartbeat, openais is also supported. However, the content of openais is beyond the scope of this article and will be introduced later.

 

Ii. RPM packages
1. RPM of Heartbeat 3
The heartbeat 3 official website provides source code for heartbeat 3.0.3, cluster glue 1.0.5, and resource agents 1.0.3. Download it, compile it, and install it.
If you do not like to deploy the production system using source code like me, you can compile it using spec in the source code package. During compilation, pay attention to creating directories in the corresponding source code package and setting variables in spec, but the overall problem is not big.
In the install document of pacemaker, The epel installation package is provided. If your system is Asianux, RHEL, centos, etc., you can install it in the following ways:

 

Rpm-uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm
Wget-O/etc/yum. Repos. d/pacemaker. Repo http://clusterlabs.org/rpm/epel-5/clusterlabs.repo
Yum install-y pacemaker corosync heartbeat


Alternatively, you can directly click the following link to obtain the corresponding RPM or source code SRC. RPM:
Http://www.clusterlabs.org/rpm/epel-5/
Http://www.clusterlabs.org/rpm/epel-5/src/
Through the above installation process, the system has provided an environment for building heartbeat 3, including CRM command line configuration and management tools (provided by pacemaker ). However, hb_gui graphical configuration tools are not included.
※Note: I have not installed ldirectord here, because I have not used LVS. If you need to monitor LVS, you can install it on your own.

 

2. Pacemaker Python Gui
As mentioned above, this is a GUI-based configuration management tool provided by pacemaker, that is, hb_gui in heartbeat 2.x.
Official Website: http://hg.clusterlabs.org/pacemaker/pygui
In some heartbeat versions, such as 2.99 provided by fedora itself, known as: pacemaker-pygui-1.4, the latest version is 2.0, which has been renamed: pacemaker-mgmt-2.0.0.
Some problems may occur during compilation:
A. ac_prog_intltool reports an error
For example:

Reference # tar xvjf Pacemaker-Python-GUI-.tar.bz2
#./Bootstrap
Autoconf package Autoconf found.
......
./Configure: Line 2064: syntax error near unexpected token '0. 100'
./Configure: Line 2064: 'ac _ prog_intltool (0.35.2 )'


The reason is that a dependency package intltool-0.35.0-2 is missing. After installation, run:

 

 

# Autoreconf-ifs
#./Bootstrap


See:
Error on compiling pacemaker-Gui
[RPM] pacemaker-mgmt for corosync 1.1.2 and pacemaker 1.0.6

 

B. delete_attr Error
For example:

Reference ....
Mgmt_crm.c: In function 'on _ cleanup_rsc ':
Mgmt_crm.c: 1307: Warning: Passing argument 9 of 'delete _ ATTR 'makes integer from pointer without a cast
Mgmt_crm.c: 1307: Error: Too extends arguments to function 'delete _ ATTR'
Mgmt_crm.c: 1316: Warning: Passing argument 9 of 'Update _ ATTR 'makes integer from pointer without a cast
Mgmt_crm.c: 1316: Error: Too required arguments to function 'Update _ ATTR'
Gmake [2]: *** [libhbmgmt_la-mgmt_crm.lo] Error 1
Gmake [2]: Leaving directory/home/rc6/Pacemaker-Python-GUI-0f1490eaa8d8/MGMT/daemon'
Gmake [1]: *** [All-recursive] Error 1
Gmake [1]: Leaving directory '/home/rc6/Pacemaker-Python-GUI-0f1490eaa8d8/MGMT'
Make: *** [All-recursive] Error 1


The cause of this error is that some changes have been made in pacemaker 1.1, and the latest pacemaker-mgmt 2.0 has also been adjusted accordingly. However, if the current pacemaker is still 1.0, an error will occur.

Reference # rpm-Qa | grep pacemaker
Pacemaker-libs-devel-1.0.9.1-1.AXS3
Pacemaker-1.0.9.1-1.AXS3
Pacemaker-libs-1.0.9.1-1.AXS3


The solution is to modify the/MGMT/daemon/mgmt_crm.c file in the source code to comply with pacemaker 1.0:

References 1.7-delete_attr (cib_conn, cib_sync_call, xml_cib_tag_status, dest_node, null,
1.8 + delete_attr (cib_conn, cib_sync_call, xml_cib_tag_status, dest_node, null, null,
......
1.16-xml_cib_tag_crmconfig, null, "Last-lrm-refresh", now_s, false );
1.17 + xml_cib_tag_crmconfig, null, "Last-lrm-refresh", now_s, false );
1.18 crm_free (now_s );


Another method is to use the earlier version of pacemaker-mgmt 2.0.0 package: Click to download.
For details, see:
Erro compiling pacemaker GUI client

 

C. RPM package
Of course, I finally generated several RPM packages:

Reference pacemaker-mgmt-2.0.0-1.1.x86_64.rpm
Pacemaker-mgmt-client-2.0.0-1.1.x86_64.rpm
Pacemaker-mgmt-devel-2.0.0-1.1.x86_64.rpm


It can be obtained from the appendix.

 

Iii. Appendix
After talking about this, I just want to understand the composition of Heartbeat 3. As for the RPM used for installation, I have prepared for the following:

Download a file http://www.linuxfly.org/attachment.php? FID = 1, 824
Files include:
Cluster-glue-1.0.5-1.AXS3.x86_64.rpm ldirectord-1.0.3-1.AXS3.x86_64.rpm pacemaker-1.0.9.1-1.AXS3.x86_64.rpm
Cluster-glue-libs-1.0.5-1.AXS3.x86_64.rpm libesmtp-1.0.4-5.AXS3.x86_64.rpm pacemaker-libs-1.0.9.1-1.AXS3.x86_64.rpm
Cluster-glue-libs-devel-1.0.5-1.AXS3.x86_64.rpm libesmtp-devel-1.0.4-5.AXS3.x86_64.rpm pacemaker-libs-devel-1.0.9.1-1.AXS3.x86_64.rpm
Corosync-1.2.5-1.3.AXS3.x86_64.rpm libhbaapi-2.2-4AXS3.x86_64.rpm pacemaker-mgmt-2.0.0-1.1.x86_64.rpm
Corosynclib-1.2.5-1.3.AXS3.x86_64.rpm libhbaapi-devel-2.2-4AXS3.x86_64.rpm pacemaker-mgmt-client-2.0.0-1.1.x86_64.rpm
Corosynclib-devel-1.2.5-1.3.AXS3.x86_64.rpm libnet-1.1.2.1-5AXS3.x86_64.rpm pacemaker-mgmt-devel-2.0.0-1.1.x86_64.rpm
Heartbeat-3.0.3-1.AXS3.x86_64.rpm libnet-devel-1.1.2.1-5AXS3.x86_64.rpm perl-MailTools-1.77-1.AXS3.noarch.rpm
Heartbeat-devel-3.0.3-1.AXS3.x86_64.rpm openais-1.1.3-1.1.AXS3.x86_64.rpm perl-TimeDate-1.16-5.AXS3.noarch.rpm
Heartbeat-libs-3.0.3-1.AXS3.x86_64.rpm openaislib-1.1.3-1.1.AXS3.x86_64.rpm repodata
Intltool-0.35.0-2.x86_64.rpm openaislib-devel-1.1.3-1.1.AXS3.x86_64.rpm resource-agents-1.0.3-1.AXS3.x86_64.rpm
The repodata includes:
Filelists.xml.gz other.xml.gz primary.xml.gz repomd. xml

This version is applicable to x86_64 platform environments of Hongqi Asianux 3.x, RHEL 5.x, and centos 5.x.
After the download, decompress the package to a directory, such as/root/RPMs. Then, create a file in/etc/yum. Repos. D:

Reference cat heartbeat. Repo
[Heartbeat]
Name = heartbeat 3
Baseurl = file: // root/RPMS
Enabled = 1


Next, uninstall the old package:

 

 

# Rpm-e 'rpm-Qa | grep heartbeat'
# Rpm-e 'rpm-Qa | grep openais'


Finally, run the following command to install it:

 

 

# Yum install pacemaker corosync heartbeat ldirectord pacemaker-mgmt-Client

Related logs
[Original] use the Red Flag HA cluster configuration tool in Windows
[Original] Build heartbeat 3.0.3 GUI + drbd + Oracle 10g dual-host mutual backup Cluster
[Original] Build heartbeat 2.1.3 GUI + drbd + Oracle 10g dual-host mutual backup Cluster
[Switch] Hongqi ha le 6.0 Image Data Synchronization installation manual

Tags: Ha, heartbeat

KL

2010/08/19 :26 libcpp. so.2
Libsackpt. so.2
There is a problem...

What does linuxing reply to at on 2010/08/20? For more information, see.
If you mean these libraries are missing, you should check the system version. The above has been clearly written. I compiled it on the Red Flag Asianux 3.0 x86_64 and it is compatible with RHEL 5 and centos 5. I cannot guarantee compatibility with other versions. Jackshan

2010/07/27 13:41 warning: Macro 'am _ po_subdirs 'not found in Library

 

Solution:

It requires gettext-Tools

Linuxing replied to the following question?
Http://www.gossamer-threads.com/lists/linuxha/pacemaker/60953
In systems such as Asianux 3.0/centos 5.x, gettext instead of gettext-tools:
# Rpm-Qa | grep gettext
Gettext-0.14.6-4.1AX
Gettext-devel-0.14.6-4.1AX
Gettext-0.14.6-4.1AX
Gettext-devel-0.14.6-4.1AX

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.