Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: test_pidfile.sh lingering processes #7734

Merged
merged 1 commit into from Feb 25, 2016
Merged

tests: test_pidfile.sh lingering processes #7734

merged 1 commit into from Feb 25, 2016

Conversation

ghost
Copy link

@ghost ghost commented Feb 22, 2016

Using ps aux to find the process will only show part of the command line
and the $RUNID may be missing. Use pgrep instead.

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

Signed-off-by: Loic Dachary loic@dachary.org

@ghost ghost added bug-fix tests labels Feb 22, 2016
@ghost ghost assigned tchaikov Feb 22, 2016
@tchaikov
Copy link
Contributor

will review/test it tomorrow

@tchaikov
Copy link
Contributor

we are not able to pass the RUNID down to ceph-osd, so we can hardly identify the pid using pgrep. probably we can use lsof on the log file or the asok file to find out the daemon's PID. but the problem is, the lsof is provided by the "lsof" package which is not listed in our dependencies.

@ghost
Copy link
Author

ghost commented Feb 24, 2016

@tchaikov repushed an entirely different approach to the problem. What do you think ?

@tchaikov
Copy link
Contributor

@dachary i believe this is the last change we need before considering it done.

@tchaikov tchaikov assigned ghost and unassigned tchaikov Feb 24, 2016
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 <loic@dachary.org>
@ghost
Copy link
Author

ghost commented Feb 25, 2016

@tchaikov good catch ! I fixed it as suggested, it makes perfect sense.

@tchaikov tchaikov assigned tchaikov and unassigned ghost Feb 25, 2016
@tchaikov
Copy link
Contributor

tested using

make test-suite.log TEST_LOGS=test/test_pidfile.sh.log

test passed, and no lingering daemon found.

tchaikov added a commit that referenced this pull request Feb 25, 2016
tests: test_pidfile.sh lingering processes

Reviewed-by: Kefu Chai <kchai@redhat.com>
@tchaikov tchaikov merged commit 67aa66e into ceph:master Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants