Skip to content

Commit

Permalink
Do not invoke kill dnsmasq if no pid file was found.
Browse files Browse the repository at this point in the history
fixes Bug 943690

Change-Id: I2b1f5cc66ba6ef02219c0d4445487bdd3a541f4b
  • Loading branch information
jc-martin committed Mar 2, 2012
1 parent 31b0e17 commit dab9de9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Authors
Expand Up @@ -76,6 +76,7 @@ James E. Blair <jeblair@hp.com>
Jason Cannavale <jason.cannavale@rackspace.com>
Jason Koelker <jason@koelker.net>
Jay Pipes <jaypipes@gmail.com>
JC Martin <jcmartin@ebaysf.com>
Jesse Andrews <anotherjesse@gmail.com>
Jimmy Bergman <jimmy@sigint.se>
Joe Gordon <jogo@cloudscaling.com>
Expand Down
3 changes: 2 additions & 1 deletion nova/network/linux_net.py
Expand Up @@ -682,7 +682,8 @@ def update_dhcp_hostfile_with_text(dev, hosts_text):

def kill_dhcp(dev):
pid = _dnsmasq_pid_for(dev)
_execute('kill', '-9', pid, run_as_root=True)
if pid:
_execute('kill', '-9', pid, run_as_root=True)


# NOTE(ja): Sending a HUP only reloads the hostfile, so any
Expand Down

0 comments on commit dab9de9

Please sign in to comment.