Antoni Segura Puimedon has uploaded a new change for review.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Make sr-iov hook use interface instead of hostdev
According to libvirt documentation, for the sr-iov virtual function "nics" to have permanent and unique MAC addresses, the passthrough should be done using <interface type='hostdev'> instead of <hostdev>.
This change modifies the hook to take advantage of this libvirt definition for stable sr-iovs and allows profiles to be defined for the virtualports when used in conjunction with 802.11Qgh.
NOTE: There are stil a couple of TODO in this patch that I have to solve before the patch can be considered for merging.
Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Signed-off-by: Antoni S. Puimedon asegurap@redhat.com --- M vdsm_hooks/sriov/README M vdsm_hooks/sriov/after_vm_destroy.py M vdsm_hooks/sriov/before_vm_start.py 3 files changed, 47 insertions(+), 31 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/13541/1
diff --git a/vdsm_hooks/sriov/README b/vdsm_hooks/sriov/README index 713aa6a..d8af84b 100644 --- a/vdsm_hooks/sriov/README +++ b/vdsm_hooks/sriov/README @@ -6,7 +6,7 @@ it to the guest xml
syntax: -sr-iov: sriov=eth10,eth11 +sr-iov: sriov=eth10:profileA,eth11:profileB attach 2 sr-iov VF to vm notes at sr-iov/README
diff --git a/vdsm_hooks/sriov/after_vm_destroy.py b/vdsm_hooks/sriov/after_vm_destroy.py index ab81e90..4b66cac 100755 --- a/vdsm_hooks/sriov/after_vm_destroy.py +++ b/vdsm_hooks/sriov/after_vm_destroy.py @@ -36,26 +36,21 @@ if 'sriov' in os.environ: try: lines = '' - nics = os.environ['sriov'] + nicsProfiles = os.environ['sriov'].split(',') path = VDSM_VAR_HOOKS_DIR + '/' + SRIOV_CACHE_FILENAME
+ nics = (nicProfile.split(':')[0] for nicProfile in nicsProfiles) if os.path.exists(path): - f = open(path, 'r') - while 1: - line = f.readline() - if not line: - break - pass # do something - nicAddr = line.split('=') - if nicAddr[0] in nics: - returnDeviceToHost(nicAddr[1], nicAddr[2].strip('\n')) - else: - lines += line - f.close() + with open(path, 'r') as f: + for line in f: + nicAddr = line.split('=') + if nicAddr[0] in nics: + returnDeviceToHost(nicAddr[1], nicAddr[2].strip('\n')) + else: + lines += line
- f = open(path, 'w') - f.writelines(lines) - f.close() + with open(path, 'w') as f: + f.writelines(lines) else: sys.stderr.write('sriov after_vm_destroy: cannot find sriov cache ' 'file %s\n' % path) diff --git a/vdsm_hooks/sriov/before_vm_start.py b/vdsm_hooks/sriov/before_vm_start.py index fd9168f..e7281c4 100755 --- a/vdsm_hooks/sriov/before_vm_start.py +++ b/vdsm_hooks/sriov/before_vm_start.py @@ -60,31 +60,50 @@ sys.stderr.write('sriov: cannot detach device: %s\n' % addr)
-def createSriovElement(domxml, bus, slot, function): +def createSriovElement(domxml, bus, slot, function, profile): ''' create host device element for libvirt domain xml:
- <hostdev mode='subsystem' type='pci'> + <interface type='hostdev'> <source> - <address bus='0x1a' slot='0x10' function='0x06'/> + <address type='pci' domain='0x0' bus='0x1a' slot='0x10' slot='0x07' + function='0x06'/> </source> - </hostdev> + # TODO: Check if we omit the mac address to have libvirt auto-generate + # it + <mac address='4:54:00:6d:90:02'/> + # TODO: This should be set only if connected to this kind of switch. + <virtualport type='802.10bh'> + <parameters proileid='foobar'/> + </virtualport> + </interface> '''
- hostdev = domxml.createElement('hostdev') - hostdev.setAttribute('mode', 'subsystem') - hostdev.setAttribute('type', 'pci') + interface = domxml.createElement('interface') + interface.setAttribute('type', 'hostdev') + interface.setAttribute('managed', 'yes')
source = domxml.createElement('source') - hostdev.appendChild(source) + interface.appendChild(source)
address = domxml.createElement('address') + address.setAttribute('type', 'pci') + # The domain is not currently used by Qemu + #address.setAttribute('domain', '0') address.setAttribute('bus', bus) address.setAttribute('slot', slot) address.setAttribute('function', function)
source.appendChild(address) - return hostdev + + virtualport = domxml.createElement('virtualport') + virtualport.setAttribute('type', '802.1Qbh') + interface.appendChild(virtualport) + + parameters = domxml.createElement('parameters') + parameters.setAttribute('profileid', profile) + virtualport.appendChild(parameters) + return interface
def deviceExists(devName): @@ -133,12 +152,13 @@
if 'sriov' in os.environ: try: - nics = os.environ['sriov'] + nicsProfiles = os.environ['sriov'].split(',')
domxml = hooking.read_domxml() devices = domxml.getElementsByTagName('devices')[0]
- for nic in nics.split(','): + for nicProfile in nicsProfiles: + nic, profile = nicProfile.split(':') if deviceExists(nic): sys.stderr.write('sriov: adding VF %s\n' % nic)
@@ -147,11 +167,12 @@ detachDevice(addr) bus, slot, function = getDeviceDetails(addr)
- hostdev = createSriovElement(domxml, bus, slot, function) + interface = createSriovElement(domxml, bus, slot, function, + profile)
sys.stderr.write('sriov: VF %s xml: %s\n' % - (nic, hostdev.toxml())) - devices.appendChild(hostdev) + (nic, interface.toxml())) + devices.appendChild(interface) chown(devpath) writeSriovCache(nic, addr, devpath) else:
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1786/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1837/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1786/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1837/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(4 inline comments)
.................................................... File vdsm_hooks/sriov/before_vm_start.py Line 68: <source> Line 69: <address type='pci' domain='0x0' bus='0x1a' slot='0x10' slot='0x07' Line 70: function='0x06'/> Line 71: </source> Line 72: # TODO: Check if we omit the mac address to have libvirt auto-generate libvirt can generate the mac address automatically Line 73: # it Line 74: <mac address='4:54:00:6d:90:02'/> Line 75: # TODO: This should be set only if connected to this kind of switch. Line 76: <virtualport type='802.10bh'>
Line 71: </source> Line 72: # TODO: Check if we omit the mac address to have libvirt auto-generate Line 73: # it Line 74: <mac address='4:54:00:6d:90:02'/> Line 75: # TODO: This should be set only if connected to this kind of switch. It's up to the type of external switch and optional. So we should make it optional and allow different parameters for different switches. You could separate this part into another patch. Line 76: <virtualport type='802.10bh'> Line 77: <parameters proileid='foobar'/> Line 78: </virtualport> Line 79: </interface>
Line 80: ''' Line 81: Line 82: interface = domxml.createElement('interface') Line 83: interface.setAttribute('type', 'hostdev') Line 84: interface.setAttribute('managed', 'yes') Since we set the attribute 'managed' to 'yes', libvirt should be responsible to detach device bedore vm start and re-attach device to host after vm destroy. So, probably you need still cleanup the code of 'detachDevice' and 'returnDeviceToHost'
http://www.libvirt.org/formatdomain.html#elementsNICSHostdev Line 85: Line 86: source = domxml.createElement('source') Line 87: interface.appendChild(source) Line 88:
Line 88: Line 89: address = domxml.createElement('address') Line 90: address.setAttribute('type', 'pci') Line 91: # The domain is not currently used by Qemu Line 92: #address.setAttribute('domain', '0') it's no harm to set it Line 93: address.setAttribute('bus', bus) Line 94: address.setAttribute('slot', slot) Line 95: address.setAttribute('function', function) Line 96:
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Shu Ming has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(2 inline comments)
.................................................... File vdsm_hooks/sriov/after_vm_destroy.py Line 44: with open(path, 'r') as f: Line 45: for line in f: Line 46: nicAddr = line.split('=') Line 47: if nicAddr[0] in nics: Line 48: returnDeviceToHost(nicAddr[1], nicAddr[2].strip('\n')) Is it necessary to remove the SriovElement from the VM's xml file that is created in before_vm_start.py? Line 49: else: Line 50: lines += line Line 51: Line 52: with open(path, 'w') as f:
.................................................... File vdsm_hooks/sriov/before_vm_start.py Line 71: </source> Line 72: # TODO: Check if we omit the mac address to have libvirt auto-generate Line 73: # it Line 74: <mac address='4:54:00:6d:90:02'/> Line 75: # TODO: This should be set only if connected to this kind of switch. We may create different virtualport type based on the shell variable value in os..environ for different switches the virtual port is attched to like qbh, opensiwtch &etc. Line 76: <virtualport type='802.10bh'> Line 77: <parameters proileid='foobar'/> Line 78: </virtualport> Line 79: </interface>
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 1: (7 inline comments)
Thanks Mark and Shu for the reviews!
.................................................... File vdsm_hooks/sriov/after_vm_destroy.py Line 10: SYS_NIC_PATH = '/sys/class/net/%s' Line 11: VDSM_VAR_HOOKS_DIR = '/var/run/vdsm/hooks' Line 12: SRIOV_CACHE_FILENAME = 'sriov.cache' Line 13: Line 14: This has to go since I create it as managed. Line 15: def returnDeviceToHost(addr, devpath): Line 16: # attach device back to host Line 17: connection = libvirtconnection.get(None) Line 18: nodeDevice = connection.nodeDeviceLookupByName(addr)
Line 44: with open(path, 'r') as f: Line 45: for line in f: Line 46: nicAddr = line.split('=') Line 47: if nicAddr[0] in nics: Line 48: returnDeviceToHost(nicAddr[1], nicAddr[2].strip('\n')) I'll have to check that. I basically kept this parts' functionality, but I'm open to changes. Line 49: else: Line 50: lines += line Line 51: Line 52: with open(path, 'w') as f:
.................................................... File vdsm_hooks/sriov/before_vm_start.py Line 68: <source> Line 69: <address type='pci' domain='0x0' bus='0x1a' slot='0x10' slot='0x07' Line 70: function='0x06'/> Line 71: </source> Line 72: # TODO: Check if we omit the mac address to have libvirt auto-generate Done Line 73: # it Line 74: <mac address='4:54:00:6d:90:02'/> Line 75: # TODO: This should be set only if connected to this kind of switch. Line 76: <virtualport type='802.10bh'>
Line 71: </source> Line 72: # TODO: Check if we omit the mac address to have libvirt auto-generate Line 73: # it Line 74: <mac address='4:54:00:6d:90:02'/> Line 75: # TODO: This should be set only if connected to this kind of switch. Indeed, better in a follow-up patch. Line 76: <virtualport type='802.10bh'> Line 77: <parameters proileid='foobar'/> Line 78: </virtualport> Line 79: </interface>
Line 71: </source> Line 72: # TODO: Check if we omit the mac address to have libvirt auto-generate Line 73: # it Line 74: <mac address='4:54:00:6d:90:02'/> Line 75: # TODO: This should be set only if connected to this kind of switch. Agreed. Will do so in a follow-up patch. Thanks for the idea ;-) Line 76: <virtualport type='802.10bh'> Line 77: <parameters proileid='foobar'/> Line 78: </virtualport> Line 79: </interface>
Line 80: ''' Line 81: Line 82: interface = domxml.createElement('interface') Line 83: interface.setAttribute('type', 'hostdev') Line 84: interface.setAttribute('managed', 'yes') RIght, I should drop detach and returnDeviceToHost :-) Thanks for pointing it out. I love to get rid of code :-) Line 85: Line 86: source = domxml.createElement('source') Line 87: interface.appendChild(source) Line 88:
Line 88: Line 89: address = domxml.createElement('address') Line 90: address.setAttribute('type', 'pci') Line 91: # The domain is not currently used by Qemu Line 92: #address.setAttribute('domain', '0') Done Line 93: address.setAttribute('bus', bus) Line 94: address.setAttribute('slot', slot) Line 95: address.setAttribute('function', function) Line 96:
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1797/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1848/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1797/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1848/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 2: (1 inline comment)
.................................................... File vdsm_hooks/sriov/after_vm_destroy.py Line 34: with open(path, 'r') as f: Line 35: for line in f: Line 36: nicAddr = line.split('=') Line 37: if nicAddr[0] in nics: Line 38: restoreDevicePermissions(nicAddr[1], @Shu Ming: I checked and libvirtvm.py when doing hooks.after_vm_destroy ignores the returned xml. So no need to remove the SriovElement from the xml that is passed to the hook in this particular case (No other hook does it on destroy for the same reason, I presume). Line 39: nicAddr[2].strip('\n')) Line 40: else: Line 41: lines += line Line 42:
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 2: (1 inline comment)
.................................................... File vdsm_hooks/sriov/before_vm_start.py Line 141: Line 142: sys.stderr.write('sriov: VF %s xml: %s\n' % Line 143: (nic, interface.toxml())) Line 144: devices.appendChild(interface) Line 145: chown(devpath) Curious about if 'chown' is still necessary. I don't have sriov enabled hw at hand. It's also great if you could give me some docs stating it's necessary. I didn't find that requirement after a research. Thanks! Line 146: writeSriovCache(nic, addr, devpath) Line 147: else: Line 148: sys.stderr.write('sriov: cannot find nic "%s", aborting\n' % Line 149: nic)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1804/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1855/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 2: (1 inline comment)
.................................................... File vdsm_hooks/sriov/before_vm_start.py Line 141: Line 142: sys.stderr.write('sriov: VF %s xml: %s\n' % Line 143: (nic, interface.toxml())) Line 144: devices.appendChild(interface) Line 145: chown(devpath) That's funny. I was just checking on my machine with virsh calls to attach and I didn't need the chown, so I put a comment here to check if it is really necessary. I uploaded a version that drops the sriovcache and drops the chown. Line 146: writeSriovCache(nic, addr, devpath) Line 147: else: Line 148: sys.stderr.write('sriov: cannot find nic "%s", aborting\n' % Line 149: nic)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 4:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1805/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 4:
See the NOTE on the commit message.
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 4:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1856/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 4: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1805/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1856/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 5:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1857/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 5:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1806/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 5:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1806/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1857/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 6:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1858/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 6:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1807/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 6:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1807/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1858/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 6: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 6: I would prefer that you didn't submit this
(1 inline comment)
Doesn't work due to the reasons stated in the comment (found out through the verification explained in the NOTE).
.................................................... File vdsm_hooks/sriov/before_vm_start.py Line 109: interface = createSriovElement(domxml, bus, slot, function) Line 110: Line 111: sys.stderr.write('sriov: VF %s xml: %s\n' % Line 112: (nic, interface.toxml())) Line 113: devices.appendChild(interface) After installing vdsm, libvirt loses the ability to attach devices/images that belong to root. For this reason, I will have to reinstate the chowning of the resources and reset that I removed in the latest modification. However, I do not deem it necessary to chown them back to root when destroying, so I will keep after_vm_destroy out of the patch. Line 114: else: Line 115: sys.stderr.write('sriov: cannot find nic "%s", aborting\n' % Line 116: nic) Line 117: sys.exit(2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 7:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1812/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 7:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1863/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 7:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1812/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1863/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 7: Verified
Verified assigning two vf to a guest with vdsClient create and the guest sees the nics and they function normally.
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 7: I would prefer that you didn't submit this
Toni, I am a bit worried about "After installing vdsm, libvirt loses the ability to attach devices/images that belong to root."
Could you give some information about the failure? Which of vdsm's configurations cause this? Is it "dynamic_ownership 0"?
writeSriovCache() is clearly a messy racy function, I'd like to kill it. But could you split this into a follow up patch? I mean, let's have a patch to make this work for a single VM started, and another patch making the whole thing reentrant.
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 7:
After talking more with libvirt devs and giving them access to my machine, it turns out that the cause is the dynamic_ownership, which they suggest to set to 1.
Will split this this patch into two. The first keeping the cache. The second either making the caching system safe for concurrency. In the future, though, libvirt guys are working on restoring the ownership when dynamic_ownership is set, which would allow us to drop the cache code and set the dynamic ownership with all safety.
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 8:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1831/ (2/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 8:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1882/ (1/2)
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 8:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1831/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1882/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 8: Verified
sriov cache is race prone, but that is a problem that will be fixed on the following patch of the series.
Verified creating a VM with: vdsClient -s 0 create /dev/null vmId=`uuidgen` memSize=512 imageFile=/var/lib/libvirt/images/rhel64-updateDevice.img display=vnc custom_sriov=p1p1_1,p1p1_2
Both nics show up in the VM and are freed with permissions returned to root:root after destroy.
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Patch Set 8: Looks good to me, approved
IIRC dynamic_ownership needs to be turned off, in order to avoid libvirt's taking storage files from vdsm ownership into root's.
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Make sr-iov hook use interface instead of hostdev ......................................................................
Make sr-iov hook use interface instead of hostdev
According to libvirt documentation, for the sr-iov virtual function "nics" to have permanent and unique MAC addresses, the passthrough should be done using <interface type='hostdev'> instead of <hostdev>.
This change modifies the hook to take advantage of this libvirt definition for stable sr-iovs.
The chown step is necessary to attach the virtual function to the VM Otherwise, it is not possible to detach the virtual function from the OS and attach it to the VM due to dynamic_ownership=0 (which is necessary for network storage because dynamic ownership, ATM, always sets ownership to root:root on VM destroy/hotunplug).
Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Signed-off-by: Antoni S. Puimedon asegurap@redhat.com --- M vdsm_hooks/sriov/after_vm_destroy.py M vdsm_hooks/sriov/before_vm_start.py 2 files changed, 34 insertions(+), 59 deletions(-)
Approvals: Antoni Segura Puimedon: Verified Dan Kenigsberg: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/13541 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: Ib2f88a8400fe4d230c0877428afef62df8e397db Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Dan Yasny dyasny@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org