mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
802.1Qbh: Delay IFF_UP'ing interface until migration final stage
Current code does an IFF_UP on a 8021Qbh interface immediately after a port profile set. This is ok in most cases except when its the migration prepare stage. During migration we want to postpone IFF_UP'ing the interface on the destination host until the source host has disassociated the interface. This patch moves IFF_UP of the interface to the final stage of migration. The motivation for this change is to postpone any addr registrations on the destination host until the source host has done the addr deregistrations. While at it, for symmetry with associate move ifDown of a 8021Qbh interface to before disassociate
This commit is contained in:
parent
9f928af12b
commit
dfd39ccda8
@ -1470,8 +1470,6 @@ doPortProfileOp8021Qbh(const char *ifname,
|
|||||||
NULL,
|
NULL,
|
||||||
vf,
|
vf,
|
||||||
PORT_REQUEST_DISASSOCIATE);
|
PORT_REQUEST_DISASSOCIATE);
|
||||||
if (!rc)
|
|
||||||
ifaceUp(ifname);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISASSOCIATE:
|
case DISASSOCIATE:
|
||||||
@ -1484,7 +1482,6 @@ doPortProfileOp8021Qbh(const char *ifname,
|
|||||||
NULL,
|
NULL,
|
||||||
vf,
|
vf,
|
||||||
PORT_REQUEST_DISASSOCIATE);
|
PORT_REQUEST_DISASSOCIATE);
|
||||||
ifaceDown(ifname);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -1550,10 +1547,11 @@ vpAssociatePortProfileId(const char *macvtap_ifname,
|
|||||||
|
|
||||||
case VIR_VIRTUALPORT_8021QBH:
|
case VIR_VIRTUALPORT_8021QBH:
|
||||||
/* avoid associating twice */
|
/* avoid associating twice */
|
||||||
if (vmOp == VIR_VM_OP_MIGRATE_IN_FINISH)
|
if (vmOp != VIR_VM_OP_MIGRATE_IN_FINISH)
|
||||||
break;
|
|
||||||
rc = doPortProfileOp8021Qbh(linkdev, macvtap_macaddr,
|
rc = doPortProfileOp8021Qbh(linkdev, macvtap_macaddr,
|
||||||
virtPort, vmuuid, ASSOCIATE);
|
virtPort, vmuuid, ASSOCIATE);
|
||||||
|
if (vmOp != VIR_VM_OP_MIGRATE_IN_START && !rc)
|
||||||
|
ifaceUp(linkdev);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1600,6 +1598,7 @@ vpDisassociatePortProfileId(const char *macvtap_ifname,
|
|||||||
/* avoid disassociating twice */
|
/* avoid disassociating twice */
|
||||||
if (vmOp == VIR_VM_OP_MIGRATE_IN_FINISH)
|
if (vmOp == VIR_VM_OP_MIGRATE_IN_FINISH)
|
||||||
break;
|
break;
|
||||||
|
ifaceDown(linkdev);
|
||||||
rc = doPortProfileOp8021Qbh(linkdev, macvtap_macaddr,
|
rc = doPortProfileOp8021Qbh(linkdev, macvtap_macaddr,
|
||||||
virtPort, NULL, DISASSOCIATE);
|
virtPort, NULL, DISASSOCIATE);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user