Change in vdsm[master]: storage: iscsiadm parses IPv6 iSCSI addresses
Edward Haas has posted comments on this change. Change subject: storage: iscsiadm parses IPv6 iSCSI addresses .. Patch Set 15: (1 comment) https://gerrit.ovirt.org/#/c/65707/14/tests/iscsiTests.py File tests/iscsiTests.py: Line 65: Line 66: def test_discoverydb_discover(self): Line 67: def _fakeRunCmd(*ignored): Line 68: rc = 0 Line 69: out = ['[2001:db8:ca2:2:1::79]:3260,1 iqn.2014-06.com.example:t1', > ykaul suggested a longer list from the rfc. any reason not to have it all? I do not think that IPv6 testing is relevant to iscsi. Testing the correct interpretation of IPv6 will better fit for the IPv6 parser and not for the module that uses it. Line 70:'192.168.122.81:3261,2 iqn.2016-08.com.example:t2'] Line 71: error = '' Line 72: return rc, out, error Line 73: -- To view, visit https://gerrit.ovirt.org/65707 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0e9fa8d8f5ac34753ad6d40625e64dfeee1a3c02 Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dominik Holler Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Dominik Holler Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Yaniv Kaul Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: Extend the API for IPv6 iSCSI targets
Edward Haas has posted comments on this change. Change subject: storage: Extend the API for IPv6 iSCSI targets .. Patch Set 1: (2 comments) Just some naming comments. https://gerrit.ovirt.org/#/c/65794/1/lib/api/vdsm-api.yml File lib/api/vdsm-api.yml: PS1, Line 7719: ipv6Targets The name is not hinting that this is a boolean. Maybe something like: ipv6_enabled / ipv6_support etc.. with or without the 'target' included. It mainly feels strange when used in the code later on. https://gerrit.ovirt.org/#/c/65794/1/lib/vdsm/rpc/bindingxmlrpc.py File lib/vdsm/rpc/bindingxmlrpc.py: PS1, Line 987: con['ipv6Targets'] if 'ipv6Targets' in con else False I think this will fit here: con.get('ipv6Targets', False) -- To view, visit https://gerrit.ovirt.org/65794 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iecb45e326d9c551fb636f309f9e945023143dd9c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dominik Holler Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: Enable IPv6 encapsulation in HSM
Edward Haas has posted comments on this change. Change subject: storage: Enable IPv6 encapsulation in HSM .. Patch Set 10: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65736 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia31b045237dc2defc00181ef8a08cdaf808aa635 Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dominik Holler Gerrit-Reviewer: Dominik Holler Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: prepare iscsi for IPv6 targets
Edward Haas has posted comments on this change. Change subject: storage: prepare iscsi for IPv6 targets .. Patch Set 12: Code-Review+1 I suggest changing the 'getTargetString' func to something nicer, but I leave this to your consideration. -- To view, visit https://gerrit.ovirt.org/65696 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1e1e1ffe1c5d09b7bc3767d84a99711986eaef97 Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dominik Holler Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Dominik Holler Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Yaniv Kaul Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: Enable IPv6 encapsulation in HSM
Edward Haas has posted comments on this change. Change subject: storage: Enable IPv6 encapsulation in HSM .. Patch Set 9: (1 comment) https://gerrit.ovirt.org/#/c/65736/9/vdsm/storage/hsm.py File vdsm/storage/hsm.py: PS9, Line 2940: fullTargets.append(iscsi.getTargetString(target.portal, :target.tpgt, target.iqn)) How about this: fullTargets.append( iscsi.getTargetString(target.portal, target.tpgt, target.iqn)) -- To view, visit https://gerrit.ovirt.org/65736 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia31b045237dc2defc00181ef8a08cdaf808aa635 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dominik Holler Gerrit-Reviewer: Dominik Holler Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: iscsiadm parses IPv6 iSCSI addresses
Edward Haas has posted comments on this change. Change subject: storage: iscsiadm parses IPv6 iSCSI addresses .. Patch Set 11: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65707 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0e9fa8d8f5ac34753ad6d40625e64dfeee1a3c02 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dominik Holler Gerrit-Reviewer: Dominik Holler Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Yaniv Kaul Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: prepare iscsi for IPv6 targets
Edward Haas has posted comments on this change. Change subject: storage: prepare iscsi for IPv6 targets .. Patch Set 11: (2 comments) https://gerrit.ovirt.org/#/c/65696/11/vdsm/storage/iscsi.py File vdsm/storage/iscsi.py: PS11, Line 59: getTargetString > > How about 'portal_join'? The return value is assigned to 'portalStr', that is why I proposed portal. I guess target_join or targetJoin is also fine. I do not know what convention storage is using, or what they prefer to have, leaving that to this code maintainers. PS11, Line 71: str(portal.port)), > Why not? hosttail_join wants the port number as a string, for this reason t I just asked if the whole hosttail_join call can be on the same line. return "%s%s%s" % (hosttail_join(portal.hostname, str(portal.port)), tpgtStr, iqnStr) -- To view, visit https://gerrit.ovirt.org/65696 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1e1e1ffe1c5d09b7bc3767d84a99711986eaef97 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dominik Holler Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Dominik Holler Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Yaniv Kaul Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: prepare iscsi for IPv6 targets
Edward Haas has posted comments on this change. Change subject: storage: prepare iscsi for IPv6 targets .. Patch Set 11: (3 comments) https://gerrit.ovirt.org/#/c/65696/11/vdsm/storage/iscsi.py File vdsm/storage/iscsi.py: PS11, Line 59: getTargetString How about 'portal_join'? On another thought, are you sure this func is needed? Looks like the func is trying to find a common usage for creating a portal, but it is not really common when you need to use so many branches inside. I think you can drop it and use hosttail_join at the callers. PS11, Line 60: if tpgt is None: : tpgtStr = "" : else: : tpgtStr = ",%d" % tpgt Python using the Hungarian notation is a bit too much for me :) anyway, this may look a bit nicer: tag = ",%d" % tpgt if tpgt else "" Same for iqn PS11, Line 71: str(portal.port)), This one does not fit the previous line? -- To view, visit https://gerrit.ovirt.org/65696 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1e1e1ffe1c5d09b7bc3767d84a99711986eaef97 Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dominik Holler Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Dominik Holler Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Yaniv Kaul Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-3.6]: net: edit nic detached from bridge but still attached to a vlan
Edward Haas has posted comments on this change. Change subject: net: edit nic detached from bridge but still attached to a vlan .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65233 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-3.6]: net: edit bond detached from bridge but still attached to a ...
Edward Haas has posted comments on this change. Change subject: net: edit bond detached from bridge but still attached to a vlan .. Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65219 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: storage: prepare iscsi for IPv6 targets
Edward Haas has posted comments on this change. Change subject: storage: prepare iscsi for IPv6 targets .. Patch Set 6: Code-Review-1 (2 comments) https://gerrit.ovirt.org/#/c/65696/6/vdsm/storage/iscsi.py File vdsm/storage/iscsi.py: Line 56: Line 57: log = logging.getLogger('storage.ISCSI') Line 58: Line 59: Line 60: def getTargetString(portal, tpgt=None, iqn=None): > We need to improve the code coverage of tests. Please introduce a unit test I think you can use or extend hosttail_join for this purpose. Line 61: hostname = portal.hostname Line 62: try: Line 63: IPv6.validateAddress(hostname) Line 64: hostname = "[%s]" % hostname Line 59: Line 60: def getTargetString(portal, tpgt=None, iqn=None): Line 61: hostname = portal.hostname Line 62: try: Line 63: IPv6.validateAddress(hostname) Using an exception for branching is not recommended. A soft check for the address can be used for the branching, then there is an option to validate it against IPv4/IPv6, but I do not think that is needed, it can explode on usage. Line 64: hostname = "[%s]" % hostname Line 65: except ConfigNetworkError: Line 66: pass Line 67: -- To view, visit https://gerrit.ovirt.org/65696 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1e1e1ffe1c5d09b7bc3767d84a99711986eaef97 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dominik Holler Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Dominik Holler Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: support nameserver address with %iface tail
Edward Haas has posted comments on this change. Change subject: net: support nameserver address with %iface tail .. Patch Set 3: Nothing changed in the reporting or setup itself, only in the validation. It is not practical to test all possible scenarios in functional tests, that's why we have unit tests. -- To view, visit https://gerrit.ovirt.org/65693 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iea4d2eea2af8004435dae54ad56588739e028ba2 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Dominik Holler Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ondřej Svoboda Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: support nameserver address with %iface tail
Edward Haas has posted comments on this change. Change subject: net: support nameserver address with %iface tail .. Patch Set 3: Verified+1 -- To view, visit https://gerrit.ovirt.org/65693 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iea4d2eea2af8004435dae54ad56588739e028ba2 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Dominik Holler Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ondřej Svoboda Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: support nameserver address with %iface tail
Edward Haas has posted comments on this change. Change subject: net: support nameserver address with %iface tail .. Patch Set 2: (1 comment) https://gerrit.ovirt.org/#/c/65693/1/tests/network/ip_test.py File tests/network/ip_test.py: PS1, Line 87: fe80::1%eth1 > rfc6874 does not limit to local link, but seems to be the most relevant usa Done -- To view, visit https://gerrit.ovirt.org/65693 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iea4d2eea2af8004435dae54ad56588739e028ba2 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Dominik Holler Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ondřej Svoboda Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: support nameserver address with %iface tail
Edward Haas has posted comments on this change. Change subject: net: support nameserver address with %iface tail .. Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/65693/1/tests/network/ip_test.py File tests/network/ip_test.py: PS1, Line 87: 2001::1%eth1 > The zone id is usually used for local link addresses. For this reason would Do you have a reference to the usage of this %tail? I could not seen any specification that limits it to the local scope, on the other hand,I could not find any official text about that '%' in general. -- To view, visit https://gerrit.ovirt.org/65693 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iea4d2eea2af8004435dae54ad56588739e028ba2 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Dominik Holler Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ondřej Svoboda Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: support nameserver address with %iface tail
Edward Haas has uploaded a new change for review. Change subject: net: support nameserver address with %iface tail .. net: support nameserver address with %iface tail The nameserver address may include an % tail, to specify on which iface the address is to be reached. The patch fixes the validation of the nameserver address when this tail exists. In addition, unit tests have been placed to cover the ip validation scenarios. Change-Id: Iea4d2eea2af8004435dae54ad56588739e028ba2 Signed-off-by: Edward Haas --- M lib/vdsm/network/ip/validator.py M tests/network/ip_test.py 2 files changed, 51 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/65693/1 diff --git a/lib/vdsm/network/ip/validator.py b/lib/vdsm/network/ip/validator.py index 9e84bd1..113f2c0 100644 --- a/lib/vdsm/network/ip/validator.py +++ b/lib/vdsm/network/ip/validator.py @@ -48,7 +48,17 @@ def _validate_nameservers_address(nameservers_addr): for addr in nameservers_addr: +addr = _normalize_address(addr) if ':' in addr: IPv6.validateAddress(addr) else: IPv4.validateAddress(addr) + + +def _normalize_address(addr): +""" +The nameserver address may be tailed with the interface from which it +should be reached: '2001::1%eth0' +For the purpose of address validation, such tail is ignored. +""" +return addr.split('%', 1)[0] diff --git a/tests/network/ip_test.py b/tests/network/ip_test.py index 8dc328e..e4c7a7e 100644 --- a/tests/network/ip_test.py +++ b/tests/network/ip_test.py @@ -22,7 +22,9 @@ from testlib import VdsmTestCase +from vdsm.network import errors as ne from vdsm.network.ip import address +from vdsm.network.ip import validator @attr(type='unit') @@ -44,3 +46,42 @@ self.assertEqual(None, ip.address) self.assertEqual(None, ip.gateway) self.assertEqual(None, ip.defaultRoute) + + +@attr(type='unit') +class TestIPValidator(VdsmTestCase): + +def test_ignore_remove_networks(self): +validator.validate({'NET0': {'remove': True, + 'defaultRoute': False, + 'nameservers': ['8.8.8.8']}}) + +def test_nameserver_defined_on_a_non_primary_network_fails(self): +with self.assertRaises(ne.ConfigNetworkError) as cne: +validator.validate({'NET0': {'defaultRoute': False, + 'nameservers': ['8.8.8.8']}}) +self.assertEqual(cne.exception.errCode, ne.ERR_BAD_PARAMS) + +def test_nameserver_faulty_ipv4_address(self): +with self.assertRaises(ne.ConfigNetworkError) as cne: +validator.validate({'NET0': {'defaultRoute': True, + 'nameservers': ['a.8.8.8']}}) +self.assertEqual(cne.exception.errCode, ne.ERR_BAD_ADDR) + +def test_nameserver_faulty_ipv6_address(self): +with self.assertRaises(ne.ConfigNetworkError) as cne: +validator.validate({'NET0': {'defaultRoute': True, + 'nameservers': ['2001:bla::1']}}) +self.assertEqual(cne.exception.errCode, ne.ERR_BAD_ADDR) + +def test_nameserver_valid_ipv4_address(self): +validator.validate({'NET0': {'defaultRoute': True, + 'nameservers': ['8.8.8.8']}}) + +def test_nameserver_valid_ipv6_address(self): +validator.validate({'NET0': {'defaultRoute': True, + 'nameservers': ['2001::1']}}) + +def test_nameserver_address_with_interface_tail(self): +validator.validate({'NET0': {'defaultRoute': True, + 'nameservers': ['2001::1%eth1']}}) -- To view, visit https://gerrit.ovirt.org/65693 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iea4d2eea2af8004435dae54ad56588739e028ba2 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: edit nic detached from bridge but still attached to a vlan
Edward Haas has posted comments on this change. Change subject: net: edit nic detached from bridge but still attached to a vlan .. Patch Set 2: (1 comment) https://gerrit.ovirt.org/#/c/65231/2/tests/network/func_net_basic_test.py File tests/network/func_net_basic_test.py: Line 38: class NetworkBasicTemplate(NetFuncTestCase): Line 39: __test__ = False Line 40: Line 41: @contextmanager Line 42: def _test_detach_used_nic_from_bridge(self): > test always passes (even without the fix) on dummies, it fails when nic is Can you use a veth then? You may need to connect one side to a bride, in case you need it with link-up. Line 43: with dummy_device() as nic: Line 44: NETCREATE = { Line 45: NETWORK1_NAME: {'nic': nic, 'switch': self.switch}, Line 46: NETWORK2_NAME: {'nic': nic, 'vlan': VLAN2, -- To view, visit https://gerrit.ovirt.org/65231 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0e Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: Change classmethod to staticmethod in IPv4 and IPv6 cla...
Edward Haas has posted comments on this change. Change subject: net: Change classmethod to staticmethod in IPv4 and IPv6 classes .. Patch Set 2: It could have been a function if ipv4/6 would have been modules. Static methods preserve the namespace and context of the operation, keeping nicely the encapsulation. -- To view, visit https://gerrit.ovirt.org/65609 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I061a33c6404198c7691d853d683e8535c38442e6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: Change classmethod to staticmethod in IPv4 and IPv6 cla...
Edward Haas has posted comments on this change. Change subject: net: Change classmethod to staticmethod in IPv4 and IPv6 classes .. Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/65609/1//COMMIT_MSG Commit Message: Line 9: Several validation methods have been defined as classmethods where Line 10: staticmethods seems to fit better. Line 11: Line 12: The change has been triggered by the need to validate IP addresses from Line 13: other locations, without instantiating the IPv4/IPv6 classes. > ? Right, I meant to say that it is not needed. The implicit class that is passed in is not used (to create an instance of the class). For me it is confusing, made me look all over on why it is a classmethod and not a simple staticmethod. Unless used as a factory and have others inherit from the class, I see no need to use the classmethod. But I guess you are right, it is not a must for the next patch and it may be just me being confused all the time. Will change the commit text. Line 14: (see the next nameservers validation patch) Line 15: Line 16: Change-Id: I061a33c6404198c7691d853d683e8535c38442e6 -- To view, visit https://gerrit.ovirt.org/65609 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I061a33c6404198c7691d853d683e8535c38442e6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: Change classmethod to staticmethod in IPv4 and IPv6 cla...
Edward Haas has posted comments on this change. Change subject: net: Change classmethod to staticmethod in IPv4 and IPv6 classes .. Patch Set 1: Verified+1 -- To view, visit https://gerrit.ovirt.org/65609 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I061a33c6404198c7691d853d683e8535c38442e6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: Validate nameservers setup
Edward Haas has posted comments on this change. Change subject: net: Validate nameservers setup .. Patch Set 1: Verified+1 -- To view, visit https://gerrit.ovirt.org/65613 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I68b8a834eabd9775178e395f643d555a18eecc81 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: Validate nameservers setup
Edward Haas has uploaded a new change for review. Change subject: net: Validate nameservers setup .. net: Validate nameservers setup Add address validation for the nameservers setup. Change-Id: I68b8a834eabd9775178e395f643d555a18eecc81 Signed-off-by: Edward Haas --- M lib/vdsm/network/ip/validator.py 1 file changed, 24 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/13/65613/1 diff --git a/lib/vdsm/network/ip/validator.py b/lib/vdsm/network/ip/validator.py index 55e5d7e..9e84bd1 100644 --- a/lib/vdsm/network/ip/validator.py +++ b/lib/vdsm/network/ip/validator.py @@ -23,12 +23,32 @@ from vdsm.network import errors as ne +from .address import IPv4, IPv6 + def validate(nets): for net, attrs in six.iteritems(nets): if 'remove' in attrs: continue -elif attrs['nameservers'] and not attrs['defaultRoute']: -raise ne.ConfigNetworkError( -ne.ERR_BAD_PARAMS, -'Name servers may only be defined on the default host network') +_validate_nameservers(net, attrs) + + +def _validate_nameservers(net, attrs): +if attrs['nameservers']: +_validate_nameservers_network(attrs) +_validate_nameservers_address(attrs['nameservers']) + + +def _validate_nameservers_network(attrs): +if not attrs['defaultRoute']: +raise ne.ConfigNetworkError( +ne.ERR_BAD_PARAMS, +'Name servers may only be defined on the default host network') + + +def _validate_nameservers_address(nameservers_addr): +for addr in nameservers_addr: +if ':' in addr: +IPv6.validateAddress(addr) +else: +IPv4.validateAddress(addr) -- To view, visit https://gerrit.ovirt.org/65613 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68b8a834eabd9775178e395f643d555a18eecc81 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: Change classmethod to staticmethod in IPv4 and IPv6 cla...
Edward Haas has uploaded a new change for review. Change subject: net: Change classmethod to staticmethod in IPv4 and IPv6 classes .. net: Change classmethod to staticmethod in IPv4 and IPv6 classes Several validation methods have been defined as classmethods where staticmethods seems to fit better. The change has been triggered by the need to validate IP addresses from other locations, without instantiating the IPv4/IPv6 classes. (see the next nameservers validation patch) Change-Id: I061a33c6404198c7691d853d683e8535c38442e6 Signed-off-by: Edward Haas --- M lib/vdsm/network/ip/address.py 1 file changed, 21 insertions(+), 21 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/09/65609/1 diff --git a/lib/vdsm/network/ip/address.py b/lib/vdsm/network/ip/address.py index adbc108..495867e 100644 --- a/lib/vdsm/network/ip/address.py +++ b/lib/vdsm/network/ip/address.py @@ -41,10 +41,10 @@ raise ConfigNetworkError(ne.ERR_BAD_ADDR, 'Must specify ' 'netmask to configure ip for ' 'network.') -self.validateAddress(address) -self.validateNetmask(netmask) +IPv4.validateAddress(address) +IPv4.validateNetmask(netmask) if gateway: -self.validateGateway(gateway) +IPv4.validateGateway(gateway) else: if netmask or gateway: raise ConfigNetworkError(ne.ERR_BAD_ADDR, 'Specified netmask ' @@ -70,18 +70,18 @@ self.gateway, self.defaultRoute, self.bootproto) -@classmethod -def validateAddress(cls, address): +@staticmethod +def validateAddress(address): try: socket.inet_pton(socket.AF_INET, address) except socket.error: raise ConfigNetworkError(ne.ERR_BAD_ADDR, '%r is not a valid IPv4 ' 'address.' % address) -@classmethod -def validateNetmask(cls, netmask): +@staticmethod +def validateNetmask(netmask): try: -cls.validateAddress(netmask) +IPv4.validateAddress(netmask) except ConfigNetworkError as cne: cne.message = '%r is not a valid IPv4 netmask.' % netmask raise @@ -90,11 +90,11 @@ raise ConfigNetworkError(ne.ERR_BAD_ADDR, '%r is not a valid IPv4 ' 'netmask.' % netmask) -@classmethod -def validateGateway(cls, gateway): +@staticmethod +def validateGateway(gateway): '''Validates the gateway form.''' try: -cls.validateAddress(gateway) +IPv4.validateAddress(gateway) except ConfigNetworkError as cne: cne.message = '%r is not a valid IPv4 gateway' % gateway raise @@ -104,9 +104,9 @@ def __init__(self, address=None, gateway=None, defaultRoute=None, ipv6autoconf=None, dhcpv6=None): if address: -self.validateAddress(address) +IPv6.validateAddress(address) if gateway: -self.validateGateway(gateway) +IPv6.validateGateway(gateway) elif gateway: raise ConfigNetworkError(ne.ERR_BAD_ADDR, 'Specified gateway but ' 'not ip address.') @@ -131,8 +131,8 @@ self.address, self.gateway, self.defaultRoute, self.ipv6autoconf, self.dhcpv6) -@classmethod -def validateAddress(cls, address): +@staticmethod +def validateAddress(address): addr = address.split('/', 1) try: socket.inet_pton(socket.AF_INET6, addr[0]) @@ -140,10 +140,10 @@ raise ConfigNetworkError(ne.ERR_BAD_ADDR, '%r is not a valid IPv6 ' 'address.' % address) if len(addr) == 2: -cls.validatePrefixlen(addr[1]) +IPv6.validatePrefixlen(addr[1]) -@classmethod -def validatePrefixlen(cls, prefixlen): +@staticmethod +def validatePrefixlen(prefixlen): try: prefixlen = int(prefixlen) if prefixlen < 0 or prefixlen > 127: @@ -153,10 +153,10 @@ raise ConfigNetworkError(ne.ERR_BAD_ADDR, '%r is not valid ' 'IPv6 prefixlen.' % prefixlen) -@classmethod -def validateGateway(cls, gateway): +@staticmethod +def validateGateway(gateway): try: -cls.validateAddress(gateway) +IPv6.validateAddress(gateway) except ConfigNetworkError as cne: cne.message = '%r is not a valid IPv6 gateway.' raise -- To view, visit https://gerrit.ovirt.org/65609 To unsubscribe, visit https://gerrit.o
Change in vdsm[master]: static: move vdsm bonding defaults under static
Edward Haas has posted comments on this change. Change subject: static: move vdsm bonding defaults under static .. Patch Set 6: Code-Review+1 We need to run functional tests on this. -- To view, visit https://gerrit.ovirt.org/62537 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9cbd81e59aec49876e15337d7cd617e51316a604 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Polednik Gerrit-Reviewer: Ondřej Svoboda Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Edward Haas has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: Code-Review+1 Ah, I got confused between py3 (only) code and py2 code compatible with py3. -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Run the tests with tox
Edward Haas has posted comments on this change. Change subject: build: Run the tests with tox .. Patch Set 8: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I245a171940a5e869fd719a6410024ee77e8ad86c Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Edward Haas has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: What do you mean it is not relevant? We need it installed once for py2 and once for py3 so tests will pass, no? Does tox take care of that somehow? -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net test: fix ovs_test:test_dry_run
Edward Haas has posted comments on this change. Change subject: net test: fix ovs_test:test_dry_run .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65058 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieb5c70c1498bbe85c5fdd9b0cec63761f2cf7c0d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Improve log level alignment
Edward Haas has posted comments on this change. Change subject: logging: Improve log level alignment .. Patch Set 3: IMO the two char saving is not worth the small hack (https://gerrit.ovirt.org/#/c/64217/3/vdsm/vdsm), it is a bit of overdoing and can confuse a log reader. -- To view, visit https://gerrit.ovirt.org/64217 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia18649258f145f974fd4a8f7a96b5849c4a77938 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Edward Haas has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: -Code-Review Will this work with py3? -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Run the tests with tox
Edward Haas has posted comments on this change. Change subject: build: Run the tests with tox .. Patch Set 8: -Code-Review Will this work with py3? -- To view, visit https://gerrit.ovirt.org/65404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I245a171940a5e869fd719a6410024ee77e8ad86c Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Run the tests with tox
Edward Haas has posted comments on this change. Change subject: build: Run the tests with tox .. Patch Set 8: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I245a171940a5e869fd719a6410024ee77e8ad86c Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: automation: Create coverage report sooner
Edward Haas has posted comments on this change. Change subject: automation: Create coverage report sooner .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65414 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8688383eb5e99fdd0ee48815cc71afd6483819b4 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: tests: Remove cPopenTests.py
Edward Haas has posted comments on this change. Change subject: tests: Remove cPopenTests.py .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65407 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9dc384d6e84ce5f09573be32ea6247c6ef834836 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Replace pep8 and pyflakes with flake8
Edward Haas has posted comments on this change. Change subject: build: Replace pep8 and pyflakes with flake8 .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib42430f045e4475c31cd370b4196214094c29cd1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: pep8: Fix long line in vdsm sos plugin
Edward Haas has posted comments on this change. Change subject: pep8: Fix long line in vdsm sos plugin .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65402 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I81c2f558f7e34505b9873a8b379f88339859f589 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: separate ifcfg and libvirt unit tests
Edward Haas has posted comments on this change. Change subject: net tests: separate ifcfg and libvirt unit tests .. Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65090 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieca34a3f361586346d76ec22b11554c4a7c6e84d Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
Edward Haas has posted comments on this change. Change subject: net tests: minor libvirt_tests style refactoring .. Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: canonicalize IPv4 prefix to netmask
Edward Haas has posted comments on this change. Change subject: net: canonicalize IPv4 prefix to netmask .. Patch Set 2: Code-Review-1 (1 comment) The -1 is mainly for the commit message. The scenario where both prefix and mask are supplied is missing, but it should appear in a unit test not in an expensive func test. We should open a task to cover the canonicalize module with unit tests. https://gerrit.ovirt.org/#/c/64507/2//COMMIT_MSG Commit Message: Line 11: canonicalize.py. Line 12: Line 13: It also adds missing 'prefix' to setupNetworks documentation. Line 14: Line 15: Change-Id: I344eef120b4c19f90d4dd20c7857bb73ab259e9b Missing some lines to indicate it is a backport. Line 16: Bug-Url: https://bugzilla.redhat.com/1374194 -- To view, visit https://gerrit.ovirt.org/64507 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I344eef120b4c19f90d4dd20c7857bb73ab259e9b Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
Edward Haas has posted comments on this change. Change subject: logging: Unify SimpleLogAdapter format .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Improve log level alignment
Edward Haas has posted comments on this change. Change subject: logging: Improve log level alignment .. Patch Set 3: Does it really worth it for just saving 2 spaces? If this is just for the output format, can it be cut there and avoid touching so many places? -- To view, visit https://gerrit.ovirt.org/64217 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia18649258f145f974fd4a8f7a96b5849c4a77938 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Use same log format in the tests
Edward Haas has posted comments on this change. Change subject: logging: Use same log format in the tests .. Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/64216 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8a6c07442d3fb2dd86d08f5c71c3b640bbda43d Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: More standard logging format
Edward Haas has posted comments on this change. Change subject: logging: More standard logging format .. Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/64113 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I640c3c83db3b5818a08b4984d5358b1e27bf0ef3 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Allon Mureinik Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Peter Portante Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: edit nic detached from bridge but still attached to a vlan
Edward Haas has posted comments on this change. Change subject: net: edit nic detached from bridge but still attached to a vlan .. Patch Set 1: Code-Review-1 Can we please add a supporting test for this scenario? When verifying, it should fail without the fix and then pass with this fix. -- To view, visit https://gerrit.ovirt.org/65231 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Disable tests during build
Edward Haas has posted comments on this change. Change subject: build: Disable tests during build .. Patch Set 5: Code-Review+1 (1 comment) https://gerrit.ovirt.org/#/c/63966/4/configure.ac File configure.ac: Line 307 Line 308 Line 309 Line 310 Line 311 > We cannot use this check since nose is not installed at this point, it is i Right, but don't we want to check it in an early stage of the test anyway? I guess it does not matter much, it would just be a nice to have: explicitly warn that nose is missing if a test run is attempted. -- To view, visit https://gerrit.ovirt.org/63966 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9e3589c365166f934f117b53c65cea4b90db3516 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Maor Lipchuk Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: build: Disable tests during build
Edward Haas has posted comments on this change. Change subject: build: Disable tests during build .. Patch Set 4: (2 comments) https://gerrit.ovirt.org/#/c/63966/4/configure.ac File configure.ac: Line 298 Line 299 Line 300 Line 301 Line 302 If we have not touched nose for py3, why not leaving this check in? Line 307 Line 308 Line 309 Line 310 Line 311 I guess the check should now move the the makefile. This check is now covered by the nose minimum version validation? -- To view, visit https://gerrit.ovirt.org/63966 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9e3589c365166f934f117b53c65cea4b90db3516 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Maor Lipchuk Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net libvirt: make network/libvirt.py suitable for OVS
Edward Haas has posted comments on this change. Change subject: net libvirt: make network/libvirt.py suitable for OVS .. Patch Set 8: Code-Review-1 (8 comments) https://gerrit.ovirt.org/#/c/65065/8/lib/vdsm/network/libvirt.py File lib/vdsm/network/libvirt.py: PS8, Line 45: bridge There is a hidden assumption now for the caller: If bridge is not None, then network == bridge. I guess with the suggestion from line 62, this can be treated. Line 58: determines respectively the presence of bridge element Line 59: or interface subelement. Line 60: """ Line 61: Line 62: if bridge and iface: It will be cleaner to just have two funcs then, one for bridged and one for iface, extracting the common code to their own funcs. Line 63: raise AttributeError('Cannot set both bridge and iface at once') Line 64: Line 65: netName = LIBVIRT_NET_PREFIX + network Line 66: https://gerrit.ovirt.org/#/c/65065/8/tests/network/libvirt_test.py File tests/network/libvirt_test.py: PS8, Line 41: Unit How about 'CreateXml' ? PS8, Line 101: Integration How about 'CreateNetwork'? Line 100: @attr(type='integration') Line 101: class LibvirtIntegrationTests(TestCaseBase): Line 102: Line 103: @ValidateRunningAsRoot Line 104: def _test_create_net(self, **net_attrs): Private funcs/methods at the bottom please. Line 105: net_def = libvirt.createNetworkDef(NETWORK, **net_attrs) Line 106: with libvirt_net(NETWORK, net_def): Line 107: nets = libvirt.networks() Line 108: self.assertIn(NETWORK, nets) Line 106: with libvirt_net(NETWORK, net_def): Line 107: nets = libvirt.networks() Line 108: self.assertIn(NETWORK, nets) Line 109: self.assertEqual(nets[NETWORK], net_attrs) Line 110: nets = libvirt.networks() Why do you need to check it is cleaned all the time? I think a single test that checks that the removal is successful is enough, all others can assume it is fine. Line 111: self.assertNotIn(NETWORK, nets) Line 112: Line 113: def test_create_net_with_bridge(self): Line 114: self._test_create_net( Line 131: Line 132: @contextmanager Line 133: def libvirt_net(net, net_def): Line 134: try: Line 135: libvirt.createNetwork(net_def) If it failed during creation, what is there to remove? Or can it fail and leave leftovers? Line 136: yield Line 137: finally: https://gerrit.ovirt.org/#/c/65065/8/vdsm/virt/vmdevices/graphics.py File vdsm/virt/vmdevices/graphics.py: Even with https://gerrit.ovirt.org/#/c/65098 , the displayNetwork will be broken now. 1. We cannot use IP address anymore for binding, as the addresses are different from host to host. 2. As far as I remember, the libvirt translation between network/bridge name to an IP address is not working with OVS bridges (please correct me by checking this), so the display network cannot be resolved when using OVS libvirt network. It was one of the reasons we convinced ourself that dropping libvirt db is a good step. Line 1: # Line 2: # Copyright 2008-2014 Red Hat, Inc. Line 3: # Line 4: # This program is free software; you can redistribute it and/or modify -- To view, visit https://gerrit.ovirt.org/65065 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6de49e456d8c49f0309690a7fc2bee995f9846bb Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: minor libvirt_tests style refactoring
Edward Haas has posted comments on this change. Change subject: net tests: minor libvirt_tests style refactoring .. Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I64dedb9859d204082a1516574e9b8650a3e4ffe5 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net tests: separate ifcfg and libvirt unit tests
Edward Haas has posted comments on this change. Change subject: net tests: separate ifcfg and libvirt unit tests .. Patch Set 5: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/65090 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieca34a3f361586346d76ec22b11554c4a7c6e84d Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: Ignore missing graphics from VM conf on target host
Edward Haas has posted comments on this change. Change subject: net: Ignore missing graphics from VM conf on target host .. Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/64300/1//COMMIT_MSG Commit Message: PS1, Line 10: fir > ? Done -- To view, visit https://gerrit.ovirt.org/64300 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8cc730c6448b1f70500c86b3ab39af21fa23bd5a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: Ignore missing graphics from VM conf on target host
Edward Haas has posted comments on this change. Change subject: net: Ignore missing graphics from VM conf on target host .. Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/64300/1/vdsm/virt/vm_migrate_hook.py File vdsm/virt/vm_migrate_hook.py: Line 82: raise VmMigrationHookError('No devices entity in VM conf') Line 83: Line 84: try: Line 85: _set_graphics(devices, target_vm_conf) Line 86: except VmMigrationMissingDisplayConf: > Add TODO to drop the code when we stop supporting version ? I am not sure if that will be even correct. Has the fix in Engine took care of upgrades? (Upon upgrade, fix the VM conf) Or has it just made sure a new VM is correctly configured? Line 87: # Due to a bug in Engine, there can be a scenario where the domxml Line 88: # includes a graphics section, however, the VM config on target does Line 89: # not. In such cases, ignore and do not touch this section. Line 90: pass -- To view, visit https://gerrit.ovirt.org/64300 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8cc730c6448b1f70500c86b3ab39af21fa23bd5a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net test: Rename link_test module to netlink_test
Edward Haas has posted comments on this change. Change subject: net test: Rename link_test module to netlink_test .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64385 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iefcf2789544b2106a5edcc0401195bc8830c5aa8 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net test: sourceroute thread crashes due to a test race
Edward Haas has posted comments on this change. Change subject: net test: sourceroute thread crashes due to a test race .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64386 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1f4db3b9dbd846c46c29af8ce097e9942609ce0e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Define netlink netdev flags constants under netlink.link
Edward Haas has posted comments on this change. Change subject: net: Define netlink netdev flags constants under netlink.link .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64387 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I338c3ad27426fcd67457026c84565a59bf2a6e77 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: dhclient command - iface name should appear at the tail
Edward Haas has posted comments on this change. Change subject: net: dhclient command - iface name should appear at the tail .. Patch Set 1: Verified+1 -- To view, visit https://gerrit.ovirt.org/64388 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ied08e77816633c8595482909ef0d5ceb62405dd9 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Adding the 'link' package with an iface module
Edward Haas has posted comments on this change. Change subject: net: Adding the 'link' package with an iface module .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64389 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icb723b8d893575ef14e71cacb6b6e391a6a84831 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net func tests: Cleanup ifcfg files after each func test.
Edward Haas has posted comments on this change. Change subject: net func tests: Cleanup ifcfg files after each func test. .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64391 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4c2757278bb5069aa5138af5c0897ced5f402367 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net tests: Set dummy ifaces up by default.
Edward Haas has posted comments on this change. Change subject: net tests: Set dummy ifaces up by default. .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64392 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I217645d2f3a06adec28d3bb30b9cd12f290e2914 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Relocating wait-for-event under its own module.
Edward Haas has posted comments on this change. Change subject: net: Relocating wait-for-event under its own module. .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64393 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie99c93083fd4db7a2d20518c06e70da5bc333a71 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: ifcfg - dhclient should always be stopped
Edward Haas has posted comments on this change. Change subject: net: ifcfg - dhclient should always be stopped .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64397 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib60930670b335d02e3878743409fd2e5f4b3e26b Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Adding bond api with sysfs driver under link
Edward Haas has posted comments on this change. Change subject: net: Adding bond api with sysfs driver under link .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64390 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I75f4f6b370f29411158e288610a1677b52998546 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Expose disable IPv6 through ip.address module
Edward Haas has posted comments on this change. Change subject: net: Expose disable IPv6 through ip.address module .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64396 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0673da939d575ab43d53cdb1fced4273db05e6c7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Use is_link_up instead of operstate in netfunctestlib
Edward Haas has posted comments on this change. Change subject: net: Use is_link_up instead of operstate in netfunctestlib .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64395 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If32f528ad3afc58394f4071465b321c0012841fd Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: For IP-less networks, wait for link-up on ifup execution
Edward Haas has posted comments on this change. Change subject: net: For IP-less networks, wait for link-up on ifup execution .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64394 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id489fb3b021e6b0658691b1a9a6d6652e75c22ad Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Introduce iface.exists and start using it in ip.dhclient
Edward Haas has posted comments on this change. Change subject: net: Introduce iface.exists and start using it in ip.dhclient .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64398 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifcece92726e7ef354b4792aee73bfc90fa5f3133 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Bond - Expose the (kernel) bond list.
Edward Haas has posted comments on this change. Change subject: net: Bond - Expose the (kernel) bond list. .. Patch Set 2: Verified+1 -- To view, visit https://gerrit.ovirt.org/64401 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3ba2b9d5ec712b268cc3775682506ec83aabbdb8 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: dhclient kill - early exit if iface does not exists
Edward Haas has posted comments on this change. Change subject: net: dhclient kill - early exit if iface does not exists .. Patch Set 1: Func tests passed -- To view, visit https://gerrit.ovirt.org/64399 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9ba37ce248f1daeec8e79bd192261c1840417310 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: dhclient - address flush before starting and on shutdown
Edward Haas has posted comments on this change. Change subject: net: dhclient - address flush before starting and on shutdown .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64400 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6e72f2aeb9f557a4cef49200fe195e6879490dcc Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Bond - preserve original slaves link state.
Edward Haas has posted comments on this change. Change subject: net: Bond - preserve original slaves link state. .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64405 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia98d01512322f88bf9819532afb2ea337cee7749 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Fix reference to CONFFILE_HEADER_BASE which was moved
Edward Haas has posted comments on this change. Change subject: net: Fix reference to CONFFILE_HEADER_BASE which was moved .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64445 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0e1bd308edbe334e62606572e3edf734cd73fd51 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Expose owned_device method through the configurator
Edward Haas has posted comments on this change. Change subject: net: Expose owned_device method through the configurator .. Patch Set 3: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64095 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie1febd494c5a01ceecd894e8542c1adb3cda704a Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Disable IPv6 on OVS southbound iface (nic or bonding)
Edward Haas has posted comments on this change. Change subject: net: Disable IPv6 on OVS southbound iface (nic or bonding) .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64407 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id14d37397e0baf5a3fb55bb530ac9dbd1f295013 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Bond - Add logging to the bond driver.
Edward Haas has posted comments on this change. Change subject: net: Bond - Add logging to the bond driver. .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I043a6232d59cd87f6b973d856df297322f4be387 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Relocate sysfs_bond_permission to nettestlib
Edward Haas has posted comments on this change. Change subject: net: Relocate sysfs_bond_permission to nettestlib .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64410 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8f5016d8453d021d663fe293e17edf87b24c215d Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Bond - adding a transaction context.
Edward Haas has posted comments on this change. Change subject: net: Bond - adding a transaction context. .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64402 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If8d015ed235c3620c04131e57ad079a2ec1a0ecc Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Bond - add refresh method to update bond config
Edward Haas has posted comments on this change. Change subject: net: Bond - add refresh method to update bond config .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64404 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6f36cc24833b0fc612c3af033c54c7bca4742a5a Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Link setup module - includes bond setup logic.
Edward Haas has posted comments on this change. Change subject: net: Link setup module - includes bond setup logic. .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64406 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib8f01a401cb1b96e357bc462e528a2a547c59c24 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: test ovs info with southbound nic
Edward Haas has posted comments on this change. Change subject: net: test ovs info with southbound nic .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64408 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd3ab225172a0edfda9bb998c509ed3c2e318401 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Use Linux bonds with OVS networks
Edward Haas has posted comments on this change. Change subject: net: Use Linux bonds with OVS networks .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64411 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6aeff335949a6e2996f7c3faa524df784dff1b01 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Remove OVS bond implementation.
Edward Haas has posted comments on this change. Change subject: net: Remove OVS bond implementation. .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64409 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3e3d6ba6ecd64bbf22d4be88af6a69ed2f476cea Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Delete an OVS bridge when the last SB is detached.
Edward Haas has posted comments on this change. Change subject: net: Delete an OVS bridge when the last SB is detached. .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64413 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If1c3ba116be59e3e8716bfc949e2c7ee5b9990f8 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Split OVS setup transaction to adjust for bond setup
Edward Haas has posted comments on this change. Change subject: net: Split OVS setup transaction to adjust for bond setup .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64412 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0bd351e755be9d5dcaf5a05e5b79345e6f7bcfe8 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Log a setup networks transaction failure when using ovs...
Edward Haas has posted comments on this change. Change subject: net: Log a setup networks transaction failure when using ovs switch .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64415 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I157a93a1cb800d47587eec5fef5a7c3eb08df58d Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net test: shared nic between bond and network
Edward Haas has posted comments on this change. Change subject: net test: shared nic between bond and network .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64447 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice4ead640d45d0717d2a30bd01398cbbfff3f88a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: edit bond detached from bridge but still attached to a ...
Edward Haas has posted comments on this change. Change subject: net: edit bond detached from bridge but still attached to a vlan .. Patch Set 1: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64446 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Setup validation for OVS - Check nics usage
Edward Haas has posted comments on this change. Change subject: net: Setup validation for OVS - Check nics usage .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64414 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie1ed8805f7e1b84e784feef14c5378b41af1cbf1 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: edit bond detached from bridge but still attached to a ...
Edward Haas has posted comments on this change. Change subject: net: edit bond detached from bridge but still attached to a vlan .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/64446 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net test: shared nic between bond and network
Edward Haas has posted comments on this change. Change subject: net test: shared nic between bond and network .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/64447 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ice4ead640d45d0717d2a30bd01398cbbfff3f88a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net test: shared nic between bond and network
Hello Petr Horáček, Dan Kenigsberg, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/64447 to review the following change. Change subject: net test: shared nic between bond and network .. net test: shared nic between bond and network Change-Id: Ice4ead640d45d0717d2a30bd01398cbbfff3f88a Bug-Url: https://bugzilla.redhat.com/1379115 Signed-off-by: Petr Horáček Reviewed-on: https://gerrit.ovirt.org/64206 Reviewed-by: Edward Haas Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg --- M tests/network/func_net_with_bond_test.py 1 file changed, 31 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/64447/1 diff --git a/tests/network/func_net_with_bond_test.py b/tests/network/func_net_with_bond_test.py index 6d95e02..84cbb86 100644 --- a/tests/network/func_net_with_bond_test.py +++ b/tests/network/func_net_with_bond_test.py @@ -22,9 +22,10 @@ from nose.plugins.attrib import attr +from vdsm.network import errors as ne from vdsm.network.configurators.ifcfg import ifup, ifdown -from .netfunctestlib import NetFuncTestCase, NOCHK +from .netfunctestlib import NetFuncTestCase, SetupNetworksError, NOCHK from .nettestlib import dummy_device NETWORK1_NAME = 'test-network1' @@ -56,6 +57,35 @@ self.assertBond(BOND_NAME, BONDCREATE[BOND_NAME]) +def test_add_the_same_nic_to_net_and_bond_in_one_step(self): +with dummy_device() as nic: +NETCREATE = {NETWORK1_NAME: {'nic': nic, 'switch': self.switch}} +BONDCREATE = {BOND_NAME: {'nics': [nic], 'switch': self.switch}} + +with self.assertRaises(SetupNetworksError) as e: +self.setupNetworks(NETCREATE, BONDCREATE, NOCHK) +self.assertEqual(e.exception.status, ne.ERR_USED_NIC) + +def test_add_bond_with_nic_that_is_already_used_by_network(self): +with dummy_device() as nic: +NETCREATE = {NETWORK1_NAME: {'nic': nic, 'switch': self.switch}} +BONDCREATE = {BOND_NAME: {'nics': [nic], 'switch': self.switch}} + +with self.setupNetworks(NETCREATE, {}, NOCHK): +with self.assertRaises(SetupNetworksError) as e: +self.setupNetworks({}, BONDCREATE, NOCHK) +self.assertEqual(e.exception.status, ne.ERR_USED_NIC) + +def test_add_network_with_nic_that_is_already_used_by_bond(self): +with dummy_device() as nic: +NETCREATE = {NETWORK1_NAME: {'nic': nic, 'switch': self.switch}} +BONDCREATE = {BOND_NAME: {'nics': [nic], 'switch': self.switch}} + +with self.setupNetworks({}, BONDCREATE, NOCHK): +with self.assertRaises(SetupNetworksError) as e: +self.setupNetworks(NETCREATE, {}, NOCHK) +self.assertEqual(e.exception.status, ne.ERR_USED_NIC) + @attr(type='functional', switch='legacy') class NetworkWithBondLegacyTest(NetworkWithBondTemplate): -- To view, visit https://gerrit.ovirt.org/64447 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice4ead640d45d0717d2a30bd01398cbbfff3f88a Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Petr Horáček ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: edit bond detached from bridge but still attached to a ...
Hello Petr Horáček, Dan Kenigsberg, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/64446 to review the following change. Change subject: net: edit bond detached from bridge but still attached to a vlan .. net: edit bond detached from bridge but still attached to a vlan Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f Signed-off-by: Petr Horáček Bug-Url: https://bugzilla.redhat.com/1372798 Reviewed-on: https://gerrit.ovirt.org/63723 Reviewed-by: Edward Haas Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg --- M lib/vdsm/network/configurators/ifcfg.py A tests/network/func_net_with_bond_test.py 2 files changed, 102 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/46/64446/1 diff --git a/lib/vdsm/network/configurators/ifcfg.py b/lib/vdsm/network/configurators/ifcfg.py index 5956e82..710dec1 100644 --- a/lib/vdsm/network/configurators/ifcfg.py +++ b/lib/vdsm/network/configurators/ifcfg.py @@ -242,6 +242,11 @@ if set_mtu is not None: ipwrapper.linkSet(bonding.name, ['mtu', str(set_mtu)]) +# If the bond was bridged, we must remove BRIDGE parameter from its +# ifcfg configuration file. +if bonding.bridge: +self.configApplier.dropBridgeParameter(bonding.name) + def removeNic(self, nic, remove_even_if_used=False): to_be_removed = self._ifaceDownAndCleanup(nic, remove_even_if_used) if to_be_removed: @@ -725,6 +730,23 @@ for slave in slaves: self.setIfaceMtu(slave, newmtu) +def dropBridgeParameter(self, iface_name): +iface_conf_path = NET_CONF_PREF + iface_name + +if not os.path.isfile(iface_conf_path): +return + +with open(iface_conf_path) as f: +config_lines = f.readlines() + +config_lines_without_comments_and_bridge = [ +line for line in config_lines +if (not line.startswith('#') and +not line.startswith('BRIDGE'))] + +self.writeConfFile(iface_conf_path, + ''.join(config_lines_without_comments_and_bridge)) + def stop_devices(device_ifcfgs): for dev in reversed(_sort_device_ifcfgs(device_ifcfgs)): diff --git a/tests/network/func_net_with_bond_test.py b/tests/network/func_net_with_bond_test.py new file mode 100644 index 000..6d95e02 --- /dev/null +++ b/tests/network/func_net_with_bond_test.py @@ -0,0 +1,80 @@ +# Copyright 2016 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# +from __future__ import absolute_import + +from contextlib import contextmanager + +from nose.plugins.attrib import attr + +from vdsm.network.configurators.ifcfg import ifup, ifdown + +from .netfunctestlib import NetFuncTestCase, NOCHK +from .nettestlib import dummy_device + +NETWORK1_NAME = 'test-network1' +NETWORK2_NAME = 'test-network2' +BOND_NAME = 'bond1' +VLAN1 = 10 +VLAN2 = 20 + + +@attr(type='functional') +class NetworkWithBondTemplate(NetFuncTestCase): +__test__ = False + +@contextmanager +def _test_detach_used_bond_from_bridge(self): +with dummy_device() as nic: +NETCREATE = { +NETWORK1_NAME: {'bonding': BOND_NAME, 'switch': self.switch}, +NETWORK2_NAME: {'bonding': BOND_NAME, 'vlan': VLAN2, +'switch': self.switch}} +BONDCREATE = {BOND_NAME: {'nics': [nic], 'switch': self.switch}} +with self.setupNetworks(NETCREATE, BONDCREATE, NOCHK): +NETEDIT = { +NETWORK1_NAME: {'bonding': BOND_NAME, 'vlan': VLAN1, +'switch': self.switch}} +self.setupNetworks(NETEDIT, {}, NOCHK) + +yield + +self.assertBond(BOND_NAME, BONDCREATE[BOND_NAME]) + + +@attr(type='functional', switch='legacy') +class NetworkWithBondLegacyTest(NetworkWithBondTemplate): +__test__ = True +switch = 'legacy' + +def test_detach_used_bond_from_bridge(self): +with self._test_detach_used_bond_from_bridge(): +ifdown(BOND_NAME) +
Change in vdsm[ovirt-4.0]: net: Fix reference to CONFFILE_HEADER_BASE which was moved
Edward Haas has uploaded a new change for review. Change subject: net: Fix reference to CONFFILE_HEADER_BASE which was moved .. net: Fix reference to CONFFILE_HEADER_BASE which was moved CONFFILE_HEADER_BASE has been renamed and moved to module scope inthe previous commit. Change-Id: I0e1bd308edbe334e62606572e3edf734cd73fd51 Bug-Url: https://bugzilla.redhat.com/1367378 Signed-off-by: Edward Haas --- M init/wait_for_ipv4s M lib/vdsm/network/configurators/ifcfg.py 2 files changed, 2 insertions(+), 9 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/64445/1 diff --git a/init/wait_for_ipv4s b/init/wait_for_ipv4s index e2ddf5b..c1e7f32 100755 --- a/init/wait_for_ipv4s +++ b/init/wait_for_ipv4s @@ -11,7 +11,7 @@ import sys from vdsm.network.configurators.ifcfg import NET_CONF_DIR -from vdsm.network.configurators.ifcfg import ConfigWriter +from vdsm.network.configurators.ifcfg import CONFFILE_HEADER_SIGNATURE from vdsm.network.netinfo.addresses import getIpInfo from vdsm.network.netlink import monitor @@ -24,7 +24,7 @@ for ifcfg in ifcfgs: with open(join(NET_CONF_DIR, ifcfg)) as f: config = f.read() -if (config.startswith(ConfigWriter.CONFFILE_HEADER_BASE) and +if (config.startswith(CONFFILE_HEADER_SIGNATURE) and '\nONBOOT=yes\n' in config and '\nIPADDR=' in config): vdsm_ip_onboot_devs.add(ifcfg[6:]) return vdsm_ip_onboot_devs diff --git a/lib/vdsm/network/configurators/ifcfg.py b/lib/vdsm/network/configurators/ifcfg.py index c215bc1..5956e82 100644 --- a/lib/vdsm/network/configurators/ifcfg.py +++ b/lib/vdsm/network/configurators/ifcfg.py @@ -469,13 +469,6 @@ logging.info('Loaded %s', fpath) -def _ownedIfcfg(self, fpath): -if not os.path.isfile(fpath): -return False -with open(fpath) as confFile: -content = confFile.readline() -return content.startswith(self.CONFFILE_HEADER_BASE) - def loadBackups(self): """ Load persistent backups into memory """ # Load logical networks -- To view, visit https://gerrit.ovirt.org/64445 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e1bd308edbe334e62606572e3edf734cd73fd51 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: Fix reference to CONFFILE_HEADER_BASE which was moved
Edward Haas has posted comments on this change. Change subject: net: Fix reference to CONFFILE_HEADER_BASE which was moved .. Patch Set 1: Verified+1 All unit and functional tests passed. -- To view, visit https://gerrit.ovirt.org/64442 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0e1bd308edbe334e62606572e3edf734cd73fd51 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: net: Fix reference to CONFFILE_HEADER_BASE which was moved
Edward Haas has uploaded a new change for review. Change subject: net: Fix reference to CONFFILE_HEADER_BASE which was moved .. net: Fix reference to CONFFILE_HEADER_BASE which was moved CONFFILE_HEADER_BASE has been renamed and moved to module scope in commit 8e72106a39f435471e591c465b5f49bd934868e7 Change-Id: I0e1bd308edbe334e62606572e3edf734cd73fd51 Signed-off-by: Edward Haas --- M init/wait_for_ipv4s M lib/vdsm/network/configurators/ifcfg.py 2 files changed, 2 insertions(+), 9 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/64442/1 diff --git a/init/wait_for_ipv4s b/init/wait_for_ipv4s index e2ddf5b..c1e7f32 100755 --- a/init/wait_for_ipv4s +++ b/init/wait_for_ipv4s @@ -11,7 +11,7 @@ import sys from vdsm.network.configurators.ifcfg import NET_CONF_DIR -from vdsm.network.configurators.ifcfg import ConfigWriter +from vdsm.network.configurators.ifcfg import CONFFILE_HEADER_SIGNATURE from vdsm.network.netinfo.addresses import getIpInfo from vdsm.network.netlink import monitor @@ -24,7 +24,7 @@ for ifcfg in ifcfgs: with open(join(NET_CONF_DIR, ifcfg)) as f: config = f.read() -if (config.startswith(ConfigWriter.CONFFILE_HEADER_BASE) and +if (config.startswith(CONFFILE_HEADER_SIGNATURE) and '\nONBOOT=yes\n' in config and '\nIPADDR=' in config): vdsm_ip_onboot_devs.add(ifcfg[6:]) return vdsm_ip_onboot_devs diff --git a/lib/vdsm/network/configurators/ifcfg.py b/lib/vdsm/network/configurators/ifcfg.py index e67a3cf..aac39d1 100644 --- a/lib/vdsm/network/configurators/ifcfg.py +++ b/lib/vdsm/network/configurators/ifcfg.py @@ -522,13 +522,6 @@ logging.info('Loaded %s', fpath) -def _ownedIfcfg(self, fpath): -if not os.path.isfile(fpath): -return False -with open(fpath) as confFile: -content = confFile.readline() -return content.startswith(self.CONFFILE_HEADER_BASE) - def loadBackups(self): """ Load persistent backups into memory """ # Load logical networks -- To view, visit https://gerrit.ovirt.org/64442 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e1bd308edbe334e62606572e3edf734cd73fd51 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Bond - Add logging to the bond driver.
Hello Petr Horáček, Dan Kenigsberg, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/64403 to review the following change. Change subject: net: Bond - Add logging to the bond driver. .. net: Bond - Add logging to the bond driver. Change-Id: I043a6232d59cd87f6b973d856df297322f4be387 Bug-Url: https://bugzilla.redhat.com/1379115 Signed-off-by: Edward Haas Reviewed-on: https://gerrit.ovirt.org/63444 Reviewed-by: Petr Horáček Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg --- M lib/vdsm/network/link/bond.py 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/64403/1 diff --git a/lib/vdsm/network/link/bond.py b/lib/vdsm/network/link/bond.py index 1a2b5d0..d91e496 100644 --- a/lib/vdsm/network/link/bond.py +++ b/lib/vdsm/network/link/bond.py @@ -19,6 +19,7 @@ from __future__ import absolute_import import abc +import logging import os import six @@ -126,23 +127,29 @@ def __exit__(self, ex_type, ex_value, traceback): if ex_type is not None: +logging.info('Bond {} transaction failed, reverting...'.format( +self._master)) self._revert_transaction() def create(self): with open(self.BONDING_MASTERS, 'w') as f: f.write('+%s' % self._master) +logging.info('Bond {} has been created.'.format(self._master)) if self._slaves: self.add_slaves(self._slaves) def destroy(self): with open(self.BONDING_MASTERS, 'w') as f: f.write('-%s' % self._master) +logging.info('Bond {} has been destroyed.'.format(self._master)) def add_slaves(self, slaves): for slave in slaves: iface.down(slave) with open(self.BONDING_SLAVES % self._master, 'w') as f: f.write('+%s' % slave) +logging.info('Slave {} has been added to bond {}.'.format( +slave, self._master)) self._slaves.add(slave) def del_slaves(self, slaves): @@ -150,6 +157,8 @@ iface.down(slave) with open(self.BONDING_SLAVES % self._master, 'w') as f: f.write('-%s' % slave) +logging.info('Slave {} has been removed from bond {}.'.format( +slave, self._master)) self._slaves.remove(slave) def set_options(self, options): @@ -157,6 +166,7 @@ for key, value in options: with open(self.BONDING_OPT % (self._master, key), 'w') as f: f.write(value) +logging.info('Bond {} options set: {}.'.format(self._master, options)) def exists(self): return os.path.exists(self.BONDING_PATH % self._master) -- To view, visit https://gerrit.ovirt.org/64403 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I043a6232d59cd87f6b973d856df297322f4be387 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Petr Horáček ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Expose disable IPv6 through ip.address module
Hello Petr Horáček, Dan Kenigsberg, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/64396 to review the following change. Change subject: net: Expose disable IPv6 through ip.address module .. net: Expose disable IPv6 through ip.address module Change-Id: I0673da939d575ab43d53cdb1fced4273db05e6c7 Signed-off-by: Edward Haas Bug-Url: https://bugzilla.redhat.com/1379115 Reviewed-on: https://gerrit.ovirt.org/62830 Reviewed-by: Petr Horáček Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg --- M lib/vdsm/network/ip/address.py 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/64396/1 diff --git a/lib/vdsm/network/ip/address.py b/lib/vdsm/network/ip/address.py index 0842eb4..634925a 100644 --- a/lib/vdsm/network/ip/address.py +++ b/lib/vdsm/network/ip/address.py @@ -166,6 +166,11 @@ sysctl.disable_ipv6_local_auto(dev) +def disable_ipv6(iface): +if ipv6_supported(): +sysctl.disable_ipv6(iface) + + def add(iface, ipv4, ipv6): if ipv4.address: ipwrapper.addrAdd(iface, ipv4.address, ipv4.netmask) -- To view, visit https://gerrit.ovirt.org/64396 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0673da939d575ab43d53cdb1fced4273db05e6c7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Petr Horáček ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Remove OVS bond implementation.
Hello Petr Horáček, Dan Kenigsberg, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/64409 to review the following change. Change subject: net: Remove OVS bond implementation. .. net: Remove OVS bond implementation. The OVS bond is to be replaced by Linux bond. This patch removes all related OVS bond code. Note: Functional tests will fail with this patch and restored with the next patch. Change-Id: I3e3d6ba6ecd64bbf22d4be88af6a69ed2f476cea Bug-Url: https://bugzilla.redhat.com/1379115 Signed-off-by: Edward Haas Signed-off-by: Petr Horáček Reviewed-on: https://gerrit.ovirt.org/63850 Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg --- M lib/vdsm/network/netswitch.py M lib/vdsm/network/ovs/info.py M lib/vdsm/network/ovs/switch.py M lib/vdsm/network/ovs/validator.py M tests/network/ovs_info_test.py M tests/network/ovs_switch_test.py M tests/network/ovs_test.py 7 files changed, 23 insertions(+), 259 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/09/64409/1 diff --git a/lib/vdsm/network/netswitch.py b/lib/vdsm/network/netswitch.py index 5c4c58e..473aeed 100644 --- a/lib/vdsm/network/netswitch.py +++ b/lib/vdsm/network/netswitch.py @@ -159,9 +159,6 @@ with ifacquire.Transaction(ovs_netinfo['networks']) as acq: with ovs_switch.create_setup(_ovs_info) as s: s.remove_nets(nets2remove) -s.remove_bonds(bonds2remove) -s.edit_bonds(bonds2edit) -s.add_bonds(bonds2add) s.add_nets(nets2add) acq.acquire(s.acquired_ifaces) _update_running_config(networks, bondings, config) diff --git a/lib/vdsm/network/ovs/info.py b/lib/vdsm/network/ovs/info.py index 055914a..b8f925c 100644 --- a/lib/vdsm/network/ovs/info.py +++ b/lib/vdsm/network/ovs/info.py @@ -25,8 +25,6 @@ from vdsm.network.netinfo.dhcp import dhcp_status from vdsm.network.netinfo.mtus import getMtu from vdsm.network.netinfo.routes import get_routes, get_gateway -from vdsm.utils import rget - from . import driver @@ -49,13 +47,6 @@ SHARED_NETWORK_ATTRIBUTES = [ 'mtu', 'addr', 'ipv4addrs', 'gateway', 'netmask', 'dhcpv4', 'ipv6addrs', 'ipv6autoconf', 'ipv6gateway', 'dhcpv6'] - -BOND_CONFIGURABLES = [ -'bond_mode', -'lacp', -'other_config:bond-detect-mode', -'other_config:bond-miimon-interval' -] class OvsDB(object): @@ -100,7 +91,8 @@ for bridge, attrs in six.iteritems(self.bridges): bridge_sb = self.southbound_port(attrs['ports']) -bridges_by_sb[bridge_sb] = bridge +if bridge_sb: +bridges_by_sb[bridge_sb] = bridge return bridges_by_sb @@ -127,37 +119,10 @@ return {'ports': ports_info, 'stp': stp} def _port_attr(self, port_entry): -bond_info = (self._bond_info(port_entry) if self._is_bond(port_entry) - else None) tag = port_entry['tag'] level = port_entry['other_config'].get('vdsm_level') -return {'bond': bond_info, 'tag': tag, 'level': level} - -@staticmethod -def _is_bond(port_entry): -""" -OVS implicitly defines a port as bond when it has two or more -interfaces set on it. -""" -return len(port_entry['interfaces']) >= 2 - -def _bond_info(self, port_entry): -slaves = sorted([self._ifaces_uuids[uuid]['name'] - for uuid in port_entry['interfaces']]) - -active_slave = self._ifaces_macs.get( -port_entry['bond_active_slave'], {}) -active_slave_name = active_slave.get('name') - -fake_iface = port_entry['bond_fake_iface'] - -bond_info = {'slaves': slaves, 'active_slave': active_slave_name, - 'fake_iface': fake_iface} -for key in BOND_CONFIGURABLES: -bond_info[key] = rget(port_entry, key.split(':')) - -return bond_info +return {'tag': tag, 'level': level} @staticmethod def southbound_port(ports): @@ -168,11 +133,6 @@ def northbound_ports(ports): return (port for port, attrs in six.iteritems(ports) if attrs['level'] == NORTHBOUND) - -@staticmethod -def bonds(ports): -return ((port, attrs['bond']) for port, attrs in six.iteritems(ports) -if attrs['bond']) def get_netinfo(): @@ -232,7 +192,7 @@ addresses = getIpAddrs() routes = get_routes() -_netinfo = {'networks': {}, 'bondings': {}} +_netinfo = {'networks': {}} for bridge, bridge_attrs in six.iteritems(ovs_info.bridges): ports = bridge_attrs['ports'] @@ -246,24 +206,17 @@ northbound_port, bridge, southbound, ports, stp, addresses, routes) -for bond, bond_attrs in ovs_info.bonds(ports): -_netinfo['bondings'][bond] = _ge
Change in vdsm[ovirt-4.0]: net: Split OVS setup transaction to adjust for bond setup
Hello Petr Horáček, Dan Kenigsberg, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/64412 to review the following change. Change subject: net: Split OVS setup transaction to adjust for bond setup .. net: Split OVS setup transaction to adjust for bond setup When using Linux bonds (instead of OVS bonds), the OVS setup transaction needs to be split into two. First one for removing networks and a second for adding networks. In between, the bonds setup is placed. These three steps contain, in addition to the actual devices setup, the acquire and running-config update, allowing proper rollback in case of setup failure. This patch, fixes a scenario that fails with the previous patch, where the Linux bonds have been introduced in the setup flow. The scenario: Move a network nic from a network to a bond slave. Change-Id: I0bd351e755be9d5dcaf5a05e5b79345e6f7bcfe8 Bug-Url: https://bugzilla.redhat.com/1379115 Signed-off-by: Edward Haas Reviewed-on: https://gerrit.ovirt.org/64118 Continuous-Integration: Jenkins CI Reviewed-by: Petr Horáček Reviewed-by: Dan Kenigsberg --- M lib/vdsm/network/netswitch.py M lib/vdsm/network/ovs/switch.py M tests/network/ovs_switch_test.py M tests/network/ovs_test.py 4 files changed, 111 insertions(+), 91 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/64412/1 diff --git a/lib/vdsm/network/netswitch.py b/lib/vdsm/network/netswitch.py index 70d2cd6..47d73e5 100644 --- a/lib/vdsm/network/netswitch.py +++ b/lib/vdsm/network/netswitch.py @@ -157,11 +157,11 @@ def _setup_ovs(networks, bondings, options, in_rollback): _ovs_info = ovs_info.OvsInfo() -ovs_netinfo = ovs_info.create_netinfo(_ovs_info) +ovs_nets = ovs_info.create_netinfo(_ovs_info)['networks'] _netinfo = netinfo() nets2add, nets2edit, nets2remove = _split_setup_actions( -networks, ovs_netinfo['networks']) +networks, ovs_nets) bonds2add, bonds2edit, bonds2remove = _split_setup_actions( bondings, _netinfo['bondings']) @@ -173,36 +173,38 @@ # FIXME: we are not able to move a nic from bond to network in one setup with Transaction(in_rollback=in_rollback) as config: setup_bonds = SetupBonds(bonds2add, bonds2edit, bonds2remove, config) -with ifacquire.Transaction(ovs_netinfo['networks']) as acq: -with ovs_switch.create_setup(_ovs_info) as setup_ovs: -setup_ovs.remove_nets(nets2remove) -setup_bonds.remove_bonds() -acq.acquire(setup_bonds.ifaces_for_acquirement) -setup_bonds.edit_bonds() -setup_bonds.add_bonds() -setup_ovs.add_nets(nets2add) -acq.acquire(setup_ovs.acquired_ifaces) -_update_networks_running_config(networks, config) +with ifacquire.Transaction(ovs_nets) as acq: +_remove_networks(nets2remove, _ovs_info, config) + +setup_bonds.remove_bonds() + +acq.acquire(setup_bonds.ifaces_for_acquirement) +setup_bonds.edit_bonds() +setup_bonds.add_bonds() + +_add_networks(nets2add, _ovs_info, config, acq) + ovs_switch.cleanup() setup_ipv6autoconf(networks) set_ovs_links_up(nets2add, bonds2add, bonds2edit) setup_ovs_ip_config(nets2add, nets2remove) + connectivity.check(options) -# TODO: We should use KernelConfig when it will be fully reliable. -def _update_networks_running_config(networks, running_config): -""" -Update running_config with the networks configuration. +def _remove_networks(nets2remove, ovs_info, config): +net_rem_setup = ovs_switch.create_network_removal_setup(ovs_info) +net_rem_setup.remove(nets2remove) +for net, attrs in six.iteritems(nets2remove): +config.removeNetwork(net) -This step has to be done as soon as we apply the changes in the system. -The running config will be used to generate the rollback query. -""" -for net, attrs in six.iteritems(networks): -if 'remove' in attrs: -running_config.removeNetwork(net) -else: -running_config.setNetwork(net, attrs) + +def _add_networks(nets2add, ovs_info, config, acq): +net_add_setup = ovs_switch.create_network_addition_setup(ovs_info) +with net_add_setup.add(nets2add): +acq.acquire(net_add_setup.acquired_ifaces) +for net, attrs in six.iteritems(nets2add): +config.setNetwork(net, attrs) def setup_ovs_ip_config(nets2add, nets2remove): diff --git a/lib/vdsm/network/ovs/switch.py b/lib/vdsm/network/ovs/switch.py index 1b47315..e55bbef 100644 --- a/lib/vdsm/network/ovs/switch.py +++ b/lib/vdsm/network/ovs/switch.py @@ -18,6 +18,7 @@ # from __future__ import absolute_import +from contextlib import contextmanager import random import six @@ -53,84 +54,98 @@
Change in vdsm[ovirt-4.0]: net: Introduce iface.exists and start using it in ip.dhclient
Hello Petr Horáček, Dan Kenigsberg, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/64398 to review the following change. Change subject: net: Introduce iface.exists and start using it in ip.dhclient .. net: Introduce iface.exists and start using it in ip.dhclient Change-Id: Ifcece92726e7ef354b4792aee73bfc90fa5f3133 Signed-off-by: Edward Haas Bug-Url: https://bugzilla.redhat.com/1379115 Reviewed-on: https://gerrit.ovirt.org/63086 Reviewed-by: Petr Horáček Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg --- M lib/vdsm/network/ip/dhclient.py M lib/vdsm/network/link/iface.py 2 files changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/64398/1 diff --git a/lib/vdsm/network/ip/dhclient.py b/lib/vdsm/network/ip/dhclient.py index 0fc3073..f6e029a 100644 --- a/lib/vdsm/network/ip/dhclient.py +++ b/lib/vdsm/network/ip/dhclient.py @@ -28,7 +28,7 @@ from vdsm import cmdutils from vdsm.network import errors as ne -from vdsm.network import netinfo +from vdsm.network.link import iface as linkiface from vdsm.commands import execCmd from vdsm.utils import CommandPath, memoized, pgrep, kill_and_rm_pid @@ -56,8 +56,7 @@ self._cgroup = cgroup def _dhclient(self): -# Ask dhclient to stop any dhclient running for the device -if os.path.exists(os.path.join(netinfo.NET_PATH, self.iface)): +if linkiface.exists(self.iface): kill(self.iface, self.family) cmd = [DHCLIENT_BINARY.cmd, '-%s' % self.family, '-1', '-pf', self.pidFile, '-lf', self.leaseFile] diff --git a/lib/vdsm/network/link/iface.py b/lib/vdsm/network/link/iface.py index 011d7de..fb821d3 100644 --- a/lib/vdsm/network/link/iface.py +++ b/lib/vdsm/network/link/iface.py @@ -18,6 +18,8 @@ # from __future__ import absolute_import +import os + from vdsm.network import ipwrapper from vdsm.network.netlink import link from vdsm.network.netlink.link import get_link, is_link_up @@ -26,6 +28,8 @@ STATE_UP = 'up' STATE_DOWN = 'down' + +NET_PATH = '/sys/class/net' def up(dev, admin_blocking=True, oper_blocking=False): @@ -62,6 +66,10 @@ return bool(get_link(dev)['flags'] & link.IFF_PROMISC) +def exists(dev): +return os.path.exists(os.path.join(NET_PATH, dev)) + + def _up_blocking(dev, link_blocking): with waitfor_linkup(dev, link_blocking): ipwrapper.linkSet(dev, [STATE_UP]) -- To view, visit https://gerrit.ovirt.org/64398 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifcece92726e7ef354b4792aee73bfc90fa5f3133 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Petr Horáček ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Log a setup networks transaction failure when using ovs...
Hello Petr Horáček, Dan Kenigsberg, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/64415 to review the following change. Change subject: net: Log a setup networks transaction failure when using ovs switch .. net: Log a setup networks transaction failure when using ovs switch When a failure occurs during the ovs setup process, an exception is raised. Log this failure in order to ease debugging. Change-Id: I157a93a1cb800d47587eec5fef5a7c3eb08df58d Bug-Url: https://bugzilla.redhat.com/1379115 Signed-off-by: Edward Haas Reviewed-on: https://gerrit.ovirt.org/64242 Reviewed-by: Petr Horáček Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg --- M lib/vdsm/network/netconfpersistence.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/64415/1 diff --git a/lib/vdsm/network/netconfpersistence.py b/lib/vdsm/network/netconfpersistence.py index fbf7676..d0093d2 100644 --- a/lib/vdsm/network/netconfpersistence.py +++ b/lib/vdsm/network/netconfpersistence.py @@ -240,6 +240,10 @@ else: config_diff = self.base_config.diffFrom(self.config) if config_diff: +logging.warning( +'Failed setup transaction,' +'reverting to last known good network.', +exc_info=(ex_type, ex_value, ex_traceback)) raise ne.RollbackIncomplete(config_diff, ex_type, ex_value) -- To view, visit https://gerrit.ovirt.org/64415 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I157a93a1cb800d47587eec5fef5a7c3eb08df58d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Petr Horáček ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Bond - preserve original slaves link state.
Hello Petr Horáček, Dan Kenigsberg, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/64405 to review the following change. Change subject: net: Bond - preserve original slaves link state. .. net: Bond - preserve original slaves link state. Before attaching or removing a slave from a bond, its state is set to DOWN. This patch makes sure to preserve its original state, even when failure occurs. (Without it, the link may be set to DOWN, even if the slave has not been added to the bond) Change-Id: Ia98d01512322f88bf9819532afb2ea337cee7749 Bug-Url: https://bugzilla.redhat.com/1379115 Signed-off-by: Edward Haas Reviewed-on: https://gerrit.ovirt.org/63446 Reviewed-by: Petr Horáček Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg --- M lib/vdsm/network/link/bond.py 1 file changed, 19 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/05/64405/1 diff --git a/lib/vdsm/network/link/bond.py b/lib/vdsm/network/link/bond.py index d45e139..9911ad9 100644 --- a/lib/vdsm/network/link/bond.py +++ b/lib/vdsm/network/link/bond.py @@ -19,6 +19,7 @@ from __future__ import absolute_import import abc +from contextlib import contextmanager import logging import os import six @@ -149,18 +150,20 @@ def add_slaves(self, slaves): for slave in slaves: -iface.down(slave) -with open(self.BONDING_SLAVES % self._master, 'w') as f: -f.write('+%s' % slave) +with _preserve_iface_state(slave): +iface.down(slave) +with open(self.BONDING_SLAVES % self._master, 'w') as f: +f.write('+%s' % slave) logging.info('Slave {} has been added to bond {}.'.format( slave, self._master)) self._slaves.add(slave) def del_slaves(self, slaves): for slave in slaves: -iface.down(slave) -with open(self.BONDING_SLAVES % self._master, 'w') as f: -f.write('-%s' % slave) +with _preserve_iface_state(slave): +iface.down(slave) +with open(self.BONDING_SLAVES % self._master, 'w') as f: +f.write('-%s' % slave) logging.info('Slave {} has been removed from bond {}.'.format( slave, self._master)) self._slaves.remove(slave) @@ -206,6 +209,16 @@ # a reasonable scenario and leave it to upper levels to handle it. +@contextmanager +def _preserve_iface_state(dev): +dev_was_up = iface.is_up(dev) +try: +yield +finally: +if dev_was_up and not iface.is_up(dev): +iface.up(dev) + + # TODO: Use a configuration parameter to determine which driver to use. def _bond_driver(): """ -- To view, visit https://gerrit.ovirt.org/64405 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia98d01512322f88bf9819532afb2ea337cee7749 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Petr Horáček ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org