Mike Kolesnik has submitted this change and it was merged.
Change subject: engine: Remove port if hot plug new ext. nic fails
......................................................................
engine: Remove port if hot plug new ext. nic fails
If a new vNIC is added on an external network, and this vNIC is also hot
plugged as part of this flow then a corresponding entity will be created
on the external provider.
If the aforementioned action fails, the vNIC will be removed from the DB
(by compensation mechanism) but not from the external provider, leaving
garbage forever on it.
In this fix, a new vNIC that fails to hot plug will also be removed from
the external provider.
At this point, there is no need to remove an existing vNIC
should the hot plug fail, as the entity that was created on the external
provider should be removed only when the vNIC is being removed, or the
network is not used by the vNIC anymore.
Change-Id: Iddeac63a47286e9b83ac02fb2e55f7dd56092805
Bug-Url:
https://bugzilla.redhat.com/987814
Signed-off-by: Mike Kolesnik <mkolesni(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/AbstractVmInterfaceCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/ActivateDeactivateVmNicCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/AddVmInterfaceCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/UpdateVmInterfaceCommand.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/ActivateDeactivateVmNicParameters.java
5 files changed, 58 insertions(+), 21 deletions(-)
Approvals:
Mike Kolesnik: Verified
Moti Asayag: Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/25478
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iddeac63a47286e9b83ac02fb2e55f7dd56092805
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Mike Kolesnik <mkolesni(a)redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkolesni(a)redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server