Project

General

Profile

Bug #14834

test_pidfile.sh leave two osd daemon running after unittest

Added by shun song almost 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

not killed two daemons comes out at line 90 and line 73 in test_pidfile.sh. The detail description is seen at https://github.com/ceph/ceph/pull/7463.

solution is attached by file, preview as follows:

diff test/test_pidfile.sh.old test/test_pidfile.sh.new 
34a35,38

kill_daemons $dir TERM osd.0 || return 1
! test -f $dir/osd.0.pid || return 1
./ceph-osd -i 0 --osd-data=$dir/0 --osd-journal=$dir/0/journal--pid-file= --daemonize=$RUNID || { teardown_unexist_pidfile $dir $RUNID; return 1; }
! test -f $dir/osd.0.pid || return 1

94a99

cp $dir/osd.0.pid $dir/osd.0.pid.old

test_pidfile.sh View (3.33 KB) shun song, 02/22/2016 02:39 AM

Associated revisions

Revision c1e1c8d1 (diff)
Added by Loic Dachary almost 7 years ago

tests: test_pidfile.sh lingering processes

For the mon, using ps aux to find the process will only show part of the
command line and the $RUNID may be missing. For the OSD, the $RUNID is
passed using an environment variable and will not show at all.

There is no need to test both ceph-osd and ceph-mon since they both end
up in the same code path, pidfile_write. Add a log line that only shows
when the --pid-file is empty and grep for it in the simplest possible
way.

The TEST_pidfile test failed to kill a process because there was
no pidfile with its pid. This is fixed by backuping the pidfile before
it is modified.

http://tracker.ceph.com/issues/14834 Fixes: #14834

Signed-off-by: Loic Dachary <>

History

#1 Updated by Loïc Dachary almost 7 years ago

  • Status changed from New to Fix Under Review

#2 Updated by Loïc Dachary over 6 years ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF