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

msg: client bind #12901

Merged
merged 4 commits into from Jan 23, 2017

Conversation

Projects
None yet
5 participants
@yuyuyu101
Member

yuyuyu101 commented Jan 12, 2017

No description provided.

@yuyuyu101

This comment has been minimized.

Member

yuyuyu101 commented Jan 12, 2017

refactor from #7256

@yuyuyu101

This comment has been minimized.

Member

yuyuyu101 commented Jan 12, 2017

we also met this problem when public and cluster are different net but can be interconnect. when injecting public network fault, it will cause mon electing always and osd false down

yuyuyu101 added some commits Nov 16, 2016

osd: separate hb client messenger to public and cluster
Signed-off-by: Haomai Wang <haomai@xsky.com>
test/TestOSDScrub: add ms to suite OSD construct change
Signed-off-by: Haomai Wang <haomai@xsky.com>
msgr: add client_bind to allow client messenger save ip
Signed-off-by: Haomai Wang <haomai@xsky.com>

@liewegas liewegas changed the title from Wip msgr client bind to msg: client bind Jan 12, 2017

@@ -859,6 +859,18 @@ ssize_t AsyncConnection::_process_connection()
cs.close();
}
{
entity_addr_t addr2bind = msgr->get_myaddr();
if (msgr->cct->ms_bind_before_connect && (!addr2bind.is_blank_ip())) {

This comment has been minimized.

@liewegas

liewegas Jan 12, 2017

Member

get_myaddr() returns by reference, right? can use it directly instead of copying the value to addr2bind

This comment has been minimized.

@liewegas

liewegas Jan 12, 2017

Member

eh, i guess if we have this option enabled by default it doesn't matter

This comment has been minimized.

@yuyuyu101

yuyuyu101 Jan 12, 2017

Member

we will modify addr2bind, so nonreference is suitable

@liewegas

This comment has been minimized.

Member

liewegas commented Jan 12, 2017

/home/jenkins-build/build/workspace/ceph-pull-requests/src/msg/simple/Pipe.cc: In member function ‘int Pipe::accept()’:
/home/jenkins-build/build/workspace/ceph-pull-requests/src/msg/simple/Pipe.cc:361:20: error: ‘class CephContext’ has no member named ‘ms_bind_before_connect’
     if (msgr->cct->ms_bind_before_connect && (!addr2bind.is_blank_ip())) {
                    ^
@yuyuyu101

This comment has been minimized.

Member

yuyuyu101 commented Jan 12, 2017

retest this please

@@ -563,6 +573,9 @@ int main(int argc, const char **argv)
r = ms_hb_front_server->bind(hb_front_addr);
if (r < 0)
exit(1);
r = ms_hb_front_client->client_bind(hb_back_addr);

This comment has been minimized.

@yuyuyu101

yuyuyu101 Jan 17, 2017

Member

@yuriw sorry, I have a mistake. you may need to update this pr to branch and schedule qa

msg: add ms_bind_before_connect to bind before connect
Signed-off-by: Zengran Zhang <zhangzengran@h3c.com>
Signed-off-by: Haomai Wang <haomai@xsky.com>

@yuriw yuriw merged commit f9f9b63 into ceph:master Jan 23, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@yuyuyu101 yuyuyu101 deleted the yuyuyu101:wip-msgr-client-bind branch Jan 24, 2017

{
lock.Lock();
if (did_bind) {
assert(my_inst.addr == bind_addr);

This comment has been minimized.

@Liuchang0812

Liuchang0812 Feb 6, 2017

Contributor

seems that miss lock.Unlock() ?

This comment has been minimized.

@yuyuyu101

yuyuyu101 Feb 6, 2017

Member

good catch

@dillaman

This comment has been minimized.

Contributor

dillaman commented May 23, 2017

It looks like this will break librados functionality when used behind a NAT since it learns the address of the gateway and then attempts to bind using it instead of its local IP address [1].

[1] http://tracker.ceph.com/issues/20049

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment