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

msgr: set close on exec flag #9772

Merged
merged 2 commits into from Jul 4, 2016
Merged

Conversation

tchaikov
Copy link
Contributor

mds execv() when handling the "respawn" command, to avoid fd leakage,
and enormous CLOSE_WAIT connections after respawning, we need to set
FD_CLOEXEC flag for the socket fds.

Signed-off-by: Kefu Chai kchai@redhat.com

@yuyuyu101
Copy link
Member

lgtm

@@ -63,6 +63,11 @@ int Accepter::bind(const entity_addr_t &bind_addr, const set<int>& avoid_ports)
return -errno;
}

if (set_close_on_exec(listen_sd)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

please move this change to another commit.

Copy link
Contributor Author

@tchaikov tchaikov Jun 17, 2016

Choose a reason for hiding this comment

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

done.

@tchaikov
Copy link
Contributor Author

@ukernel do you think if mds "respawn" is an unusual case or not? if yes, i will file a tracker ticket and backport this changeset to jewel after it gets merged.

mds execv() when handling the "respawn" command, to avoid fd leakage,
and enormous CLOSE_WAIT connections after respawning, we need to set
FD_CLOEXEC flag for the socket fds.

Fixes: http://tracker.ceph.com/issues/16390
Signed-off-by: Kefu Chai <kchai@redhat.com>
mds execv() when handling the "respawn" command, to avoid fd leakage,
and enormous CLOSE_WAIT connections after respawning, we need to set
FD_CLOEXEC flag for the socket fds.

Fixes: http://tracker.ceph.com/issues/16390
Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov
Copy link
Contributor Author

tchaikov commented Jul 2, 2016

rebased against master

@tchaikov tchaikov merged commit ed47363 into ceph:master Jul 4, 2016
@tchaikov tchaikov deleted the wip-close-on-exec branch July 4, 2016 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants