Change in vdsm[ovirt-3.4]: network: publish and honor blockingdhcp setting
oVirt Jenkins CI Server has posted comments on this change. Change subject: network: publish and honor blockingdhcp setting .. Patch Set 2: Build Failed http://jenkins.ovirt.org/job/vdsm_3.4_create-rpms_merged/219/ : FAILURE -- To view, visit http://gerrit.ovirt.org/28133 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id20bdf848dd0ace8d958a1665b3a54b3c18c9b23 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.4 Gerrit-Owner: Antoni Segura Puimedon Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.4]: network: publish and honor blockingdhcp setting
Yaniv Bronhaim has submitted this change and it was merged. Change subject: network: publish and honor blockingdhcp setting .. network: publish and honor blockingdhcp setting blockingdhcp is an old unpublished network option that allows the user to specify that the network configuring should wait for the result of upping a dhcp configured interface. When moving to the packed (as oposed to unpacked, i.e., **opts) options for objectivizeNetworks, this option stopped reaching the network models, and thus, stopped being applied. This patch re-enables blockingdhcp, publishing it in the API so that we continue to honor it. Bug-Url: https://bugzilla.redhat.com/1101326 Change-Id: Id20bdf848dd0ace8d958a1665b3a54b3c18c9b23 Signed-off-by: Antoni S. Puimedon Reviewed-on: http://gerrit.ovirt.org/28048 Reviewed-by: Dan Kenigsberg Reviewed-on: http://gerrit.ovirt.org/28133 --- M tests/functional/networkTests.py M vdsm/configNetwork.py M vdsm/netmodels.py M vdsm_api/vdsmapi-schema.json 4 files changed, 22 insertions(+), 5 deletions(-) Approvals: Antoni Segura Puimedon: Verified Dan Kenigsberg: Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/28133 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id20bdf848dd0ace8d958a1665b3a54b3c18c9b23 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.4 Gerrit-Owner: Antoni Segura Puimedon Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: automat...@ovirt.org ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.4]: network: publish and honor blockingdhcp setting
Dan Kenigsberg has posted comments on this change. Change subject: network: publish and honor blockingdhcp setting .. Patch Set 1: Code-Review+2 -- To view, visit http://gerrit.ovirt.org/28133 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id20bdf848dd0ace8d958a1665b3a54b3c18c9b23 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.4 Gerrit-Owner: Antoni Segura Puimedon Gerrit-Reviewer: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.4]: network: publish and honor blockingdhcp setting
Antoni Segura Puimedon has posted comments on this change. Change subject: network: publish and honor blockingdhcp setting .. Patch Set 1: Verified+1 toniel602 tests (2e8eda5) # ./run_tests_local.sh functional/networkTests.py NetworkTest testAddDelBondedNetwork(kwargs=False) OK testAddDelBondedNetwork(kwargs=True)OK testAddDelNetwork(kwargs=False) OK testAddDelNetwork(kwargs=True) OK testAddNetworkBondWithManyVlans(kwargs=False) OK testAddNetworkBondWithManyVlans(kwargs=True)OK testAddNetworkManyVlans(kwargs=False) OK testAddNetworkManyVlans(kwargs=True)OK testAddNetworkVlan(kwargs=False)OK testAddNetworkVlan(kwargs=True) OK testAddNetworkVlanBond(kwargs=False)OK testAddNetworkVlanBond(kwargs=True) OK testAddVlanedBridgeless OK testAddVlanedBridgeless_oneCommand OK testAfterNetworkSetupHook OK testBeforeNetworkSetupHook OK testBondHwAddress(kwargs=False) OK testBondHwAddress(kwargs=True) OK testBrokenBridgelessNetReplacement OK testDelNetworkBondAccumulation OK testDelNetworkWithMTU(kwargs=False) OK testDelNetworkWithMTU(kwargs=True) OK testDelWithoutAdd(kwargs=False) OK testDelWithoutAdd(kwargs=True) OK testEditWithoutAdd(kwargs=False)OK testEditWithoutAdd(kwargs=True) OK testFailWithInvalidBondingName(kwargs=False)OK testFailWithInvalidBondingName(kwargs=True) OK testFailWithInvalidBridgeName OK testFailWithInvalidIpConfig OK testFailWithInvalidNic(kwargs=False)OK testFailWithInvalidNic(kwargs=True) OK testFailWithInvalidParams(kwargs=False) OK testFailWithInvalidParams(kwargs=True) OK testGetRouteDeviceToOK testHonorBlockingDhcp OK testIPv6ConfigNetwork OK testIpLinkWrapper OK testNoBridgeLeftovers OK testQosNetwork OK testRouteExists OK testRuleExists OK testSafeNetworkConfig(kwargs=False) OK testSafeNetworkConfig(kwargs=True) OK testSetupNetworksAddBadParams(kwargs=False) OK testSetupNetworksAddBadParams(kwargs=True) OK testSetupNetworksAddBondWithManyVlans(kwargs=False) OK testSetupNetworksAddBondWithManyVlans(kwargs=True) OK testSetupNetworksAddDelBondedNetwork(kwargs=False) OK testSetupNetworksAddDelBondedNetwork(kwargs=True) OK testSetupNetworksAddDelDhcp OK testSetupNetworksAddManyVlans(kwargs=False) OK testSetupNetworksAddManyVlans(kwargs=True) OK testSetupNetworksAddNetworkToNicAfterBondBreaking(kwargs=False)OK testSetupNetworksAddNetworkToNicAfterBondBreaking(kwargs=True)OK testSetupNetworksAddNetworkToNicAfterBondResizing(kwargs=False)OK testSetupNetworksAddNetworkToNicAfterBondResizing(kwargs=True)OK testSetupNetworksAddOverExistingBond(kwargs=False) OK testSetupNetworksAddOverExistingBond(kwargs=True) OK testSetupNetworksAddVlan(kwargs=False) OK testSetupNetworksAddVlan(kwargs=True) OK testSetupNetworksConvertVlanNetBridgeness OK testSetupNetworksDelOneOfBondNets OK testSetupNetworksKeepNetworkOnBondAfterBondResizing(kwargs=False)OK testSetupNetworksKeepNetworkOnBondAfterBondResizing(kwargs=True)OK testSetupNetworksMtus(kwargs=False) OK testSetupNetworksMtus(kwargs=True) OK testSetupNetworksNetCompatibilityBondSingleBridge OK testSetupNetworksNetCompatibilityBondSingleBridgeless OK testSetupNetworksNetCompat
Change in vdsm[ovirt-3.4]: network: publish and honor blockingdhcp setting
Yaniv Bronhaim has posted comments on this change. Change subject: network: publish and honor blockingdhcp setting .. Patch Set 1: verify asap and set target release if its for 3.4 -- To view, visit http://gerrit.ovirt.org/28133 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id20bdf848dd0ace8d958a1665b3a54b3c18c9b23 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.4 Gerrit-Owner: Antoni Segura Puimedon Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.4]: network: publish and honor blockingdhcp setting
Hello Dan Kenigsberg, I'd like you to do a code review. Please visit http://gerrit.ovirt.org/28133 to review the following change. Change subject: network: publish and honor blockingdhcp setting .. network: publish and honor blockingdhcp setting blockingdhcp is an old unpublished network option that allows the user to specify that the network configuring should wait for the result of upping a dhcp configured interface. When moving to the packed (as oposed to unpacked, i.e., **opts) options for objectivizeNetworks, this option stopped reaching the network models, and thus, stopped being applied. This patch re-enables blockingdhcp, publishing it in the API so that we continue to honor it. Bug-Url: https://bugzilla.redhat.com/1101326 Change-Id: Id20bdf848dd0ace8d958a1665b3a54b3c18c9b23 Signed-off-by: Antoni S. Puimedon Reviewed-on: http://gerrit.ovirt.org/28048 Reviewed-by: Dan Kenigsberg --- M tests/functional/networkTests.py M vdsm/configNetwork.py M vdsm/netmodels.py M vdsm_api/vdsmapi-schema.json 4 files changed, 22 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/28133/1 diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py index b8028e8..141b47b 100644 --- a/tests/functional/networkTests.py +++ b/tests/functional/networkTests.py @@ -1695,7 +1695,8 @@ veth.setLinkUp(left) with dnsmasqDhcp(left): network = {NETWORK_NAME: {'nic': right, 'bridged': False, - 'bootprot': 'dhcp'}} + 'bootproto': 'dhcp', + 'blockingdhcp': True}} status, msg = self.vdsm_net.setupNetworks(network, {}, NOCHK) self.assertEqual(status, SUCCESS, msg) @@ -1762,3 +1763,14 @@ bonds[BONDING_NAME] = {'remove': True} status, msg = self.vdsm_net.setupNetworks({}, bonds, NOCHK) self.assertEqual(status, SUCCESS, msg) + +@cleanupNet +@ValidateRunningAsRoot +def testHonorBlockingDhcp(self): +status, msg = self.vdsm_net.setupNetworks( +{NETWORK_NAME: {'bridged': True, 'bootproto': 'dhcp', +'blockingdhcp': True}}, {}, NOCHK) +# Without blocking dhcp, the setupNetworks command would return +# reporting success before knowing if dhclient succeeded. With blocking +# it must not report success +self.assertNotEqual(status, SUCCESS, msg) diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py index 2b3ebe6..98f6c10 100755 --- a/vdsm/configNetwork.py +++ b/vdsm/configNetwork.py @@ -225,7 +225,7 @@ ipv6addr=None, ipv6gateway=None, force=False, configurator=None, bondingOptions=None, bridged=True, _netinfo=None, qosInbound=None, qosOutbound=None, - defaultRoute=None, **options): + defaultRoute=None, blockingdhcp=False, **options): nics = nics or () if _netinfo is None: _netinfo = netinfo.NetInfo() @@ -283,7 +283,8 @@ bondingOptions, nics, mtu, ipaddr, netmask, gateway, bootproto, ipv6addr, ipv6gateway, defaultRoute=defaultRoute, _netinfo=_netinfo, -configurator=configurator, **options) +configurator=configurator, +blockingdhcp=blockingdhcp, **options) netEnt.configure(**options) configurator.configureLibvirtNetwork(network, netEnt, diff --git a/vdsm/netmodels.py b/vdsm/netmodels.py index f718670..de30c26 100644 --- a/vdsm/netmodels.py +++ b/vdsm/netmodels.py @@ -422,7 +422,7 @@ self.inet4 = inet4 self.inet6 = inet6 self.bootproto = bootproto -self.async = bootproto == 'dhcp' and blocking +self.async = bootproto == 'dhcp' and not blocking self.ipv6autoconf = ipv6autoconf self.dhcpv6 = dhcpv6 diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json index a7cc1fe..3140378 100644 --- a/vdsm_api/vdsmapi-schema.json +++ b/vdsm_api/vdsmapi-schema.json @@ -57,6 +57,10 @@ # @bootproto: #optional Interface autoconfiguration protocol (typically # 'dhcp' or 'static') # +# @blockingdhcp:#optional whether ifaces that have 'dhcp' as bootproto +# should wait to get an address before returning creation +# success. If not set, the default is False. +# # @bondingOptions: #optional A string of space-separated = pairs # # @qosInbound: #optional BandwidthParams for incoming traffic. @@ -68,7 +72,7 @@ {'type': 'NetworkOptions', 'data': {'*ipaddr': 'str', '*netmask': 'str', '*gateway': 'str', '*bootproto': 'str', '*bondingOptions', 's