kill_dhcp fails if dnsmasq is not running
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
JC Martin |
Bug Description
in nova/network/
If dnsmasq is not running, the following line :
pid = _dnsmasq_
returns NONE.
Since
_execute('kill', '-9', pid, run_as_root=True)
doesn't check for None, this cause the following exception:
Command: sudo nova-rootwrap kill -9 None
Exit code: 99
Stdout: 'Unauthorized command: kill -9 None\n'
Stderr: ''
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/
(nova): TRACE: main()
(nova): TRACE: File "/usr/bin/
(nova): TRACE: fn(*fn_args, **fn_kwargs)
(nova): TRACE: File "/usr/bin/
(nova): TRACE: fixed_range, uuid)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: self.driver.
(nova): TRACE: File "/usr/lib/
(nova): TRACE: _execute('kill', '-9', pid, run_as_root=True)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: return utils.execute(*cmd, **kwargs)
(nova): TRACE: File "/usr/lib/
(nova): TRACE: cmd=' '.join(cmd))
(nova): TRACE: ProcessExecutio
(nova): TRACE: Command: sudo nova-rootwrap kill -9 None
(nova): TRACE: Exit code: 99
(nova): TRACE: Stdout: 'Unauthorized command: kill -9 None\n'
(nova): TRACE: Stderr: ''
(nova): TRACE:
simple fix is:
def kill_dhcp(dev):
pid = _dnsmasq_
if pid is not None:
Changed in nova: | |
milestone: | none → essex-rc1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | essex-rc1 → 2012.1 |
Are you sure you are running the latest version of Nova ?