qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [question]vhost-user: atuo fix network link broken during migration
@ 2020-03-23  8:17 yangke (J)
  2020-03-24  5:49 ` Jason Wang
  0 siblings, 1 reply; 4+ messages in thread
From: yangke (J) @ 2020-03-23  8:17 UTC (permalink / raw)
  To: qemu-devel@nongnu.org
  Cc: jasowang@redhat.com, wangxin (U), quintela@redhat.com

We find an issue when host mce trigger openvswitch(dpdk) restart in source host during guest migration, 
VM is still link down in frontend after migration, it cause the network in VM never be up again.

virtio_net_load_device:
    /* nc.link_down can't be migrated, so infer link_down according
     * to link status bit in n->status */
    link_down = (n->status & VIRTIO_NET_S_LINK_UP) == 0;
    for (i = 0; i < n->max_queues; i++) {
        qemu_get_subqueue(n->nic, i)->link_down = link_down;
    }

guset:                    migrate begin -------> vCPU pause --------> vmsate load ------->migrate finish
                                            ^                  ^                     ^
                                            |                  |                     |
openvswitch in source host:          begin to restart       restarting             started
                                            ^                  ^                     ^
                                            |                  |                     |
nc in frontend in source:               link down           link down             link down
                                            ^                  ^                     ^
                                            |                  |                     |
nc in frontend in destination:          link up             link up               link down
                                            ^                  ^                     ^
                                            |                  |                     |
guset network:                            broken             broken                broken
                                            ^                  ^                     ^
                                            |                  |                     |
nc in backend in source:                link down          link down              link up
                                            ^                  ^                     ^
                                            |                  |                     |
nc in backend in destination:           link up             link up               link up

The link_down of frontend was loaded from n->status, n->status is link down in source, so the link_down of 
frontend is true. The backend in destination host is link up, but the frontend in destination host is 
link down, it cause the network in gust never be up again until an guest cold reboot.

Is there a way to auto fix the link status? or just abort the migration in virtio net device load?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-26  9:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-23  8:17 [question]vhost-user: atuo fix network link broken during migration yangke (J)
2020-03-24  5:49 ` Jason Wang
2020-03-24 11:08   ` 答复: " yangke (J)
2020-03-26  9:45     ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).