yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #24689
[Bug 1153751] Re: invoking nova/utils.py's "execute" with check_exit_code=False causes problem in nova-network
This bug is very old and the code has changed significantly since this
was filed. If this is still valid in Icehouse or later please reopen.
** Changed in: nova
Status: Confirmed => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1153751
Title:
invoking nova/utils.py's "execute" with check_exit_code=False causes
problem in nova-network
Status in OpenStack Compute (Nova):
Invalid
Bug description:
version: essex
In nova/network/linux_net.py, there are six invocations of
nova/utils.py's "execute" function with "check_exit_code=False." Our
experiences show that this pattern is problematic. Specifically, the
process executing a given command may exit unexpectedly.
All examples below are related to nova/network/linux_net.py.
Example 1:
In function "ensure_bridge" of class "LinuxBridgeInterfaceDriver," a command "brctl addif" is executed without checking the exit code. The parent process calling "_execute" cannot know whether the execution of "brctl addif" succeeds. This can cause a bridge and a NIC to remain dissociated.
Example 2:
In function "_device_exists," if the execution of "ip link show dev [device]" fails unexpectedly, then neither stdout nor stderr contains any data. According to the logic in "_device_exists," such a fault would lead the caller of "_device_exists" to think that the device in question exists, which may not be the case.
Example 3:
In function "restart_dhcp," if the execution of "cat /proc/[pid]/cmdline" fails unexpectedly, then there may be no data in the stdout, which in turn will cause the caller to believe that a dnsmasq instance has crashed and a new instance should be started, while in fact the existing dnsmasq instance works properly.
The rest occurrences of "check_exit_code=False" raises similar issues.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1153751/+subscriptions