Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1366697

Summary: python-oslo-rootwrap: Handle renamed executables with KillFilter
Product: Red Hat OpenStack Reporter: Aaron Thomas <aathomas>
Component: python-oslo-rootwrapAssignee: Victor Stinner <vstinner>
Status: CLOSED ERRATA QA Contact: Shai Revivo <srevivo>
Severity: high Docs Contact:
Priority: high    
Version: 5.0 (RHEL 7)CC: apevec, dmaley, fdinitto, lhh, nlevinki, srevivo
Target Milestone: asyncKeywords: ZStream
Target Release: 5.0 (RHEL 7)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python-oslo-rootwrap-1.0.0-3.el7ost Doc Type: Bug Fix
Doc Text:
Cause, Consequence: After an upgrade of a service, oslo.rootwrap is unable to stop the service anymore because the executable was replaced (renamed). Fix: Handle renamed executables: use /proc/$pid/cmdline if it exists, instead of /proc/$pid/exe. Result: oslo.rootwrap is now able to stop properly a service after an upgrade, when the executable was replaced (renamed).
Story Points: ---
Clone Of:
: 1368473 1368475 1368476 (view as bug list) Environment:
Last Closed: 2016-08-24 14:49:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1368473, 1368475, 1368476    

Description Aaron Thomas 2016-08-12 15:26:03 UTC
Description of problem:
-----------------------------------------
A running process may refer to a renamed executable
referenced by /proc/$pid/exe, which happens with
updated executables on RPM based systems.
In that case we defer to the path in /proc/$pid/cmdline
if it exists.

Cisco is reporting after upgrading rpms they have to clean up stale pids around the neutron dhcp agent service and requesting a backport upstream python-oslo-rootwrap fix to OSP-5 (Icehouse) which was fixed in python-oslo-rootwrap 2.3.0 currently we ship in OSP-8 (Liberty), see additional details for the specific upstream merged commit. 
 

Version-Release number of selected component (if applicable):
-----------------------------------------
python-oslo-rootwrap-1.0.0-2

How reproducible:
-----------------------------------------
100% in customers environment

Steps to Reproduce:
-----------------------------------------
1. Update an rpm.

2. A running process refers to a renamed executable referenced by /proc/$pid/exe triggering the KillFilter error.

3. The neutron-dhcp-agent.service's pids are in a stale state requiring clean up. 

Actual results:
-----------------------------------------
The customer reports after upgrading rpms they have to clean up stale pids around the neutron dhcp agent service.

Expected results:
------------------------------------------
Oslo Rootwrap should in the case of an rpm upgrade defer to the path in /proc/$pid/cmdline if it exists. 


Additional info:
-----------------------------------------
Upstream merged commit for liberty:


Handle renamed executables with KillFilter
-----------------------------------------
https://review.openstack.org/#/c/210541/3

Comment 4 Victor Stinner 2016-08-19 12:55:59 UTC
python-oslo-rootwrap-1.0.0-3.el7ost backports fix from OpenStack Newton to handle correctly upgraded or deleted executable.

Comment 9 errata-xmlrpc 2016-08-24 14:49:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-1771.html