Petr Horáček has posted comments on this change. Change subject: network: add 'default_route' parameter to DhcpClient ......................................................................
Patch Set 2: Verified+1 testSetupNetworksAddDelDhcp passed with Iproute2 configurator without loosing internet connectivity. We don't have to verify this with ifcfg while it's used only in Pyroute and Iproute. Default gw is not overwritten with DhcpClient('iface', default_route=False): > import sys > import time > > sys.path.append('/root/vdsm/lib') > sys.path.append('/root/vdsm/vdsm') > from network.configurators.dhclient import DhcpClient > > # prepare veth pair and run dnsmasq > !ip link add name veth_l type veth peer name veth_r > !ip -4 addr add dev veth_l 240.0.0.1/24 > !ip link set dev veth_l up > !dnsmasq --dhcp-authoritative -p 0 --dhcp-range=240.0.0.10,240.0.0.100,2m \ | --dhcp-option=3,240.0.0.254 --dhcp-option=6 -i veth_l -I lo --bind-dynamic \ | --dhcp-range=fdb3:84e5:4ff4:55e3::a,fdb3:84e5:4ff4:55e3::64,2m & > > # setup bridge > !brctl addbr br0 > !brctl addif br0 veth_r > !ip link set veth_r up > !ip link set br0 up > > # start dhclient with DEFROUTE=no > c = DhcpClient('br0', default_route=False) > c.start(False) > time.sleep(10) > !route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.122.1 0.0.0.0 UG 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 240.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 veth_l 240.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0 > c.shutdown() > > # start dhclient with DEFROUTE=yes > c = DhcpClient('br0', default_route=True) > c.start(False) > time.sleep(10) > !route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 240.0.0.254 0.0.0.0 UG 0 0 0 br0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 240.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 veth_l 240.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0 > c.shutdown() -- To view, visit https://gerrit.ovirt.org/43900 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia4c3a7c5598f2a7b10670415714d980113bc72ae Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček <phora...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ondřej Svoboda <osvob...@redhat.com> Gerrit-Reviewer: Petr Horáček <phora...@redhat.com> 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