Commit 9a47630a authored by Zuul's avatar Zuul Committed by Gerrit Code Review

Merge "Find .d pid files with swift-orphans"

parents d103de57 e6e31410
...@@ -53,7 +53,7 @@ Example (sends SIGTERM to all orphaned Swift processes older than two hours): ...@@ -53,7 +53,7 @@ Example (sends SIGTERM to all orphaned Swift processes older than two hours):
for root, directories, files in os.walk(options.run_dir): for root, directories, files in os.walk(options.run_dir):
for name in files: for name in files:
if name.endswith('.pid'): if name.endswith(('.pid', '.pid.d')):
pids.append(open(os.path.join(root, name)).read().strip()) pids.append(open(os.path.join(root, name)).read().strip())
pids.extend(subprocess.Popen( pids.extend(subprocess.Popen(
['ps', '--ppid', pids[-1], '-o', 'pid', '--no-headers'], ['ps', '--ppid', pids[-1], '-o', 'pid', '--no-headers'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment