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

rbd-nbd: restart parent process logger after forking #12222

Merged
merged 1 commit into from Dec 1, 2016

Conversation

dillaman
Copy link

Fixes: http://tracker.ceph.com/issues/18070
Signed-off-by: Jason Dillaman dillaman@redhat.com

Fixes: http://tracker.ceph.com/issues/18070
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
@dillaman dillaman added this to the kraken milestone Nov 29, 2016
@@ -493,8 +493,9 @@ static int do_map()
}

if (forker.is_parent()) {
global_init_postfork_start(g_ceph_context);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can move this line out above if (forker.is_parent()) block, so it always gets called after fork()? and remove the call at line 636 in the if (g_conf->daemonize) block. so both child and parent's logger can be started, and can be stopped properly by the dtor of g_ceph_context?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The daemon process fails if you do that -- this is what works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i tested the proposed using rbd-nbd map rbd, it does not crash. maybe i am missing something?

Copy link
Author

@dillaman dillaman Nov 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crashing is one thing (which should have been tested before the breaking commit was merged), but passing all the tests is another (rbd-nbd workunit and fsx in nbd mode).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me both versions look working. Anyway, I think the current initialization code in do_map already a bit confusing and it would be nice to try clean it up (as a separate PR, I could try this), so now any version that just fixes the issue could be ok.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dillaman oic! i will try to run the rbd tests next time when i am touching rbd related code.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tchaikov Thanks! Yes, please changes to RBD should be tested and reviewed.

@trociny trociny self-assigned this Nov 30, 2016
trociny pushed a commit that referenced this pull request Nov 30, 2016
rbd-nbd: restart parent process logger after forking #12222
@trociny trociny removed their assignment Nov 30, 2016
@trociny trociny merged commit 0c078b0 into ceph:master Dec 1, 2016
@dillaman dillaman deleted the wip-18070 branch December 1, 2016 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants