From: Xiubo Li Subject: Re: [PATCH] ceph: show more detail logs during mount Date: Wed, 26 Feb 2020 08:58:00 +0800 Message-ID: References: <20200225033013.4832-1-xiubli@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:45142 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729277AbgBZA6Q (ORCPT ); Tue, 25 Feb 2020 19:58:16 -0500 In-Reply-To: Content-Language: en-US Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Ilya Dryomov Cc: Jeff Layton , Sage Weil , "Yan, Zheng" , Patrick Donnelly , Ceph Development On 2020/2/25 18:39, Ilya Dryomov wrote: > On Tue, Feb 25, 2020 at 4:30 AM wrote: >> From: Xiubo Li >> >> Print the logs in error level to give a helpful hint to make it >> more user-friendly to debug. >> >> URL: https://tracker.ceph.com/issues/44215 >> Signed-off-by: Xiubo Li >> --- >> fs/ceph/super.c | 8 ++++++-- >> net/ceph/mon_client.c | 2 ++ >> 2 files changed, 8 insertions(+), 2 deletions(-) >> >> diff --git a/fs/ceph/super.c b/fs/ceph/super.c >> index c7f150686a53..e33c2f86647b 100644 >> --- a/fs/ceph/super.c >> +++ b/fs/ceph/super.c >> @@ -905,8 +905,10 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, >> fsc->mount_options->server_path + 1 : ""; >> >> err = __ceph_open_session(fsc->client, started); >> - if (err < 0) >> + if (err < 0) { >> + pr_err("mount joining the ceph cluster fail %d\n", err); >> goto out; >> + } >> >> /* setup fscache */ >> if (fsc->mount_options->flags & CEPH_MOUNT_OPT_FSCACHE) { >> @@ -922,6 +924,8 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc, >> root = open_root_dentry(fsc, path, started); >> if (IS_ERR(root)) { >> err = PTR_ERR(root); >> + pr_err("mount opening the root directory fail %d\n", >> + err); > Hi Xiubo, > > Given that these are new user-level filesystem log messages, they > should probably go into fs_context log. Yeah, will fix it. > >> goto out; >> } >> fsc->sb->s_root = dget(root); >> @@ -1079,7 +1083,7 @@ static int ceph_get_tree(struct fs_context *fc) >> >> out_splat: >> if (!ceph_mdsmap_is_cluster_available(fsc->mdsc->mdsmap)) { >> - pr_info("No mds server is up or the cluster is laggy\n"); >> + pr_err("No mds server is up or the cluster is laggy\n"); >> err = -EHOSTUNREACH; >> } > If you are changing this one, it should be directed to fs_context log > as well. Will do it. >> diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c >> index 9d9e4e4ea600..6f1372f5f2a7 100644 >> --- a/net/ceph/mon_client.c >> +++ b/net/ceph/mon_client.c >> @@ -1179,6 +1179,8 @@ static void handle_auth_reply(struct ceph_mon_client *monc, >> >> if (ret < 0) { >> monc->client->auth_err = ret; >> + pr_err("authenticate fail on mon%d %s\n", monc->cur_mon, >> + ceph_pr_addr(&monc->con.peer_addr)); > I don't think this is needed. Authentication errors are already logged > in ceph_handle_auth_reply(). Yeah, it is, here just want to give more messages, such as the monX. But it is not necessary. So I will delete it. Thanks Ilya. BRs > Thanks, > > Ilya >