OpenVZ Forum


Home » General » Support » Even worse thing when migrating online
Re: Even worse thing when migrating online [message #37399 is a reply to message #36988] Sun, 06 September 2009 20:35 Go to previous messageGo to previous message
divB is currently offline  divB
Messages: 79
Registered: April 2009
Member
Hi,

I have built in the hack too and now the migration also succeeds! I have tried a few times, no problems!

But actually I do NOT understand why because the MAC of the bridge never changes!!

Quote:
More precisely, almost fine, since now I have to somehow persuade the switches to automatically and quickly learn the location of the migrated VE (currently, even if the VE has been migrated, all the pings coming outside of the VE's segment are "routed" to the source HW node -- as soon as I ping anything from the migrated VE, the switches learn this new location and "route" all the packets as suspected.


My hack is to read out the ARP table just before migration and after migration, I ping all those IPs. For this, I modified vzmigrate:

--- /usr/sbin/vzmigrate 2009-05-08 14:40:23.000000000 +0200
+++ /usr/local/sbin/vzmigrate2  2009-09-05 13:07:07.000000000 +0200
@@ -446,6 +446,13 @@
 if [ $online -eq 1 ]; then
        log 1 "Live migrating VE"

+       log 1 "Saving arp table"
+       # vzctl exec2 $VEID "arp -n | awk '{print $1}' | egrep '^[0-9\.]+$' >/var/run/arp_table"
+       vzctl exec $VEID 'arp -n | awk "{print \$1}" | egrep "^[0-9\.]+\$" >/var/run/arp_table'
+
        log 2 "Suspending VE"
        time_suspend=$(date +%s.%N)
        if ! logexec 2 vzctl chkpnt $VEID --suspend ; then
@@ -560,6 +567,12 @@
        log 2 "Removing dumpfiles"
        rm -f "$VE_DUMPFILE"
        $SSH "root@$host" "rm -f $VE_DUMPFILE"
+
+       log 1 "Pinging hosts in arp cache"
+       $SSH root@$host vzctl exec $VEID "'[ -x /usr/sbin/fping ] && fping -i 1 -r 1 -f /var/run/arp_table'"
 else
        if [ "$state" = "running" ]; then
                log 1 "Starting VE"


Regards,
divB
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Debian GNU/Linux 5.0.2 'Lenny' / sparc64
Next Topic: How to enable TUN/TAP device for VPS?
Goto Forum:
  


Current Time: Sat Oct 04 20:42:36 GMT 2025

Total time taken to generate the page: 0.08952 seconds