Edward Haas has uploaded a new change for review. Change subject: net: dhclient - address flush before starting and on shutdown ......................................................................
net: dhclient - address flush before starting and on shutdown Change-Id: I6e72f2aeb9f557a4cef49200fe195e6879490dcc Signed-off-by: Edward Haas <edwa...@redhat.com> --- M lib/vdsm/network/ip/dhclient.py 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/63088/1 diff --git a/lib/vdsm/network/ip/dhclient.py b/lib/vdsm/network/ip/dhclient.py index 6f60e65..4f76bed 100644 --- a/lib/vdsm/network/ip/dhclient.py +++ b/lib/vdsm/network/ip/dhclient.py @@ -32,6 +32,8 @@ from vdsm.commands import execCmd from vdsm.utils import CommandPath, memoized, pgrep, kill_and_rm_pid +from . import address + DHCLIENT_BINARY = CommandPath('dhclient', '/sbin/dhclient') DHCLIENT_CGROUP = 'vdsm-dhclient' LEASE_DIR = '/var/lib/dhclient' @@ -62,6 +64,8 @@ def _dhclient(self): if iface.exists(self.iface): kill(self.iface, self.family) + address.flush(self.iface, family=self.family) + cmd = [DHCLIENT_BINARY.cmd, '-%s' % self.family, '-1', '-pf', self.pidFile, '-lf', self.leaseFile] cmd += ['-R', DhcpClient.DEFAULT_REQ_OPTIONS] @@ -91,7 +95,10 @@ else: raise else: + logging.info('Stopping dhclient/%s on %s', self.family, self.iface) kill_and_rm_pid(pid, self.pidFile) + if iface.exists(self.iface): + address.flush(self.iface) def kill(device_name, family=4): -- To view, visit https://gerrit.ovirt.org/63088 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6e72f2aeb9f557a4cef49200fe195e6879490dcc Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas <edwa...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org