Change in vdsm[master]: net: SRIOV API change.

danken at redhat.com danken at redhat.com
Sun Oct 25 12:49:21 UTC 2015


Dan Kenigsberg has submitted this change and it was merged.

Change subject: net: SRIOV API change.
......................................................................


net: SRIOV API change.

Before this patch, Vdsm API for attaching an SRIOV network device to
a VM was using type=hostdev. This caused SR-IOV network devices to be
reported twice (by _getUnderlyingNetworkInterfaceInfo) back to the
engine, and causing all sorts of UI bugs. Fixing the reporting API
also changes the way VDSM serializes its data to the disk in order
to recover from a restart, and so, during recovery, a 'new' device is
deserialized, which VDSM cannot handle correctly.
As an example, since it is not a host device, but a network device,
it will not get detached from the host when the VM is powered off,
and we get a lost, unusable VF.
In order to fix this properly, the reporing API and the incoming API
must match. To do so, the SRIOV XML creation logic was moved into the
Interface device class, and the VM object was taught how to also
attach/detach SRIOV devices, when needed.

note:
Since the API of attaching a simple network device already supports
passing macAddr parameter, this should be taken out of specParams as it
was when type=hostdev and passed directly. specParams are left to hose
only an optional vlanid parameter.
this requires a matching Engine-side patch
I9d26df0f850d395c6ef359d9e4c404856e2f649d

Change-Id: I689629380996e5615f41e5705fa1f8fb322e0214
Bug-Url: https://bugzilla.redhat.com/1261352
Signed-off-by: Ido Barkan <ibarkan at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/47618
Continuous-Integration: Jenkins CI
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M tests/hostdevTests.py
M vdsm/virt/vm.py
M vdsm/virt/vmdevices/hostdevice.py
M vdsm/virt/vmdevices/network.py
4 files changed, 88 insertions(+), 77 deletions(-)

Approvals:
  Ido Barkan: Verified
  Jenkins CI: Passed CI tests
  Dan Kenigsberg: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/47618
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I689629380996e5615f41e5705fa1f8fb322e0214
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list