Near-live migration behavior

Hi all,

I’m trying out this very interesting new feature, and the container is indeed shut down at the very end. However, it becomes unreachable on the network as soon as the migration begins. Is this expected behavior, which would be a shame, or is it related to my configuration (ovn network) ?

Thanks,

Guillaume

The 7.4 announcement describes the container staying running during the incremental transfers and stopping only for the final one. It doesn’t explain the early loss of network access you’re seeing with OVN. Could you share the exact migration command, with private host and instance names redacted?

@presztak any idea?
I don’t think we fire any of the device related logic which would impact the network until the final pass.

I haven’t verified it yet, but it sounds like a bug. I’m wondering if it might be related to OVN networking, but for now that’s just a guess. I’ll take a look as soon as I can.

Thanks for your replies. Nothing special, I think :

incus move moss --target incus-xxx.xxx --stateless --refresh

In the instance shell, I cannot ping the gateway as soon as migration starts, interface status is “up” :

(integ)root@moss:~# ping 172.16.122.1
PING 172.16.122.1 (172.16.122.1) 56(84) bytes of data.
64 bytes from 172.16.122.1: icmp_seq=1 ttl=254 time=1.93 ms
64 bytes from 172.16.122.1: icmp_seq=2 ttl=254 time=0.973 ms
64 bytes from 172.16.122.1: icmp_seq=3 ttl=254 time=0.731 ms
From 172.16.122.17 icmp_seq=10 Destination Host Unreachable
From 172.16.122.17 icmp_seq=11 Destination Host Unreachable
From 172.16.122.17 icmp_seq=12 Destination Host Unreachable
^C
--- 172.16.122.1 ping statistics ---
17 packets transmitted, 4 received, +6 errors, 76.4706% packet loss, time 16371ms
rtt min/avg/max/mdev = 0.731/1.177/1.934/0.454 ms, pipe 4

(integ)root@moss:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
54: eth0@if55: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1442 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 10:66:6a:12:06:0e brd ff:ff:ff:ff:ff:ff link-netnsid 0

Tried on another cluster, same problem.

It doesn’t occur with a simple bridged interface (an ovs bridge), the network remains available until the restart.

some more information:

monitoring log files like ovn-controller.log or ovs-vswitchd.log on source and target member doesn’t show any activity at the start of the migration. It does show the deletion and creation of the interfaces at the end of the migration.

But monitoring the ovs dataplane (ovs-ofctl monitor br-int ‘watch:!initial’) clearly shows that certain flows are deleted (related to the instance mac-address and ip address) as soon as the migration command is executed :

NXST_FLOW_MONITOR reply (xid=0x0):
 event=DELETED reason=delete table=31 cookie=0xef93a8b8 udp6,reg0=0x8/0x8,reg14=0x68,metadata=0x3,dl_src=10:66:6a:12:06:0e,dl_dst=33:33:00:00:00:00/ff:ff:00:00:00:00,ipv6_dst=ff02::1:2,tp_src=546,tp_dst=547 actions=move:NXM_OF_ETH_SRC[]->NXM_OF_ETH_DST[],mod_dl_src:10:66:6a:14:82:74,move:NXM_NX_IPV6_SRC[]->NXM_NX_IPV6_DST[],load:0x12666afffe148274->NXM_NX_IPV6_SRC[0..63],load:0xfe80000000000000->NXM_NX_IPV6_SRC[64..127],mod_tp_src:547,mod_tp_dst:546,move:NXM_NX_REG14[]->NXM_NX_REG15[],load:0x1->NXM_NX_REG10[0],resubmit(,37)
 event=DELETED reason=delete table=30 cookie=0xe00a349 udp6,reg14=0x68,metadata=0x3,dl_src=10:66:6a:12:06:0e,dl_dst=33:33:00:00:00:00/ff:ff:00:00:00:00,ipv6_dst=ff02::1:2,tp_src=546,tp_dst=547 actions=controller(userdata=00.00.00.05.00.00.00.00.00.01.de.10.00.00.00.63.00.05.00.10.2a.02.84.00.07.19.81.22.12.66.6a.ff.fe.12.06.0e.00.17.00.20.2a.02.84.00.07.19.80.92.01.10.01.00.00.92.00.04.2a.02.84.00.07.19.80.92.01.10.01.00.00.92.00.05.00.18.00.0b.73.64.71.2c.6f.76.6e.2e.73.64.71.00.02.00.06.10.66.6a.14.82.74,pause),resubmit(,31)
 event=DELETED reason=delete table=25 cookie=0xbbf520c9 reg0=0x2a028400,reg1=0x7198122,reg2=0x12666aff,reg3=0xfe12060e,reg15=0x3,metadata=0x1 actions=mod_dl_dst:10:66:6a:12:06:0e,resubmit(,26)
 event=DELETED reason=delete table=31 cookie=0xf6c2dae3 udp,reg0=0x8/0x8,reg14=0x68,metadata=0x3,dl_src=10:66:6a:12:06:0e,tp_src=68,tp_dst=67 actions=move:NXM_OF_ETH_SRC[]->NXM_OF_ETH_DST[],mod_dl_src:10:66:6a:14:82:74,mod_nw_src:172.16.122.1,mod_tp_src:67,mod_tp_dst:68,move:NXM_NX_REG14[]->NXM_NX_REG15[],load:0x1->NXM_NX_REG10[0],resubmit(,37)
 event=DELETED reason=delete table=25 cookie=0x50574be3 reg0=0xac107a11,reg15=0x3,metadata=0x1 actions=mod_dl_dst:10:66:6a:12:06:0e,resubmit(,26)
 event=DELETED reason=delete table=30 cookie=0x32a07c95 conj_id=2764032782,udp,reg14=0x68,metadata=0x3,dl_src=10:66:6a:12:06:0e,tp_src=68,tp_dst=67 actions=controller(userdata=00.00.00.02.00.00.00.00.00.01.de.10.00.00.00.63.ac.10.7a.11.06.08.0a.64.5c.04.0a.64.5c.05.0f.07.6f.76.6e.2e.73.64.71.77.0b.03.73.64.71.00.03.6f.76.6e.c0.00.33.04.00.00.0e.10.1a.02.05.a2.01.04.ff.ff.ff.00.03.04.ac.10.7a.01.36.04.ac.10.7a.01,pause),resubmit(,31)
 event=DELETED reason=delete table=30 cookie=0 udp,reg14=0x68,metadata=0x3,dl_src=10:66:6a:12:06:0e,nw_src=0.0.0.0,tp_src=68,tp_dst=67 actions=conjunction(2764032782,2/2)
 event=DELETED reason=delete table=30 cookie=0 udp,reg14=0x68,metadata=0x3,dl_src=10:66:6a:12:06:0e,nw_dst=255.255.255.255,tp_src=68,tp_dst=67 actions=conjunction(2764032782,1/2)
 event=DELETED reason=delete table=30 cookie=0 udp,reg14=0x68,metadata=0x3,dl_src=10:66:6a:12:06:0e,nw_src=172.16.122.17,tp_src=68,tp_dst=67 actions=conjunction(2764032782,2/2)
 event=DELETED reason=delete table=30 cookie=0 udp,reg14=0x68,metadata=0x3,dl_src=10:66:6a:12:06:0e,nw_dst=172.16.122.1,tp_src=68,tp_dst=67 actions=conjunction(2764032782,1/2)
....

This should fix the problem: Leave ports shared with another instance record alone by presztak · Pull Request #4368 · lxc/incus · GitHub

Hello,

I tried it, and it works!

Thank you !