Category Pacemaker

Pacemaker Heartbeat Linux High Available How To

Die Software ist extrem kompliziert und schlecht dokumentiert.

Benötigt die aktuelle Version von libnet. Aber Achtung, sofern snort installiert ist gibt es Konflikte, da
snort im inline Modus unbedingt die ältere 1.0er Version braucht 🙁 .
Wenn das Management aktiviert ist (“–enable-mgmt”) benötigt man noch GNU/TLS und Python (PyGTK usw. [Am besten via Yast2 installieren, da tausend Abhängigkeiten an Python hängen]).

libnet:
“wget http://www.packetfactory.net/libnet/dist/libnet.tar.gz” oder “http://skylink.dl.sourceforge.net/project/libnet-dev/libnet-1.2-rc3.tar.gz”
“tar -xvzf libnet.tar.gz”
“cd libnet”
“./configure” oder bei SuSE “./configure –bindir=/usr/bin –sbindir=/usr/sbin –libdir=/usr/lib64 –includedir=/usr/include”
“make”
“make install”

auto...

Read More

Xen Failover Pacemaker

//Compile Native: clear; g++ -g -Wall xen_failover.cpp -o xen_failover; ./xen_failover Domain-0 /root/xen_storage/config_file.xen
/*
Pacemaker create Resource:
crm configure primitive xen_ha_apache-test ocf:heartbeat:anything \
params binfile=”/root/xen_storage/konfigs/heartbeat/xen_failover apache-test” cmdline_options=”/root/xen_storage/test_apache/test_apapche_hardening.xen” \
op start timeout=”20s” \
op stop timeout=”30s” \
op monitor interval=”20s” timeout=”30s” start-delay=”0s” depth=”0s”  on-fail=”restart”
*/

/*
To Do:
Checken ob Pacemaker und corosync noch laufen
Checken ob VM schon läuft.
Falls striker wegfällt VMs pausieren oder einfrieren.
Checken ob die OCFS2 mount noch vorhanden sind.
Resourcen Check ob start der VM möglich bzw...

Read More

Xen Failover Check Pacemaker

//Compile Native: clear; rm -frv  xen_failover_check; g++ -g -Wall xen_failover_check.cpp -o xen_failover_check; ./xen_failover_check Dummy_command Domain-0

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <dirent.h>
#include <unistd.h>
#include <errno.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <iostream>
#include <vector>
#include <sstream>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <fstream>
#include <time.h>
#include <unistd.h>

using namespace std;

int main(int argc, char **argv)
{

while(1)
{
sleep(1);
string vm_name;
vm_name=argv[2];

//cout<<“vm_name: “<<vm_name<<endl;

//ps -ef | awk ‘$9==”Domain-0″‘ | awk ‘{print $9}’
string ps_pruefkommando;

ps_...

Read More

Pacemaker OCF XEN migration add-on

#!/bin/sh
#
#       OCF Resource Agent compliant resource script.
#
# Copyright (c) 2009 IN-telegence GmbH & Co. KG, Dominik Klein
#                    All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it would be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Further, this software is distributed without any warranty that it is
# free of the rightful claim of any third person regarding infringement
# or the like...

Read More