Heartbeat like IP-Takeover

Author: stephan  |  Category: Linux, Netzwerk, Sonstiges

[lang_en]
Heartbeat Based Clusters are a fine thing but even clusters can crash. In this case you may have to bring up the ressources manually. With

ip -f inet addr add 192.168.1.1/24 brd 192.168.1.255 dev eth1

you can add the VIP manually but you have to clean the ARP Caches manually to have sucess. You clean the ap caches with this command:

arping -c 4 -A -I eth1 192.168.1.1

[/lang_en][lang_de]
Heartbeat basierende Cluster sind eine wunderbare Sache. Doch es mag sein das man im Katastrophenfall die Ressourcen des Clusters manuell zur Verfügung stellen muss.
Mit

ip -f inet addr add 192.168.1.1/24 brd 192.168.1.255 dev eth1

lässt sich die Virtuelle IP manuell an ein Interface binden aber erreichbar ist die IP erst , wenn mit folgendem Befehl die ARP Caches im ganzen Netz upgedated werden.

arping -c 4 -A -I eth1 192.168.1.1

[/lang_de]

A strange rdiff_backup error and its solution

Author: stephan  |  Category: Linux, Netzwerk, Sonstiges

[lang_de]
Nach einem etwas längeren Umzug eines rdiff_backup repositories lieferte das Backup folgenden Fehler:

[03/20/13 13:31:44] Exception 'Found too many current_mirror incs!' raised of class
'':
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 304,
in error_check_Main
[03/20/13 13:31:44] try: Main(arglist)
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 324,
in Main
[03/20/13 13:31:44] take_action(rps)
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 280,
in take_action
[03/20/13 13:31:44] elif action == "backup": Backup(rps[0], rps[1])
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 337,
in Backup
[03/20/13 13:31:44] backup_final_init(rpout)
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 501,
in backup_final_init
[03/20/13 13:31:44] checkdest_if_necessary(rpout)
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 916,
in checkdest_if_necessary
[03/20/13 13:31:44] need_check = checkdest_need_check(dest_rp)
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 907,
in checkdest_need_check
[03/20/13 13:31:44] assert len(curmir_incs) == 2, "Found too many current_mirror incs!"

Was war geschehen ? Durch den langen Kopiervorgang waren mehrere current_mirror Statusdateien mitgesynct worden.
In der obigen Fehlermedlung waren es zwei statt einer.
Wie lösen ?
Einfach in allen rdiff_datenverzeichnissen alle current_mirror* bis auf die neuste löschen und das Backup läuft wieder .
[/lang_de][lang_en]
After a longer migration of rdiff_backup repository (4 Weeks) I got this strange error

[03/20/13 13:31:44] Exception 'Found too many current_mirror incs!' raised of class
'':
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 304,
in error_check_Main
[03/20/13 13:31:44] try: Main(arglist)
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 324,
in Main
[03/20/13 13:31:44] take_action(rps)
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 280,
in take_action
[03/20/13 13:31:44] elif action == "backup": Backup(rps[0], rps[1])
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 337,
in Backup
[03/20/13 13:31:44] backup_final_init(rpout)
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 501,
in backup_final_init
[03/20/13 13:31:44] checkdest_if_necessary(rpout)
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 916,
in checkdest_if_necessary
[03/20/13 13:31:44] need_check = checkdest_need_check(dest_rp)
[03/20/13 13:31:44] File "/usr/lib/pymodules/python2.6/rdiff_backup/Main.py", line 907,
in checkdest_need_check
[03/20/13 13:31:44] assert len(curmir_incs) == 2, "Found too many current_mirror incs!"

What happened ? Because of the very long Migration of the repository more than one current_mirror Statusfiles had been synced.
In the errormessage above it had been two files .
how to solve ?
Simply delete in all rdiff_datadirs all current_mirror* files except the newest one and your rdiff_backup is running again
[/lang_en]