summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-03-30 00:28:24 +0000
committerGerrit Code Review <review@openstack.org>2012-03-30 00:28:24 +0000
commit7bd863faf454a19c8e1caac556cefaf24722887d (patch)
tree0598e3cdcd5655d82a81590d35684ed7b6d6aebc
parent3b415162bd3c523a408525e763503184d5910a26 (diff)
parentb24c11b4c390d6315efed595d1f92c2df6602bec (diff)
downloadnova-7bd863faf454a19c8e1caac556cefaf24722887d.tar.gz
nova-7bd863faf454a19c8e1caac556cefaf24722887d.tar.xz
nova-7bd863faf454a19c8e1caac556cefaf24722887d.zip
Merge "Update KillFilter to handle 'deleted' exe's."
-rwxr-xr-xnova/rootwrap/filters.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/rootwrap/filters.py b/nova/rootwrap/filters.py
index a8fd5139b..566c03b56 100755
--- a/nova/rootwrap/filters.py
+++ b/nova/rootwrap/filters.py
@@ -117,6 +117,9 @@ class KillFilter(CommandFilter):
return False
try:
command = os.readlink("/proc/%d/exe" % int(args[1]))
+ # NOTE(dprince): /proc/PID/exe may have ' (deleted)' on
+ # the end if an executable is updated or deleted
+ command = command.rstrip(" (deleted)")
if command not in self.args[1]:
# Affected executable not in accepted list
return False