summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/COLO-FT.txt72
-rw-r--r--hw/net/virtio-net.c4
-rw-r--r--net/net.c5
-rw-r--r--net/socket.c1
4 files changed, 44 insertions, 38 deletions
diff --git a/docs/COLO-FT.txt b/docs/COLO-FT.txt
index 628293824c..e289be2f41 100644
--- a/docs/COLO-FT.txt
+++ b/docs/COLO-FT.txt
@@ -41,41 +41,43 @@ identical responses to all client requests. Once the differences in the outputs
are detected between the PVM and SVM, COLO withholds transmission of the
outbound packets until it has successfully synchronized the PVM state to the SVM.
- Primary Node Secondary Node
- +------------+ +-----------------------+ +------------------------+ +------------+
- | | | HeartBeat |<----->| HeartBeat | | |
- | Primary VM | +-----------|-----------+ +-----------|------------+ |Secondary VM|
- | | | | | |
- | | +-----------|-----------+ +-----------|------------+ | |
- | | |QEMU +---v----+ | |QEMU +----v---+ | | |
- | | | |Failover| | | |Failover| | | |
- | | | +--------+ | | +--------+ | | |
- | | | +---------------+ | | +---------------+ | | |
- | | | | VM Checkpoint |-------------->| VM Checkpoint | | | |
- | | | +---------------+ | | +---------------+ | | |
- | | | | | | | |
- |Requests<---------------------------^------------------------------------------>Requests|
- |Responses----------------------\ /--|--------------\ /------------------------Responses|
- | | | | | | | | | | | | |
- | | | +-----------+ | | | | | | | +------------+ | | |
- | | | | COLO disk | | | | | | | | | COLO disk | | | |
- | | | | Manager |-|-|--|--------------|--|->| Manager | | | |
- | | | +|----------+ | | | | | | | +-----------|+ | | |
- | | | | | | | | | | | | | | |
- +------------+ +--|------------|-|--|--+ +---|--|--------------|--+ +------------+
- | | | | | | |
- +-------------+ | +----------v-v--|--+ +---|--v-----------+ | +-------------+
- | VM Monitor | | | COLO Proxy | | COLO Proxy | | | VM Monitor |
- | | | |(compare packet) | | (adjust sequence)| | | |
- +-------------+ | +----------|----^--+ +------------------+ | +-------------+
- | | | |
- +------------------|------------|----|--+ +---------------------|------------------+
- | Kernel | | | | | Kernel | |
- +------------------|------------|----|--+ +---------------------|------------------+
- | | | |
- +--------------v+ +--------v----|--+ +------------------+ +v-------------+
- | Storage | |External Network| | External Network | | Storage |
- +---------------+ +----------------+ +------------------+ +--------------+
+ Primary Node Secondary Node
++------------+ +-----------------------+ +------------------------+ +------------+
+| | | HeartBeat +<----->+ HeartBeat | | |
+| Primary VM | +-----------+-----------+ +-----------+------------+ |Secondary VM|
+| | | | | |
+| | +-----------|-----------+ +-----------|------------+ | |
+| | |QEMU +---v----+ | |QEMU +----v---+ | | |
+| | | |Failover| | | |Failover| | | |
+| | | +--------+ | | +--------+ | | |
+| | | +---------------+ | | +---------------+ | | |
+| | | | VM Checkpoint +-------------->+ VM Checkpoint | | | |
+| | | +---------------+ | | +---------------+ | | |
+|Requests<--------------------------\ /-----------------\ /--------------------->Requests|
+| | | ^ ^ | | | | | | |
+|Responses+---------------------\ /-|-|------------\ /-------------------------+Responses|
+| | | | | | | | | | | | | | | |
+| | | +-----------+ | | | | | | | | | | +----------+ | | |
+| | | | COLO disk | | | | | | | | | | | | COLO disk| | | |
+| | | | Manager +---------------------------->| Manager | | | |
+| | | ++----------+ v v | | | | | v v | +---------++ | | |
+| | | |+-----------+-+-+-++| | ++-+--+-+---------+ | | | |
+| | | || COLO Proxy || | | COLO Proxy | | | | |
+| | | || (compare packet || | |(adjust sequence | | | | |
+| | | ||and mirror packet)|| | | and ACK) | | | | |
+| | | |+------------+---+-+| | +-----------------+ | | | |
++------------+ +-----------------------+ +------------------------+ +------------+
++------------+ | | | | +------------+
+| VM Monitor | | | | | | VM Monitor |
++------------+ | | | | +------------+
++---------------------------------------+ +----------------------------------------+
+| Kernel | | | | | Kernel | |
++---------------------------------------+ +----------------------------------------+
+ | | | |
+ +--------------v+ +---------v---+--+ +------------------+ +v-------------+
+ | Storage | |External Network| | External Network | | Storage |
+ +---------------+ +----------------+ +------------------+ +--------------+
+
== Components introduction ==
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 06bfe4bcc9..77a4fae399 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -508,6 +508,10 @@ static void virtio_net_set_queues(VirtIONet *n)
int i;
int r;
+ if (n->nic->peer_deleted) {
+ return;
+ }
+
for (i = 0; i < n->max_queues; i++) {
if (i < n->curr_queues) {
r = peer_attach(n, i);
diff --git a/net/net.c b/net/net.c
index ec984bf782..939fe3193a 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1653,9 +1653,8 @@ int net_fill_rstate(SocketReadState *rs, const uint8_t *buf, int size)
if (rs->index >= rs->packet_len) {
rs->index = 0;
rs->state = 0;
- if (rs->finalize) {
- rs->finalize(rs);
- }
+ assert(rs->finalize);
+ rs->finalize(rs);
}
break;
}
diff --git a/net/socket.c b/net/socket.c
index 982c8debe4..fe3547b018 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -511,6 +511,7 @@ static int net_socket_listen_init(NetClientState *peer,
s->fd = -1;
s->listen_fd = ret;
s->nc.link_down = true;
+ net_socket_rs_init(&s->rs, net_socket_rs_finalize);
qemu_set_fd_handler(s->listen_fd, net_socket_accept, NULL, s);
qapi_free_SocketAddress(saddr);