Change get_root_helper_child_pid to stop when it finds cmd
get_root_helper_child_pid recursively finds the child of pid,
until it can no longer find a child. However, the intention is
not to find the deepest child, but to strip away root helpers.
For example 'sudo neutron-rootwrap x' is supposed to find the
pid of x. However, in cases 'x' spawned quick lived children of
its own (For example: ip / brctl / ovs invocations),
get_root_helper_child_pid returned those pids if called in
the wrong time.
Reviewed: https:/ /review. openstack. org/294798 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=fd93e19f2a4 15b3803700fc491 749daba01a4390
Committed: https:/
Submitter: Jenkins
Branch: master
commit fd93e19f2a415b3 803700fc491749d aba01a4390
Author: Assaf Muller <email address hidden>
Date: Fri Mar 18 16:29:26 2016 -0400
Change get_root_ helper_ child_pid to stop when it finds cmd
get_ root_helper_ child_pid recursively finds the child of pid, root_helper_ child_pid returned those pids if called in
until it can no longer find a child. However, the intention is
not to find the deepest child, but to strip away root helpers.
For example 'sudo neutron-rootwrap x' is supposed to find the
pid of x. However, in cases 'x' spawned quick lived children of
its own (For example: ip / brctl / ovs invocations),
get_
the wrong time.
Change-Id: I582aa5c931c8bf e57f49df6899445 698270bb33e
Closes-Bug: #1558819