Antoni Segura Puimedon has uploaded a new change for review.
Change subject: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
[WIP] netwiring: [3/3] Add API definitions.
Third and final of the Network Wiring feature patches. It adds the implementation for using the new updateVmDevice feature.
TODO: Add vdsm startup creation of the DUMMY_BRIDGE. TODO: Add the port mirroring processing.
Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Signed-off-by: Antoni S. Puimedon asegurap@redhat.com --- M vdsm/API.py M vdsm/define.py M vdsm/libvirtvm.py 3 files changed, 103 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/9562/1
diff --git a/vdsm/API.py b/vdsm/API.py index e87b7e5..966a921 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -353,6 +353,17 @@ response['status']['message'] = 'Hibernation process starting' return response
+ def updateVmDevice(self, params): + if 'type' not in params: + self.log.error('Missing a required parameters: type') + return {'status': {'code': errCode['MissParam']['status']['code'], + 'message': 'Missing one of required ' + 'parameters: type'}} + v = self._cif.vmContainer.get(self._UUID) + if not v: + return errCode['noVM'] + return v.updateDevice(params) + def hotplugNic(self, params): try: utils.validateMinimalKeySet(params, ('vmId', 'nic')) diff --git a/vdsm/define.py b/vdsm/define.py index 11a6ef6..e2ba196 100644 --- a/vdsm/define.py +++ b/vdsm/define.py @@ -124,6 +124,9 @@ 'replicaErr': {'status': {'code': 55, 'message': 'Drive replication error'}}, + 'updateDevice': {'status': + {'code': 56, + 'message': 'Failed to update device'}}, 'recovery': {'status': {'code': 99, 'message': @@ -137,3 +140,5 @@ #exitCodes ERROR = 1 NORMAL = 0 + +DUMMY_BRIDGE = 'none-br' diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py index 3439dc3..3fdde03 100644 --- a/vdsm/libvirtvm.py +++ b/vdsm/libvirtvm.py @@ -25,7 +25,7 @@ import threading
import vm -from vdsm.define import ERROR, doneCode, errCode +from vdsm.define import ERROR, doneCode, errCode, DUMMY_BRIDGE from vdsm import utils from vdsm import constants import guestIF @@ -1517,6 +1517,92 @@
return {'status': doneCode, 'vmList': self.status()}
+ def _updateNetDevice(self, params): + try: + utils.validateMinimalKeySet(params, ('alias', 'linkState')) + except ValueError: + self.log.error('Missing at least one of the required parameters: ' + 'alias, linkState') + return {'status': {'code': errCode['MissParam']['status']['code'], + 'message': 'Missing at least one of required ' + 'parameters: alias, linkState'}} + + dev = None + for dev in self.conf['devices']: + if (dev['type'] == vm.NIC_DEVICES and + dev['alias'] == params['alias']): + break + + if dev is None: + self.log.error('Network device %s cannot be updated. It does not' + 'exist', params['alias']) + return {'status': + {'code': errCode['updateDevice']['status']['code'], + 'message': 'Missing net device'}} + + network = dev['network'] + + # Prepare the updateDevice xml + netelem = xml.dom.minidom.Element(params['type']) + netelem.setAttribute('type', 'bridge') + mac = xml.dom.minidom.Element('mac') + mac.setAttribute('address', dev['macAddr']) + netelem.appendChild(mac) + model = xml.dom.minidom.Element('model') + model.setAttribute('type', dev['nicModel']) + netelem.appendChild(model) + + if 'network' not in params: + # If no network is specified we take the vnic to the dummy bridge + # and set the link 'down' always. + source = xml.dom.minidom.Element('source') + source.setAttribute('bridge', DUMMY_BRIDGE) + netelem.appendChild(source) + link = xml.dom.minidom.Element('link') + link.setAttribute('state', 'down') + netelem.appendChild(link) + else: + # There is a network defined. Thus, we either just modify the link + # status or move between network backends. + source = xml.dom.minidom.Element('source') + source.setAttribute('bridge', network) + netelem.appendChild(source) + link = xml.dom.minidom.Element('link') + if network != params['network']: + # If a different network is specified. First we take the link + # down and then update the device to connect to the new bridge. + link.setAttribute('state', 'down') + netelem.appendChild(link) + try: + self._dom.updateDeviceFlags( + netelem.toxml(), + libvirt.libvirt.VIR_DOMAIN_AFFECT_LIVE) + except: + self.log.debug("updateNetDevice failed", exc_info=True) + return {'status': + {'code': errCode['updateDevice']['status']['code'], + 'message': 'Failed to take the link down.'}} + + link.setAttribute('state', params['linkState']) + source.setAttribute('bridge', params['network']) + + try: + self._dom.updateDeviceFlags( + netelem.toxml(), + libvirt.libvirt.VIR_DOMAIN_AFFECT_LIVE) + except: + self.log.debug("updateNetDeviceFlags failed", exc_info=True) + return {'status': + {'code': errCode['updateDevice']['status']['code'], + 'message': 'Failed to take the link %s' % \ + link.getAttribute('state')}} + + def updateDevice(self, params): + if params['type'] == vm.NIC_DEVICES: + return self._updateNetDevice(params) + else: + return errCode['noimpl'] + def hotunplugNic(self, params): if self.isMigrating(): return errCode['migInProgress']
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd 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: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/234/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd 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: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/200/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd 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: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
Patch Set 1: I would prefer that you didn't submit this
Build Unstable
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/200/ : UNSTABLE
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/234/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/235/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/201/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
Patch Set 2: I would prefer that you didn't submit this
Build Unstable
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/201/ : UNSTABLE
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/235/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
ShaoHe Feng has posted comments on this change.
Change subject: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
Patch Set 2: I would prefer that you didn't submit this
(3 inline comments)
.................................................... File vdsm/libvirtvm.py Line 1526: return {'status': {'code': errCode['MissParam']['status']['code'], Line 1527: 'message': 'Missing at least one of required ' Line 1528: 'parameters: alias, linkState'}} Line 1529: Line 1530: dev = None netDev = None? Line 1531: for dev in self.conf['devices']: Line 1532: if (dev['type'] == vm.NIC_DEVICES and Line 1533: dev['alias'] == params['alias']): Line 1534: break
Line 1529: Line 1530: dev = None Line 1531: for dev in self.conf['devices']: Line 1532: if (dev['type'] == vm.NIC_DEVICES and Line 1533: dev['alias'] == params['alias']): netDev = dev? Line 1534: break Line 1535: Line 1536: if dev is None: Line 1537: self.log.error('Network device %s cannot be updated. It does not'
Line 1532: if (dev['type'] == vm.NIC_DEVICES and Line 1533: dev['alias'] == params['alias']): Line 1534: break Line 1535: Line 1536: if dev is None: if not netDev: ?
if self.conf['devices'] in not None dev should be the last devices in self.conf['devices']. so dev in no longer None. Line 1537: self.log.error('Network device %s cannot be updated. It does not' Line 1538: 'exist', params['alias']) Line 1539: return {'status': Line 1540: {'code': errCode['updateDevice']['status']['code'],
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
ShaoHe Feng has posted comments on this change.
Change subject: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
Patch Set 2: (2 inline comments)
.................................................... File vdsm/libvirtvm.py Line 1526: return {'status': {'code': errCode['MissParam']['status']['code'], Line 1527: 'message': 'Missing at least one of required ' Line 1528: 'parameters: alias, linkState'}} Line 1529: Line 1530: dev = None rename dev as netDev? or it will conflict with the dev that you iterate self.conf['devices'] Line 1531: for dev in self.conf['devices']: Line 1532: if (dev['type'] == vm.NIC_DEVICES and Line 1533: dev['alias'] == params['alias']): Line 1534: break
Line 1532: if (dev['type'] == vm.NIC_DEVICES and Line 1533: dev['alias'] == params['alias']): Line 1534: break Line 1535: Line 1536: if dev is None: sorry: s/in not None/is not None Line 1537: self.log.error('Network device %s cannot be updated. It does not' Line 1538: 'exist', params['alias']) Line 1539: return {'status': Line 1540: {'code': errCode['updateDevice']['status']['code'],
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
Patch Set 2: I would prefer that you didn't submit this
(4 inline comments)
Antoni, hope you don't mind we review your WIP patch.
.................................................... File vdsm/libvirtvm.py Line 1526: return {'status': {'code': errCode['MissParam']['status']['code'], Line 1527: 'message': 'Missing at least one of required ' Line 1528: 'parameters: alias, linkState'}} Line 1529: Line 1530: dev = None Yes, correct. We need two vars here, otherwise the one in for loop will override the global one. Line 1531: for dev in self.conf['devices']: Line 1532: if (dev['type'] == vm.NIC_DEVICES and Line 1533: dev['alias'] == params['alias']): Line 1534: break
Line 1549: mac.setAttribute('address', dev['macAddr']) Line 1550: netelem.appendChild(mac) Line 1551: model = xml.dom.minidom.Element('model') Line 1552: model.setAttribute('type', dev['nicModel']) Line 1553: netelem.appendChild(model) is it possible to resue NetworkInterfaceDevice.getXML? Line 1554: Line 1555: if 'network' not in params: Line 1556: # If no network is specified we take the vnic to the dummy bridge Line 1557: # and set the link 'down' always.
Line 1551: model = xml.dom.minidom.Element('model') Line 1552: model.setAttribute('type', dev['nicModel']) Line 1553: netelem.appendChild(model) Line 1554: Line 1555: if 'network' not in params: why not take 'network' as a required parameter? Line 1556: # If no network is specified we take the vnic to the dummy bridge Line 1557: # and set the link 'down' always. Line 1558: source = xml.dom.minidom.Element('source') Line 1559: source.setAttribute('bridge', DUMMY_BRIDGE)
Line 1569: netelem.appendChild(source) Line 1570: link = xml.dom.minidom.Element('link') Line 1571: if network != params['network']: Line 1572: # If a different network is specified. First we take the link Line 1573: # down and then update the device to connect to the new bridge. is it really necessary to change the link down before changing bridge? even if there's network traffic happens on this vNic, the guest network stack handle the failure. Setting the link down get any benefit ? Line 1574: link.setAttribute('state', 'down') Line 1575: netelem.appendChild(link) Line 1576: try: Line 1577: self._dom.updateDeviceFlags(
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
Patch Set 2: (3 inline comments)
.................................................... File vdsm/libvirtvm.py Line 1526: return {'status': {'code': errCode['MissParam']['status']['code'], Line 1527: 'message': 'Missing at least one of required ' Line 1528: 'parameters: alias, linkState'}} Line 1529: Line 1530: dev = None Very right. I shouldn't submit patches so late in the night :P Line 1531: for dev in self.conf['devices']: Line 1532: if (dev['type'] == vm.NIC_DEVICES and Line 1533: dev['alias'] == params['alias']): Line 1534: break
Line 1549: mac.setAttribute('address', dev['macAddr']) Line 1550: netelem.appendChild(mac) Line 1551: model = xml.dom.minidom.Element('model') Line 1552: model.setAttribute('type', dev['nicModel']) Line 1553: netelem.appendChild(model) I'll take a look at that. Line 1554: Line 1555: if 'network' not in params: Line 1556: # If no network is specified we take the vnic to the dummy bridge Line 1557: # and set the link 'down' always.
Line 1551: model = xml.dom.minidom.Element('model') Line 1552: model.setAttribute('type', dev['nicModel']) Line 1553: netelem.appendChild(model) Line 1554: Line 1555: if 'network' not in params: Because we allow network not to be specified for when the caller wants both to unplug and to remove the assignation of said vnic to any network. Line 1556: # If no network is specified we take the vnic to the dummy bridge Line 1557: # and set the link 'down' always. Line 1558: source = xml.dom.minidom.Element('source') Line 1559: source.setAttribute('bridge', DUMMY_BRIDGE)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
Patch Set 4:
Thanks Feng and Mark for the reviews. They are really appreciated and I encourage you to bear with me through the iterations till patch completion.
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
ShaoHe Feng has posted comments on this change.
Change subject: [WIP] netwiring: [3/3] Add API definitions. ......................................................................
Patch Set 5: I would prefer that you didn't submit this
(3 inline comments)
.................................................... File vdsm/libvirtvm.py Line 1540: return {'status': Line 1541: {'code': errCode['updateDevice']['status']['code'], Line 1542: 'message': 'Missing net device'}} Line 1543: Line 1544: network = dev['network'] netDev? Line 1545: Line 1546: # Prepare the updateDevice xml Line 1547: netelem = xml.dom.minidom.Element(params['type']) Line 1548: netelem.setAttribute('type', 'bridge')
Line 1546: # Prepare the updateDevice xml Line 1547: netelem = xml.dom.minidom.Element(params['type']) Line 1548: netelem.setAttribute('type', 'bridge') Line 1549: mac = xml.dom.minidom.Element('mac') Line 1550: mac.setAttribute('address', dev['macAddr']) netDev? Line 1551: netelem.appendChild(mac) Line 1552: model = xml.dom.minidom.Element('model') Line 1553: model.setAttribute('type', dev['nicModel']) Line 1554: netelem.appendChild(model)
Line 1549: mac = xml.dom.minidom.Element('mac') Line 1550: mac.setAttribute('address', dev['macAddr']) Line 1551: netelem.appendChild(mac) Line 1552: model = xml.dom.minidom.Element('model') Line 1553: model.setAttribute('type', dev['nicModel']) netDev? Line 1554: netelem.appendChild(model) Line 1555: Line 1556: if 'network' not in params: Line 1557: # If no network is specified we take the vnic to the dummy bridge
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Igor Lvovsky has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 11: I would prefer that you didn't submit this
(8 inline comments)
.................................................... File vdsm/API.py Line 357: if 'deviceType' not in params: Line 358: self.log.error('Missing a required parameters: deviceType') Line 359: return {'status': {'code': errCode['MissParam']['status']['code'], Line 360: 'message': 'Missing one of required ' Line 361: 'parameters: type'}} s/type/deviceType Line 362: v = self._cif.vmContainer.get(self._UUID) Line 363: if not v: Line 364: return errCode['noVM'] Line 365: return v.updateDevice(params)
Line 360: 'message': 'Missing one of required ' Line 361: 'parameters: type'}} Line 362: v = self._cif.vmContainer.get(self._UUID) Line 363: if not v: Line 364: return errCode['noVM'] I prefer try...except as we do in all other calls (look at hotplugNic) Line 365: return v.updateDevice(params) Line 366: Line 367: def hotplugNic(self, params): Line 368: try:
.................................................... File vdsm/libvirtvm.py Line 1521: if 'alias' not in params: Line 1522: self.log.error('Missing the required alias parameters.') Line 1523: return {'status': {'code': errCode['MissParam']['status']['code'], Line 1524: 'message': 'Missing the required alias ' Line 1525: 'parameter'}} why you didn't check this in API.py as you did with deviceType? Line 1526: Line 1527: netDev = None Line 1528: for dev in self.conf['devices']: Line 1529: if dev['type'] == vm.NIC_DEVICES and \
Line 1540: Line 1541: network = netDev['network'] Line 1542: Line 1543: # Prepare the updateDevice xml Line 1544: netelem = xml.dom.minidom.Element(params['type']) should it be params['deviceType']? Line 1545: netelem.setAttribute('type', 'bridge') Line 1546: mac = xml.dom.minidom.Element('mac') Line 1547: mac.setAttribute('address', netDev['macAddr']) Line 1548: netelem.appendChild(mac)
Line 1549: model = xml.dom.minidom.Element('model') Line 1550: model.setAttribute('type', netDev['nicModel']) Line 1551: netelem.appendChild(model) Line 1552: Line 1553: if 'network' not in params: What happen if we got network=None ? Is it legal? Line 1554: # If no network is specified we take the vnic to the dummy bridge Line 1555: # and set the link 'down' always. Line 1556: source = xml.dom.minidom.Element('source') Line 1557: source.setAttribute('bridge', DUMMY_BRIDGE)
Line 1575: self._dom.updateDeviceFlags( Line 1576: netelem.toxml(), Line 1577: libvirt.libvirt.VIR_DOMAIN_AFFECT_LIVE) Line 1578: except: Line 1579: self.log.debug("updateInterfaceDevice failed", Maybe we need more verbose explanation (e.g. same as in exception). In additional consider to add xml itself to the log. The function name anyway will be printed Line 1580: exc_info=True) Line 1581: return {'status': Line 1582: {'code': errCode['updateDevice']['status']['code'], Line 1583: 'message': 'Failed to take the link down.'}}
Line 1593: self._dom.updateDeviceFlags( Line 1594: netelem.toxml(), Line 1595: libvirt.libvirt.VIR_DOMAIN_AFFECT_LIVE) Line 1596: except: Line 1597: self.log.debug("updateInterfaceDeviceFlags failed", exc_info=True) Same as above Line 1598: return {'status': Line 1599: {'code': errCode['updateDevice']['status']['code'], Line 1600: 'message': 'Failed to take the link %s' % Line 1601: link.getAttribute('state')}}
.................................................... File vdsm/vdsmd.init.in Line 505: try: Line 506: conn.networkCreateXML('''<network><name>$DUMMY_BR</name><forward mode='bridge'/><bridge name='$DUMMY_BR'/></network>''') Line 507: except: Line 508: sys.exit(1) Line 509: sys.exit(0) Hate this even more :). Any chance to put it in external script? Line 510: EOF Line 511: ret_val=$? Line 512: if [ $ret_val -ne 0 ] Line 513: then
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 11: (8 inline comments)
.................................................... File vdsm/API.py Line 357: if 'deviceType' not in params: Line 358: self.log.error('Missing a required parameters: deviceType') Line 359: return {'status': {'code': errCode['MissParam']['status']['code'], Line 360: 'message': 'Missing one of required ' Line 361: 'parameters: type'}} Done Line 362: v = self._cif.vmContainer.get(self._UUID) Line 363: if not v: Line 364: return errCode['noVM'] Line 365: return v.updateDevice(params)
Line 360: 'message': 'Missing one of required ' Line 361: 'parameters: type'}} Line 362: v = self._cif.vmContainer.get(self._UUID) Line 363: if not v: Line 364: return errCode['noVM'] Done Line 365: return v.updateDevice(params) Line 366: Line 367: def hotplugNic(self, params): Line 368: try:
.................................................... File vdsm/libvirtvm.py Line 1521: if 'alias' not in params: Line 1522: self.log.error('Missing the required alias parameters.') Line 1523: return {'status': {'code': errCode['MissParam']['status']['code'], Line 1524: 'message': 'Missing the required alias ' Line 1525: 'parameter'}} Because the alias parameter is only part of the required parameters for vmUpdateDevice in case the deviceType is of 'interface' type. Thus, IMHO, I believe this is the most appropriate place for the check. Line 1526: Line 1527: netDev = None Line 1528: for dev in self.conf['devices']: Line 1529: if dev['type'] == vm.NIC_DEVICES and \
Line 1540: Line 1541: network = netDev['network'] Line 1542: Line 1543: # Prepare the updateDevice xml Line 1544: netelem = xml.dom.minidom.Element(params['type']) Done Line 1545: netelem.setAttribute('type', 'bridge') Line 1546: mac = xml.dom.minidom.Element('mac') Line 1547: mac.setAttribute('address', netDev['macAddr']) Line 1548: netelem.appendChild(mac)
Line 1549: model = xml.dom.minidom.Element('model') Line 1550: model.setAttribute('type', netDev['nicModel']) Line 1551: netelem.appendChild(model) Line 1552: Line 1553: if 'network' not in params: I think that by default we serve the api through xmlrpclib with the allow_none flag set to False, which would immediately raise a TypeError as soon as it saw the value. However, since that might change, it is better to be more robust. Good catch! Line 1554: # If no network is specified we take the vnic to the dummy bridge Line 1555: # and set the link 'down' always. Line 1556: source = xml.dom.minidom.Element('source') Line 1557: source.setAttribute('bridge', DUMMY_BRIDGE)
Line 1575: self._dom.updateDeviceFlags( Line 1576: netelem.toxml(), Line 1577: libvirt.libvirt.VIR_DOMAIN_AFFECT_LIVE) Line 1578: except: Line 1579: self.log.debug("updateInterfaceDevice failed", Done Line 1580: exc_info=True) Line 1581: return {'status': Line 1582: {'code': errCode['updateDevice']['status']['code'], Line 1583: 'message': 'Failed to take the link down.'}}
Line 1593: self._dom.updateDeviceFlags( Line 1594: netelem.toxml(), Line 1595: libvirt.libvirt.VIR_DOMAIN_AFFECT_LIVE) Line 1596: except: Line 1597: self.log.debug("updateInterfaceDeviceFlags failed", exc_info=True) Done Line 1598: return {'status': Line 1599: {'code': errCode['updateDevice']['status']['code'], Line 1600: 'message': 'Failed to take the link %s' % Line 1601: link.getAttribute('state')}}
.................................................... File vdsm/vdsmd.init.in Line 505: try: Line 506: conn.networkCreateXML('''<network><name>$DUMMY_BR</name><forward mode='bridge'/><bridge name='$DUMMY_BR'/></network>''') Line 507: except: Line 508: sys.exit(1) Line 509: sys.exit(0) I did put in the commit message that I should do it in a less hacky way. Let's see if at this time of the day I'm able to put it in a better way. I'll check where the separate scripts live ;-) Line 510: EOF Line 511: ret_val=$? Line 512: if [ $ret_val -ne 0 ] Line 513: then
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Igor Lvovsky has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 14: (3 inline comments)
.................................................... File vdsm/libvirtvm.py Line 1522: Line 1523: return {'status': doneCode, 'vmList': self.status()} Line 1524: Line 1525: def _updateInterfaceDevice(self, params): Line 1526: if 'alias' not in params: I saw your answer for this but I still think that this verification should be in API.py same as deviceType. The only way to be here is via vmUpdateDevice in API.py According to your code there is no valid flow to get 'deviceType' in vmUpdateDevice but not to get 'alias'. Line 1527: self.log.error('Missing the required alias parameters.') Line 1528: return {'status': {'code': errCode['MissParam']['status']['code'], Line 1529: 'message': 'Missing the required alias ' Line 1530: 'parameter'}}
Line 1626: {'code': errCode['updateDevice']['status']['code'], Line 1627: 'message': e.message}} Line 1628: Line 1629: # TODO: Update the VM conf and Nic instance. Line 1630: self._getUnderlyingNetworkInterfaceInfo() Probably it's will work but don't forget that this one run over *all* network interfaces. Maybe this is too much? But on other hand better to gather updated info from libvirt instead setting it according to given parameters Line 1631: Line 1632: return {'status': doneCode, 'vmList': self.status()} Line 1633: Line 1634: def updateDevice(self, params):
.................................................... File vdsm/vdsmd.init.in Line 486: then Line 487: log_failure_msg "$prog: Failed to create ephemeral dummy bridge." Line 488: return $ret_val Line 489: fi Line 490: I am not sure, but... Should we clean up the bridge at vdsm stop? Line 491: @VDSMDIR@/vdsm-restore-net-config Line 492: /usr/bin/vdsm-tool load-needed-modules Line 493: mk_data_center Line 494: mk_core_path
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 14: (3 inline comments)
.................................................... File vdsm/libvirtvm.py Line 1563: netParam = params.get('network') Line 1564: if netParam is None: Line 1565: # If no network is specified we take the vnic to the dummy bridge Line 1566: # and set the link 'down' always. Line 1567: source.setAttribute('bridge', DUMMY_BRIDGE) still don't understand why we need move it to dummy bridge. does it have difference compared with just set the link down? Line 1568: link.setAttribute('state', 'down') Line 1569: else: Line 1570: # There is a network defined. Thus, we either just modify the link Line 1571: # status and/or move between network backends.
Line 1570: # There is a network defined. Thus, we either just modify the link Line 1571: # status and/or move between network backends. Line 1572: if network != netParam: Line 1573: # If a different network is specified. First we take the link Line 1574: # down and then update the device to connect to the new bridge. you didn't answer my previous question on it. I suppose we don't need to change the link status, and just use one libvirt call to move it to the network. The guest network stack could handle the missed packets. I don't see the benefit of 'setting link down' at first. Line 1575: link.setAttribute('state', 'down') Line 1576: try: Line 1577: self._dom.updateDeviceFlags( Line 1578: vnicXML.toxml(encoding='utf-8'),
Line 1614: for mirrNet in params.get('portMirroring', []): Line 1615: supervdsm.getProxy().setPortMirroring(mirrNet, netDev.name) Line 1616: mirroredNetworks.append(mirrNet) Line 1617: except Exception, e: Line 1618: # In case we fail, we rollback the whole updateIntefaceDevice. How about using a dict to represent the result for different actions, then we don't need rollback all the change. Line 1619: for mirrNet in mirroredNetworks: Line 1620: supervdsm.getProxy().unsetPortMirroring(mirrNet, Line 1621: netDev['name']) Line 1622: # TODO: Rollback link and network.
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 14: (6 inline comments)
.................................................... File vdsm/libvirtvm.py Line 1522: Line 1523: return {'status': doneCode, 'vmList': self.status()} Line 1524: Line 1525: def _updateInterfaceDevice(self, params): Line 1526: if 'alias' not in params: You've convinced me :-) Line 1527: self.log.error('Missing the required alias parameters.') Line 1528: return {'status': {'code': errCode['MissParam']['status']['code'], Line 1529: 'message': 'Missing the required alias ' Line 1530: 'parameter'}}
Line 1563: netParam = params.get('network') Line 1564: if netParam is None: Line 1565: # If no network is specified we take the vnic to the dummy bridge Line 1566: # and set the link 'down' always. Line 1567: source.setAttribute('bridge', DUMMY_BRIDGE) Because not specifying a network is a way of dissociating the vnic from that network, thus, putting it somewhere else -> dummy bridge. Line 1568: link.setAttribute('state', 'down') Line 1569: else: Line 1570: # There is a network defined. Thus, we either just modify the link Line 1571: # status and/or move between network backends.
Line 1570: # There is a network defined. Thus, we either just modify the link Line 1571: # status and/or move between network backends. Line 1572: if network != netParam: Line 1573: # If a different network is specified. First we take the link Line 1574: # down and then update the device to connect to the new bridge. There where some reasons for it stated in the vdsm mailing thread about this feature. I will revisit them and try to lay them out here again. Line 1575: link.setAttribute('state', 'down') Line 1576: try: Line 1577: self._dom.updateDeviceFlags( Line 1578: vnicXML.toxml(encoding='utf-8'),
Line 1614: for mirrNet in params.get('portMirroring', []): Line 1615: supervdsm.getProxy().setPortMirroring(mirrNet, netDev.name) Line 1616: mirroredNetworks.append(mirrNet) Line 1617: except Exception, e: Line 1618: # In case we fail, we rollback the whole updateIntefaceDevice. Well, in fact I want to do both, rollback if not succeeding and in success case return the VM xml. Line 1619: for mirrNet in mirroredNetworks: Line 1620: supervdsm.getProxy().unsetPortMirroring(mirrNet, Line 1621: netDev['name']) Line 1622: # TODO: Rollback link and network.
Line 1626: {'code': errCode['updateDevice']['status']['code'], Line 1627: 'message': e.message}} Line 1628: Line 1629: # TODO: Update the VM conf and Nic instance. Line 1630: self._getUnderlyingNetworkInterfaceInfo() I will study this to more detail to see if we can just rely on the return values of the libvirt operations to infer the real libvirt status, update the conf and the network objects and return the vm definition. Line 1631: Line 1632: return {'status': doneCode, 'vmList': self.status()} Line 1633: Line 1634: def updateDevice(self, params):
.................................................... File vdsm/vdsmd.init.in Line 486: then Line 487: log_failure_msg "$prog: Failed to create ephemeral dummy bridge." Line 488: return $ret_val Line 489: fi Line 490: I'm not sure either. I don't see a big need to do it now, that vdsm networks are not following the dynamic configuration paradigm. Line 491: @VDSMDIR@/vdsm-restore-net-config Line 492: /usr/bin/vdsm-tool load-needed-modules Line 493: mk_data_center Line 494: mk_core_path
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 14: (1 inline comment)
.................................................... File vdsm/libvirtvm.py Line 1563: netParam = params.get('network') Line 1564: if netParam is None: Line 1565: # If no network is specified we take the vnic to the dummy bridge Line 1566: # and set the link 'down' always. Line 1567: source.setAttribute('bridge', DUMMY_BRIDGE) How does client outside vdsm know if it's still connected to the bridge? Setting the link down is not enough? qemu will drop the packet from tap interface silently if the link is down. Line 1568: link.setAttribute('state', 'down') Line 1569: else: Line 1570: # There is a network defined. Thus, we either just modify the link Line 1571: # status and/or move between network backends.
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 16: I would prefer that you didn't submit this
(12 inline comments)
.................................................... File vdsm/API.py Line 360: return {'status': {'code': errCode['MissParam']['status']['code'], Line 361: 'message': 'Missing one of required ' Line 362: 'parameters: deviceType'}} Line 363: try: Line 364: curVm = self._cif.vmContainer[self._UUID] all over this file we use "v" for this vm. let's conform. Line 365: except KeyError: Line 366: self.log.warning("vm %s doesn't exist", self._UUID) Line 367: return errCode['noVM'] Line 368:
.................................................... File vdsm/define.py Line 140: #exitCodes Line 141: ERROR = 1 Line 142: NORMAL = 0 Line 143: Line 144: DUMMY_BRIDGE = 'vdsm-none-br' please use a bridge name that is less likely to be requested by a user. If we're working with brctl directly, we could choose something like "::::::::" (we prohibit the colon as a bridge name so as not to confuse ifcfg-*).
This fake network is an implementation detail, and it should be filterered out from the netinfo reports.
.................................................... File vdsm/dummybr.py Line 22: import logging Line 23: import os Line 24: import sys Line 25: Line 26: from vdsm import libvirtconnection, define, utils I hate the "define" module. It's way-too-general name is reason enough not to use it for the implementation detail that is the name of our ephemeral bridge.
I'd prefer to put the constant in this module, or maybe netinfo. Line 27: Line 28: Line 29: def createEphemeralBridge(bridgeName): Line 30: rc, out, err = utils.execCmd(['brctl', 'addbr', bridgeName])
Line 26: from vdsm import libvirtconnection, define, utils Line 27: Line 28: Line 29: def createEphemeralBridge(bridgeName): Line 30: rc, out, err = utils.execCmd(['brctl', 'addbr', bridgeName]) we have constant.BRCTL for 'brctl' Line 31: if rc != 0: Line 32: logging.error('Failed to create ephemeral dummy bridge') Line 33: sys.exit(rc) Line 34:
Line 28: Line 29: def createEphemeralBridge(bridgeName): Line 30: rc, out, err = utils.execCmd(['brctl', 'addbr', bridgeName]) Line 31: if rc != 0: Line 32: logging.error('Failed to create ephemeral dummy bridge') logging stdout/err may be informational here. Line 33: sys.exit(rc) Line 34: Line 35: if __name__ == '__main__': Line 36: if not os.path.exists('/sys/class/net/%s' % define.DUMMY_BRIDGE):
Line 29: def createEphemeralBridge(bridgeName): Line 30: rc, out, err = utils.execCmd(['brctl', 'addbr', bridgeName]) Line 31: if rc != 0: Line 32: logging.error('Failed to create ephemeral dummy bridge') Line 33: sys.exit(rc) it's better practice not to call sys.exit() outside main(). You never know if you'd want to call the function in another use case. Line 34: Line 35: if __name__ == '__main__': Line 36: if not os.path.exists('/sys/class/net/%s' % define.DUMMY_BRIDGE): Line 37: createEphemeralBridge(define.DUMMY_BRIDGE)
Line 32: logging.error('Failed to create ephemeral dummy bridge') Line 33: sys.exit(rc) Line 34: Line 35: if __name__ == '__main__': Line 36: if not os.path.exists('/sys/class/net/%s' % define.DUMMY_BRIDGE): please remind me - why are we not calling a nic-less configNetwork.addNetwork() instead of re-implementing it here? Line 37: createEphemeralBridge(define.DUMMY_BRIDGE) Line 38: Line 39: conn = libvirtconnection.get() Line 40: if define.DUMMY_BRIDGE not in conn.listNetworks():
.................................................... File vdsm/libvirtvm.py Line 1524: Line 1525: def updateInterfaceDevice(self, params): Line 1526: # Find the interface to update. Line 1527: netDev = None Line 1528: for dev in self._devices[vm.NIC_DEVICES][:]: how about adding a _lookupDeviceByAlias() function? Line 1529: if dev.alias == params['alias']: Line 1530: netDev = dev Line 1531: break Line 1532: if netDev is None:
Line 1537: 'message': 'Missing net device'}} Line 1538: Line 1539: # Find the interface conf to potentially use in rollbacks. Line 1540: netConf = None Line 1541: for dev in self.conf['devices'][:]: I suppose that it was much nicer if each device held a reference to its conf dictionary. then this repeated search could have been avoided. Line 1542: if dev['type'] == vm.NIC_DEVICES and \ Line 1543: dev['alias'] == params['alias']: Line 1544: netConf = dev Line 1545: break
Line 1593: source.setAttribute('bridge', netParam) Line 1594: link.setAttribute('state', linkValue) Line 1595: Line 1596: try: Line 1597: self._dom.updateDeviceFlags(vnicXML.toxml(encoding='utf-8'), do we have a shred of an evidence that performing this in two operations has any benefit to a guest? Can a Linux guest even differentiate between the suggested code, and one that uses a single updateDeviceFlags()?
would you be kind to have one patch where this is done in a single command, and add the complexity later? Line 1598: libvirt.libvirt.VIR_DOMAIN_AFFECT_LIVE) Line 1599: except: Line 1600: self.log.debug('Request to set the the vnic %s failed. ' Line 1601: 'Made with the following xml: %s',
Line 1626: # In case we fail, we rollback the Network mirroring. Line 1627: for mirrNet in mirroredNetworks: Line 1628: supervdsm.getProxy().unsetPortMirroring(mirrNet, Line 1629: netDev['name']) Line 1630: # And also rollback link and network. no rollback of the conf here?
I think that we urgently need to split this function to:
findNicDev() findNicConf() setlink() try: setNet() try: setPortMirror except: rollbackPortMirror raise except: rollbackNet raise except: rollbackLink raise
context managers could have been even cooler
with linkchange: with netchange: with mirrorchange: updateconf return success
but that would be an overkill, I suppose. However, I'm sure that the code would look much better if you raise exceptions instead of returning API error code. The translation to error code would be easier if done once, in a final
except MyUpdateDeviceException: return {'status'....} Line 1631: source.setAttribute('bridge', netConfBackup['network']) Line 1632: link.setAttribute( Line 1633: 'state', 'up' if netConfBackup['linkActive'] else 'down') Line 1634: self._dom.updateDeviceFlags(
.................................................... File vdsm/vdsmd.init.in Line 479: log_failure_msg "$prog: Failed to define network filters on libvirt" Line 480: return $ret_val Line 481: fi Line 482: Line 483: python @VDSMDIR@/dummybr.pyc > /dev/null 2>&1 I have no idea why we've disposed of the possibly-useful stderr in nwfilter.pyc. I think it would be nice to have an informational error report. Line 484: ret_val=$? Line 485: if [ $ret_val -ne 0 ] Line 486: then Line 487: log_failure_msg "$prog: Failed to create ephemeral dummy bridge."
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 16 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 16: (12 inline comments)
.................................................... File vdsm/API.py Line 360: return {'status': {'code': errCode['MissParam']['status']['code'], Line 361: 'message': 'Missing one of required ' Line 362: 'parameters: deviceType'}} Line 363: try: Line 364: curVm = self._cif.vmContainer[self._UUID] Done Line 365: except KeyError: Line 366: self.log.warning("vm %s doesn't exist", self._UUID) Line 367: return errCode['noVM'] Line 368:
.................................................... File vdsm/define.py Line 140: #exitCodes Line 141: ERROR = 1 Line 142: NORMAL = 0 Line 143: Line 144: DUMMY_BRIDGE = 'vdsm-none-br' Done
.................................................... File vdsm/dummybr.py Line 22: import logging Line 23: import os Line 24: import sys Line 25: Line 26: from vdsm import libvirtconnection, define, utils Done Line 27: Line 28: Line 29: def createEphemeralBridge(bridgeName): Line 30: rc, out, err = utils.execCmd(['brctl', 'addbr', bridgeName])
Line 26: from vdsm import libvirtconnection, define, utils Line 27: Line 28: Line 29: def createEphemeralBridge(bridgeName): Line 30: rc, out, err = utils.execCmd(['brctl', 'addbr', bridgeName]) Done Line 31: if rc != 0: Line 32: logging.error('Failed to create ephemeral dummy bridge') Line 33: sys.exit(rc) Line 34:
Line 28: Line 29: def createEphemeralBridge(bridgeName): Line 30: rc, out, err = utils.execCmd(['brctl', 'addbr', bridgeName]) Line 31: if rc != 0: Line 32: logging.error('Failed to create ephemeral dummy bridge') Done Line 33: sys.exit(rc) Line 34: Line 35: if __name__ == '__main__': Line 36: if not os.path.exists('/sys/class/net/%s' % define.DUMMY_BRIDGE):
Line 29: def createEphemeralBridge(bridgeName): Line 30: rc, out, err = utils.execCmd(['brctl', 'addbr', bridgeName]) Line 31: if rc != 0: Line 32: logging.error('Failed to create ephemeral dummy bridge') Line 33: sys.exit(rc) Done Line 34: Line 35: if __name__ == '__main__': Line 36: if not os.path.exists('/sys/class/net/%s' % define.DUMMY_BRIDGE): Line 37: createEphemeralBridge(define.DUMMY_BRIDGE)
Line 32: logging.error('Failed to create ephemeral dummy bridge') Line 33: sys.exit(rc) Line 34: Line 35: if __name__ == '__main__': Line 36: if not os.path.exists('/sys/class/net/%s' % define.DUMMY_BRIDGE): Because I didn't want the bridge to be backed by any configuration file, especially now that we set the ;;;;;;; name. Line 37: createEphemeralBridge(define.DUMMY_BRIDGE) Line 38: Line 39: conn = libvirtconnection.get() Line 40: if define.DUMMY_BRIDGE not in conn.listNetworks():
.................................................... File vdsm/libvirtvm.py Line 1524: Line 1525: def updateInterfaceDevice(self, params): Line 1526: # Find the interface to update. Line 1527: netDev = None Line 1528: for dev in self._devices[vm.NIC_DEVICES][:]: Done Line 1529: if dev.alias == params['alias']: Line 1530: netDev = dev Line 1531: break Line 1532: if netDev is None:
Line 1537: 'message': 'Missing net device'}} Line 1538: Line 1539: # Find the interface conf to potentially use in rollbacks. Line 1540: netConf = None Line 1541: for dev in self.conf['devices'][:]: For the future. Line 1542: if dev['type'] == vm.NIC_DEVICES and \ Line 1543: dev['alias'] == params['alias']: Line 1544: netConf = dev Line 1545: break
Line 1593: source.setAttribute('bridge', netParam) Line 1594: link.setAttribute('state', linkValue) Line 1595: Line 1596: try: Line 1597: self._dom.updateDeviceFlags(vnicXML.toxml(encoding='utf-8'), Done Line 1598: libvirt.libvirt.VIR_DOMAIN_AFFECT_LIVE) Line 1599: except: Line 1600: self.log.debug('Request to set the the vnic %s failed. ' Line 1601: 'Made with the following xml: %s',
Line 1626: # In case we fail, we rollback the Network mirroring. Line 1627: for mirrNet in mirroredNetworks: Line 1628: supervdsm.getProxy().unsetPortMirroring(mirrNet, Line 1629: netDev['name']) Line 1630: # And also rollback link and network. Done Line 1631: source.setAttribute('bridge', netConfBackup['network']) Line 1632: link.setAttribute( Line 1633: 'state', 'up' if netConfBackup['linkActive'] else 'down') Line 1634: self._dom.updateDeviceFlags(
.................................................... File vdsm/vdsmd.init.in Line 479: log_failure_msg "$prog: Failed to define network filters on libvirt" Line 480: return $ret_val Line 481: fi Line 482: Line 483: python @VDSMDIR@/dummybr.pyc > /dev/null 2>&1 Done Line 484: ret_val=$? Line 485: if [ $ret_val -ne 0 ] Line 486: then Line 487: log_failure_msg "$prog: Failed to create ephemeral dummy bridge."
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 16 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 17:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/252/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 17:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/218/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 17: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/218/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/252/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 18:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/224/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 18 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 18:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/258/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 18 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 18: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/224/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/258/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 18 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 19:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/228/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 19 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 19:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/262/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 19 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 19:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/228/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/262/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 19 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 20:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/263/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 20 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 20:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/229/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 20 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 20: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/229/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/263/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 20 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 21:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/264/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 21 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 21:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/230/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 21 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 21: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/230/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/264/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 21 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 22:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/231/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 22 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 22:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/265/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 22 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 22: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/231/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/265/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 22 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 22: I would prefer that you didn't submit this
(7 inline comments)
I like this version - and understand it - much much better!
.................................................... File vdsm/dummybr.py Line 24: Line 25: from vdsm import libvirtconnection, utils, constants Line 26: Line 27: Line 28: DUMMY_BRIDGE = ';;;;;;;;' I'm pretty sure I gave the colon ":" as an example. the semicolon is not in ILLEGAL_BRIDGE_CHARS.
how about
DUMMY_BRIDGE = ':dummybridge:'
so it's clearer for the casuasal brctl shower? Line 29: Line 30: Line 31: def createEphemeralBridge(bridgeName): Line 32: rc, out, err = utils.execCmd([constants.EXT_BRCTL, 'addbr', bridgeName])
Line 36: Line 37: Line 38: def addBridgeToLibvirt(bridgeName): Line 39: conn = libvirtconnection.get() Line 40: if bridgeName not in conn.listNetworks(): wouldn't it be nicer to "ask for forgiveness"?
do you intentionally not follow the LIBVIRT_NET_PREFIX convention? It think that it would be clearer to show that vdsm owns this dummy network. Line 41: conn.networkCreateXML( Line 42: '''<network><name>%s</name><forward mode='bridge'/><bridge ''' Line 43: '''name='%s'/></network>''' % (bridgeName, bridgeName)) Line 44:
.................................................... File vdsm/libvirtvm.py Line 54: DRIVE_NOT_FOUND = "Drive Not Found" Line 55: BASE_NOT_FOUND = "Base Not Found" Line 56: Line 57: Line 58: class setLinkAndNetworkError(Exception): classes should begin with a Capital letter. Line 59: pass Line 60: Line 61: Line 62: class updatePortMirroringError(Exception):
Line 1590: except Exception as e: Line 1591: # Rollback link and network. Line 1592: self._dom.updateDeviceFlags(vnicXML.toxml(encoding='utf-8'), Line 1593: libvirt.VIR_DOMAIN_AFFECT_LIVE) Line 1594: if isinstance(e, updatePortMirroringError): this is not vey pretty, as it assumes a very specific order of usage (update mirror within linkAndNetwork).
how about raising SetLinkAndNetworkError in a try-block BEFORE the yield of line 1589? Line 1595: raise Line 1596: else: Line 1597: self.log.debug('Request to update the the vnic %s failed. ' Line 1598: 'Made with the following xml: %s',
Line 1593: libvirt.VIR_DOMAIN_AFFECT_LIVE) Line 1594: if isinstance(e, updatePortMirroringError): Line 1595: raise Line 1596: else: Line 1597: self.log.debug('Request to update the the vnic %s failed. ' I prefer shorter English in log files. Remember that the function name is already logged. Line 1598: 'Made with the following xml: %s', Line 1599: dev.alias, Line 1600: vnicXML.toprettyxml(encoding='utf-8'), Line 1601: exc_info=True)
Line 1643: def updateDevice(self, params): Line 1644: if params.get('deviceType') == vm.NIC_DEVICES: Line 1645: return self._updateInterfaceDevice(params) Line 1646: else: Line 1647: return errCode['noimpl'] I suppose that the very similar condition in API.py is a bit redundant if you have this here? Line 1648: Line 1649: def hotunplugNic(self, params): Line 1650: if self.isMigrating(): Line 1651: return errCode['migInProgress']
.................................................... File vdsm/netinfo.py Line 76: return [b.split('/')[-2] for b in glob.glob('/sys/class/net/*/bridge') Line 77: if b.split('/')[-2] != DUMMY_BRIDGE] Line 78: Line 79: Line 80: def networks(): I think we should do the same filtering for networks - we do not want to report the dummy network. Line 81: """ Line 82: Get dict of networks from libvirt Line 83: Line 84: :returns: dict of networkname={properties}
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 22 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 23:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/267/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 23 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 23:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/233/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 23 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 22: (6 inline comments)
.................................................... File vdsm/dummybr.py Line 24: Line 25: from vdsm import libvirtconnection, utils, constants Line 26: Line 27: Line 28: DUMMY_BRIDGE = ';;;;;;;;' I guess I need to change my font :-) I will change it to that. Line 29: Line 30: Line 31: def createEphemeralBridge(bridgeName): Line 32: rc, out, err = utils.execCmd([constants.EXT_BRCTL, 'addbr', bridgeName])
Line 36: Line 37: Line 38: def addBridgeToLibvirt(bridgeName): Line 39: conn = libvirtconnection.get() Line 40: if bridgeName not in conn.listNetworks(): I will change it to ask for forgiveness and catch the libvirtError.
Yes, the lack of prefix was intentional, as a way of saying "this is not really one of the networks that we consider fair game". I will change it to have the prefix for ownership, though. Line 41: conn.networkCreateXML( Line 42: '''<network><name>%s</name><forward mode='bridge'/><bridge ''' Line 43: '''name='%s'/></network>''' % (bridgeName, bridgeName)) Line 44:
.................................................... File vdsm/libvirtvm.py Line 54: DRIVE_NOT_FOUND = "Drive Not Found" Line 55: BASE_NOT_FOUND = "Base Not Found" Line 56: Line 57: Line 58: class setLinkAndNetworkError(Exception): Done Line 59: pass Line 60: Line 61: Line 62: class updatePortMirroringError(Exception):
Line 1590: except Exception as e: Line 1591: # Rollback link and network. Line 1592: self._dom.updateDeviceFlags(vnicXML.toxml(encoding='utf-8'), Line 1593: libvirt.VIR_DOMAIN_AFFECT_LIVE) Line 1594: if isinstance(e, updatePortMirroringError): Yes, I had considered to separate the try blocks. I was kind of doubting if to nest one in another, to reuse the rollback code. Line 1595: raise Line 1596: else: Line 1597: self.log.debug('Request to update the the vnic %s failed. ' Line 1598: 'Made with the following xml: %s',
Line 1593: libvirt.VIR_DOMAIN_AFFECT_LIVE) Line 1594: if isinstance(e, updatePortMirroringError): Line 1595: raise Line 1596: else: Line 1597: self.log.debug('Request to update the the vnic %s failed. ' You're right. In any case I was to improve the logging of this whole thing. Line 1598: 'Made with the following xml: %s', Line 1599: dev.alias, Line 1600: vnicXML.toprettyxml(encoding='utf-8'), Line 1601: exc_info=True)
Line 1643: def updateDevice(self, params): Line 1644: if params.get('deviceType') == vm.NIC_DEVICES: Line 1645: return self._updateInterfaceDevice(params) Line 1646: else: Line 1647: return errCode['noimpl'] Done Line 1648: Line 1649: def hotunplugNic(self, params): Line 1650: if self.isMigrating(): Line 1651: return errCode['migInProgress']
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 22 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 23: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/233/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/267/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 23 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 22: (1 inline comment)
.................................................... File vdsm/netinfo.py Line 76: return [b.split('/')[-2] for b in glob.glob('/sys/class/net/*/bridge') Line 77: if b.split('/')[-2] != DUMMY_BRIDGE] Line 78: Line 79: Line 80: def networks(): It was being filtered by the fact that it didn't start with LIBVIRT_NET_PREFIX Line 81: """ Line 82: Get dict of networks from libvirt Line 83: Line 84: :returns: dict of networkname={properties}
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 22 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 24:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/234/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 24 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 24:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/268/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 24 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 24: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/234/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/268/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 24 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 25:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/238/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 25 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 25:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/272/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 25 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 25: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/238/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/272/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 25 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 26:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/240/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 26 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 26:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/274/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 26 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 26:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/240/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/274/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 26 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 27:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/278/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 27 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 27:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/244/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 27 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 27:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/244/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/278/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 27 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: [WIP] netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 27: (1 inline comment)
.................................................... File vdsm/vdsmd.init.in Line 479: log_failure_msg "$prog: Failed to define network filters on libvirt" Line 480: return $ret_val Line 481: fi Line 482: Line 483: python @VDSMDIR@/dummybr.pyc Now that we do not redirect stdout and stderr, we have a very ugly behavior when the bridge already existed. Since we changed our dummybr.py to ask for forgiveness, when it raises the exception, it also writes to stderr... Line 484: ret_val=$? Line 485: if [ $ret_val -ne 0 ] Line 486: then Line 487: log_failure_msg "$prog: Failed to create ephemeral dummy bridge."
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 27 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 28:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/247/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 28 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 28:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/281/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 28 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 28:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/247/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/281/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 28 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 29:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/282/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 29 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 29:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/248/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 29 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 29:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/248/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/282/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 29 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 29: I would prefer that you didn't submit this
(4 inline comments)
.................................................... File vdsm/dummybr.py Line 42: Line 43: if __name__ == '__main__': Line 44: try: Line 45: if not os.path.exists('/sys/class/net/%s' % DUMMY_BRIDGE): Line 46: createEphemeralBridge(DUMMY_BRIDGE) this does not raise libvirtError so it has no place within the try-block. Line 47: addBridgeToLibvirt(DUMMY_BRIDGE) Line 48: except libvirtError as le: Line 49: if 'already exists' not in le.message: Line 50: sys.stderr.write(le.message)
Line 45: if not os.path.exists('/sys/class/net/%s' % DUMMY_BRIDGE): Line 46: createEphemeralBridge(DUMMY_BRIDGE) Line 47: addBridgeToLibvirt(DUMMY_BRIDGE) Line 48: except libvirtError as le: Line 49: if 'already exists' not in le.message: ahhh! there no specific code for NOENT? text lookup is very fragile - maybe a libvirt rfe is in place. Line 50: sys.stderr.write(le.message) Line 51: sys.exit(1) Line 52: except Exception as e: Line 53: sys.stderr.write(e.message)
.................................................... File vdsm/libvirtvm.py Line 1574: Line 1575: @contextmanager Line 1576: def setLinkAndNetwork(self, dev, conf, linkValue, networkValue): Line 1577: vnicXML = dev.getXML() Line 1578: vnicXMLBackup = dev.getXML() why call dev.getXML() twice? Line 1579: source = vnicXML.getElementsByTagName('source')[0] Line 1580: source.setAttribute('bridge', networkValue) Line 1581: try: Line 1582: link = vnicXML.getElementsByTagName('link')[0]
.................................................... File vdsm/netinfo.py Line 88: """ Line 89: nets = {} Line 90: conn = libvirtconnection.get() Line 91: for name in conn.listNetworks(): Line 92: if name.startswith(LIBVIRT_NET_PREFIX) and name != DUMMY_BRIDGE: bug: you probably want to compare DUMMY_BRIDGE to netname, defined one line below. Line 93: # remove the LIBVIRT_NET_PREFIX from the network name Line 94: netname = name[len(LIBVIRT_NET_PREFIX):] Line 95: nets[netname] = {} Line 96: net = conn.networkLookupByName(name)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 29 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 29: (4 inline comments)
.................................................... File vdsm/dummybr.py Line 42: Line 43: if __name__ == '__main__': Line 44: try: Line 45: if not os.path.exists('/sys/class/net/%s' % DUMMY_BRIDGE): Line 46: createEphemeralBridge(DUMMY_BRIDGE) It is inside the try that is also caught by the except in line 52. I could split it in two try-except blocks, if you wish. Line 47: addBridgeToLibvirt(DUMMY_BRIDGE) Line 48: except libvirtError as le: Line 49: if 'already exists' not in le.message: Line 50: sys.stderr.write(le.message)
Line 45: if not os.path.exists('/sys/class/net/%s' % DUMMY_BRIDGE): Line 46: createEphemeralBridge(DUMMY_BRIDGE) Line 47: addBridgeToLibvirt(DUMMY_BRIDGE) Line 48: except libvirtError as le: Line 49: if 'already exists' not in le.message: Looking into it. Line 50: sys.stderr.write(le.message) Line 51: sys.exit(1) Line 52: except Exception as e: Line 53: sys.stderr.write(e.message)
.................................................... File vdsm/libvirtvm.py Line 1574: Line 1575: @contextmanager Line 1576: def setLinkAndNetwork(self, dev, conf, linkValue, networkValue): Line 1577: vnicXML = dev.getXML() Line 1578: vnicXMLBackup = dev.getXML() This first one I'm modifying the second one is kept as backup for the rollback at line 1601. Alternatively I could make a copy importing copy and doing vnicXMLBackup = copy.deepcopy(vnicXML) Line 1579: source = vnicXML.getElementsByTagName('source')[0] Line 1580: source.setAttribute('bridge', networkValue) Line 1581: try: Line 1582: link = vnicXML.getElementsByTagName('link')[0]
.................................................... File vdsm/netinfo.py Line 88: """ Line 89: nets = {} Line 90: conn = libvirtconnection.get() Line 91: for name in conn.listNetworks(): Line 92: if name.startswith(LIBVIRT_NET_PREFIX) and name != DUMMY_BRIDGE: In fact, since DUMMY_BRIDGE does not start with LIBVIRT_NET_PREFIX, the modification of this line should be dropped as unnecessary. Line 93: # remove the LIBVIRT_NET_PREFIX from the network name Line 94: netname = name[len(LIBVIRT_NET_PREFIX):] Line 95: nets[netname] = {} Line 96: net = conn.networkLookupByName(name)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 29 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 29: (1 inline comment)
.................................................... File vdsm/dummybr.py Line 45: if not os.path.exists('/sys/class/net/%s' % DUMMY_BRIDGE): Line 46: createEphemeralBridge(DUMMY_BRIDGE) Line 47: addBridgeToLibvirt(DUMMY_BRIDGE) Line 48: except libvirtError as le: Line 49: if 'already exists' not in le.message: The information I can get from the exception is (with what corresponds in virterror.h: (9, 19, "operation failed: network 'foo' already exists with uuid 52388a7b-ae30-b940-c307-219dd66af360", 2, 'operation failed: %s', "network 'foo' already exists with uuid 52388a7b-ae30-b940-c307-219dd66af360", None, -1, -1)
That translates to:
VIR_ERR_OPERATION_FAILED = 9 /* a command to the hypervisor failed */ VIR_FROM_NETWORK = 19, /* Error from network config */ VIR_ERR_ERROR = 2 /* An error */
So I think I would prefer to recover the ask for permission implementation. Line 50: sys.stderr.write(le.message) Line 51: sys.exit(1) Line 52: except Exception as e: Line 53: sys.stderr.write(e.message)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 29 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 29: (4 inline comments)
.................................................... File vdsm/dummybr.py Line 42: Line 43: if __name__ == '__main__': Line 44: try: Line 45: if not os.path.exists('/sys/class/net/%s' % DUMMY_BRIDGE): Line 46: createEphemeralBridge(DUMMY_BRIDGE) ah, I've missed the lie 52 "except". oops.
Come to think of it, I do not see a big difference between the two except clauses, and betwen them to the default behavior of the python interpreter of unhandled exception. Please consider dropping the whole try block. Line 47: addBridgeToLibvirt(DUMMY_BRIDGE) Line 48: except libvirtError as le: Line 49: if 'already exists' not in le.message: Line 50: sys.stderr.write(le.message)
Line 45: if not os.path.exists('/sys/class/net/%s' % DUMMY_BRIDGE): Line 46: createEphemeralBridge(DUMMY_BRIDGE) Line 47: addBridgeToLibvirt(DUMMY_BRIDGE) Line 48: except libvirtError as le: Line 49: if 'already exists' not in le.message: I am afraid that you are right about "asking for permission". sorry for pushing you to the wrong track. Line 50: sys.stderr.write(le.message) Line 51: sys.exit(1) Line 52: except Exception as e: Line 53: sys.stderr.write(e.message)
.................................................... File vdsm/libvirtvm.py Line 1574: Line 1575: @contextmanager Line 1576: def setLinkAndNetwork(self, dev, conf, linkValue, networkValue): Line 1577: vnicXML = dev.getXML() Line 1578: vnicXMLBackup = dev.getXML() nah, I think that your original code (and variable naming) is clear enough. I should have noticed that there are mutables myself. Line 1579: source = vnicXML.getElementsByTagName('source')[0] Line 1580: source.setAttribute('bridge', networkValue) Line 1581: try: Line 1582: link = vnicXML.getElementsByTagName('link')[0]
.................................................... File vdsm/netinfo.py Line 88: """ Line 89: nets = {} Line 90: conn = libvirtconnection.get() Line 91: for name in conn.listNetworks(): Line 92: if name.startswith(LIBVIRT_NET_PREFIX) and name != DUMMY_BRIDGE: I do not think I follow - I thought you decided to show ownership on the DUMMY_BRIDGE network by calling int vdsm-;dummybridge; or whatever. Line 93: # remove the LIBVIRT_NET_PREFIX from the network name Line 94: netname = name[len(LIBVIRT_NET_PREFIX):] Line 95: nets[netname] = {} Line 96: net = conn.networkLookupByName(name)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 29 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 30:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/288/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 30 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 30:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/254/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 30 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 30:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/254/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/288/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 30 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 30: I would prefer that you didn't submit this
on IRC Toni mentioned that we should add treatment for network='' to vmCreate verb.
also, please rebase over master branch.
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 30 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 31:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/255/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 31 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 31:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/289/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 31 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 31: Fails; I would prefer that you didn't submit this
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/255/ : UNSTABLE
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/289/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 31 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 32:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/290/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 32 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 32:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/256/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 32 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 32:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/256/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/290/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 32 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 32: Looks good to me, but someone else must approve
(1 inline comment)
.................................................... File vdsm/libvirtvm.py Line 984: for attr, value in kwargs.iteritems(): Line 985: if attr == 'nicModel' and value == 'pv': Line 986: kwargs[attr] = 'virtio' Line 987: elif attr == 'network' and value == '': Line 988: kwargs[attr] = DUMMY_BRIDGE I'd rather have a cleaner
if self.network = '': self.network = DUMMY_BRIDGE Line 989: LibvirtVmDevice.__init__(self, conf, log, **kwargs) Line 990: self.sndbufParam = False Line 991: self._customize() Line 992:
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 32 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Alona Kaplan has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 32: I would prefer that you didn't submit this
annoying text on restart
libvir: Network Driver error : operation failed: network ';vdsmdummy;' already exists with uuid 3267c6e2-03c8-81e7-01e5-336eaa65547c /usr/share/vdsm/dummybr.py:49: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 if 'already exists' not in le.message:
also, need to convert linkstate to boolean in libvirtvm.py line 1023
utils.tobool(self.linkActive)
thanks, danken.
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 32 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 33:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/293/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 33 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 33:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/259/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 33 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 33:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/259/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/293/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 33 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 33: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 33 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Igor Lvovsky has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 33:
What about the annoying message of libvirt error as Dan mentioned in previous patch?
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 33 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 33:
Igor, I believe that it comes from a non-rebased /etc/init.d/vdsmd. But I'd rather have a clean verification by Alona.
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 33 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
ShaoHe Feng has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 33: Looks good to me, but someone else must approve
(3 inline comments)
just a minor suggestion.
.................................................... File vdsm/libvirtvm.py Line 1641: link.setAttribute('state', linkValue) Line 1642: try: Line 1643: try: Line 1644: self._dom.updateDeviceFlags(vnicXML.toxml(encoding='utf-8'), Line 1645: libvirt.VIR_DOMAIN_AFFECT_LIVE) VIR_DOMAIN_AFFECT_LIVE means vm is running or vm exist? sorry, I'm not understand when use VIR_DOMAIN_AFFECT_CURRENT or VIR_DOMAIN_AFFECT_LIVE. Line 1646: except Exception as e: Line 1647: self.log.debug('Request failed: %s', Line 1648: vnicXML.toprettyxml(encoding='utf-8'), Line 1649: exc_info=True)
Line 2984: linkActive = False Line 2985: else: Line 2986: linkActive = True Line 2987: except IndexError: Line 2988: linkActive = True the interface info from libvirt. when IndexError? why linkActive equals True, if the libvirt does not tell "up"? Line 2989: source = x.getElementsByTagName('source') Line 2990: if source: Line 2991: network = source[0].getAttribute('bridge') Line 2992: if not network:
.................................................... File vdsm/netinfo.py Line 174: "!I", Line 175: int( Line 176: ( Line 177: ''.ljust(prefix, '1') + Line 178: ''.ljust(32 - prefix, '0') "1"*prefix + "0"*(32-prefix) is more readable. Line 179: ), Line 180: 2 Line 181: ) Line 182: )
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 33 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 33: (3 inline comments)
.................................................... File vdsm/libvirtvm.py Line 1641: link.setAttribute('state', linkValue) Line 1642: try: Line 1643: try: Line 1644: self._dom.updateDeviceFlags(vnicXML.toxml(encoding='utf-8'), Line 1645: libvirt.VIR_DOMAIN_AFFECT_LIVE) AFFECT_CURRENT works like AFFECT_LIVE when the machine is running and like AFFECT_CONFIG when the machine is just defined. AFFECT_LIVE is only for VMs for which there is a living instance (can be running or paused).
I opted for the latter due to the fact that when we'd want to affect the persistent config that would happen on an engine level. Line 1646: except Exception as e: Line 1647: self.log.debug('Request failed: %s', Line 1648: vnicXML.toprettyxml(encoding='utf-8'), Line 1649: exc_info=True)
Line 2984: linkActive = False Line 2985: else: Line 2986: linkActive = True Line 2987: except IndexError: Line 2988: linkActive = True When libvirt does not report a link tag, libvirt's behavior is to have it as up. Line 2989: source = x.getElementsByTagName('source') Line 2990: if source: Line 2991: network = source[0].getAttribute('bridge') Line 2992: if not network:
.................................................... File vdsm/netinfo.py Line 174: "!I", Line 175: int( Line 176: ( Line 177: ''.ljust(prefix, '1') + Line 178: ''.ljust(32 - prefix, '0') I didn't touch this part. You can submit an patch to improve the code readability of this ;-) Line 179: ), Line 180: 2 Line 181: ) Line 182: )
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 33 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
ShaoHe Feng has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 33: (1 inline comment)
.................................................... File vdsm/netinfo.py Line 174: "!I", Line 175: int( Line 176: ( Line 177: ''.ljust(prefix, '1') + Line 178: ''.ljust(32 - prefix, '0') sorry. I click the "Patch Sets" on the top of page. And choose the "Old Version" to compare with the latest set. It show difference here. It's a mistake. Line 179: ), Line 180: 2 Line 181: ) Line 182: )
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 33 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Alona Kaplan has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 33: Verified
Verified the following- 1. Changing vnic's network ovirtmgmt->none, none->ovirtmgmt. 2. Changing vnic state up->down, down->up 3. Plugging vnic with "none"/"ovirtmgmt" network. 4. Plugging vnic with link state up/down. 5. Creating VM with vnics with "none"/"ovirtmgmt" network and up/down state.
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 33 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 33:
yeah, we know that we have fishy libvirt behavior when it comes to unplugging a device. I feel that it is unrelated to this patch, so I'm taking this one in.
thanks, everybody!
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 33 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 34:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/285/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 34 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 34:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/319/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 34 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
Patch Set 34: Verified; Looks good to me, approved
had to manually rebase due to someone's evil changing of vdsm/define.py
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 34 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: netwiring: [4/4] Add API definitions. ......................................................................
netwiring: [4/4] Add API definitions.
Fourth and final of the Network Wiring feature patches. It adds the implementation for using the new vmUpdateDevice feature and add linkActivate support for createVm and hotplugNic.
Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Signed-off-by: Antoni S. Puimedon asegurap@redhat.com --- M vdsm.spec.in M vdsm/API.py M vdsm/Makefile.am M vdsm/define.py A vdsm/dummybr.py M vdsm/libvirtvm.py M vdsm/netinfo.py M vdsm/vdsmd.init.in 8 files changed, 225 insertions(+), 3 deletions(-)
Approvals: Dan Kenigsberg: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/9562 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd Gerrit-PatchSet: 34 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Alona Kaplan alkaplan@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Livnat Peer lpeer@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org