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

common: Update the error string when res_nsearch() or res_search() fails #15878

Merged
merged 1 commit into from Jul 7, 2017

Conversation

Projects
None yet
3 participants
@renhwztetecs
Member

renhwztetecs commented Jun 23, 2017

I don't know the abort information about DNS Resolver,
if not add "query_str".

2017-06-21 15:06:49.890097 7f56a7c20fc0 0 set uid:gid to 167:167 (ceph:ceph)
2017-06-21 15:06:49.890115 7f56a7c20fc0 0 ceph version 12.0.2.10-2-gd5e04f6 (d5e04f6afed7838703aea490ab7e68399abb4d25), process ceph-mgr, pid 47787
2017-06-21 15:06:49.890128 7f56a7c20fc0 0 pidfile_write: ignore empty --pid-file
2017-06-21 15:06:49.893929 7f56a7c20fc0 -1 res_search() failed

Signed-off-by: huanwen ren ren.huanwen@zte.com.cn

@renhwztetecs renhwztetecs requested a review from rjfd Jun 23, 2017

@@ -314,7 +314,7 @@ int DNSResolver::resolve_srv_hosts(CephContext *cct, const string& service_name,
}
#endif
if (len < 0) {
lderr(cct) << "res_search() failed" << dendl;
lderr(cct) << "res_search() failed" << query_str << dendl;

This comment has been minimized.

@joscollin

joscollin Jun 23, 2017

Member

Your part of the fix is good. But please check again:

#ifdef HAVE_RES_NQUERY

then it is not calling res_search(). So the text "res_search() failed" is not correct.

This comment has been minimized.

@renhwztetecs

renhwztetecs Jun 26, 2017

Member

whether or not increase "#ifdef__ HAVE_RES_NQUERY," will call res_search (), is not it, or are I misunderstood?

This comment has been minimized.

@joscollin

joscollin Jun 26, 2017

Member

@renhwztetecs I meant, len is not always getting the return value of res_search(). #ifdef HAVE_RES_NQUERY then it is getting the return value of res_nsearch(). So what do you think about the error message "res_search() failed" in your changes ?

This comment has been minimized.

@renhwztetecs

renhwztetecs Jun 26, 2017

Member

@joscollin
👍 I updated it

This comment has been minimized.

@joscollin

joscollin Jun 26, 2017

Member

@renhwztetecs The change is good. I think you can add a new variable to specify the function name that was failed also. Create a string like: res_search() failed for service or res_nsearch() failed for service. This would be in line (similar) with the previous message before the fix.

This comment has been minimized.

@renhwztetecs

renhwztetecs Jun 27, 2017

Member

@joscollin thanks for you advise
but I think I only focus on the contents of “query_str”, and can be consistent with the subsequent print, so I tend to modify the current way.

@liewegas liewegas added the needs-qa label Jun 27, 2017

@liewegas

This comment has been minimized.

Member

liewegas commented Jul 5, 2017

rebase?

common: add query_str when res_search() failed
I don't know the abort information about DNS Resolver,
if not add "query_str".

Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
@renhwztetecs

This comment has been minimized.

Member

renhwztetecs commented Jul 6, 2017

retest this please

@renhwztetecs

This comment has been minimized.

Member

renhwztetecs commented Jul 7, 2017

@liewegas rebased it

@joscollin joscollin changed the title from common: add query_str when res_search failed to common: Update the error string when res_nsearch() or res_search() fails Jul 7, 2017

@joscollin joscollin merged commit de48170 into ceph:master Jul 7, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment