From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DFBFC433EF for ; Fri, 25 Mar 2022 12:02:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356409AbiCYMEN (ORCPT ); Fri, 25 Mar 2022 08:04:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344291AbiCYMEM (ORCPT ); Fri, 25 Mar 2022 08:04:12 -0400 Received: from mail-vk1-xa34.google.com (mail-vk1-xa34.google.com [IPv6:2607:f8b0:4864:20::a34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C012AD4C92 for ; Fri, 25 Mar 2022 05:02:38 -0700 (PDT) Received: by mail-vk1-xa34.google.com with SMTP id w123so4106797vkg.7 for ; Fri, 25 Mar 2022 05:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1eUbx1Pdc/s/6DST5Wdsu/HaXlFiszD/xbQXUyI3F/A=; b=jiyJOrTBWHo+az//mLN7RlqOP1Ra6k/xQtwL9VIp7Z1NXh2GncanUf7LxuaNJ17WdT jB8KG78gdIZstyjHhJCvVBJJsZ4qxBGO1ZP1xc7N3vpTcDwA8iQhHieXjmiQaFM2pzSX XZ89Dui4JGHioxwmgip3msewQZ01vMMQMhdRyq97oEUqj70a6rOqrpmliREa4YBj2B0A nyg8x7VhQ+BG69KC8rFqMyEdpwXmjMzpi6SfGP3RytvOQCVRyvELZ+E9hdEksC+qPp9f qMPSrr9M/LPDRSP0har0Jqh99VxvbXlTUwyiIJm+5k6TMUJrYMxI38cdT8LBQvloM9s3 WHrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1eUbx1Pdc/s/6DST5Wdsu/HaXlFiszD/xbQXUyI3F/A=; b=pMIxGxIu3++Ech7iLhtyNoNYuCZXbPhr8LfnFambX925R0qC6S1WfCxjLqeTSnKUtQ UyJYiooW/qQlvMcdUQzdHdTdfXHmVvxJxniYembnBlhoYI0YTRG1MDUYrNSetbwRWB3s ydL/jHpnh28UIxfcXtd86WhUuWnYjiDkh4TPuNd3ETfn5qGm8GI2MW9qcB990caf698P anIFtSf8kq37l5ia0grlfblRXbYksodBa4SW8k67yPuZVRdwcBprj+3AfHye8ejY2kcw p4Qk2OQRclVlVKfyXAxo+yMRI52fAvxCOJDx5+gppaWDHF5ysodZep0Sh2iXcYZ7Vhhg 542w== X-Gm-Message-State: AOAM532PxkBq88YEY5waFbMP6tg4tbZpqttNzCSSqwmqirKWbDyy9rWk quZ6AxPcZk+lIuYyBRYLJR9ijIBCQYoASE3YdXk= X-Google-Smtp-Source: ABdhPJy1a1HrEoxINOYWV1t11XjPMt8tyOk/LMe3L8/zZxIyRqMNeg8hmbhKZZPRpPjV+D/SNsM8rIJIlNA5vlmCoPY= X-Received: by 2002:a05:6122:8c8:b0:32a:7010:c581 with SMTP id 8-20020a05612208c800b0032a7010c581mr4733296vkg.32.1648209757259; Fri, 25 Mar 2022 05:02:37 -0700 (PDT) MIME-Version: 1.0 References: <050545f4-ff14-9d18-d323-850e06f61745@cybozu.co.jp> In-Reply-To: From: Ilya Dryomov Date: Fri, 25 Mar 2022 13:03:11 +0100 Message-ID: Subject: Re: [PATCH v2] libceph: print fsid and client gid with mon id and osd id To: Satoru Takeuchi Cc: Daichi Mukai , Ceph Development Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org On Fri, Mar 25, 2022 at 3:54 AM Satoru Takeuchi wrote: > > Hi Ilya > > > >>> Hi Daichi, > > >>> > > >>> I would suggest two things: > > >>> > > >>> 1) Leave dout messages alone for now. They aren't shown by default and > > >>> are there for developers to do debugging. In that setting, multiple > > >>> clusters or client instances should be rare. > > >> > > >> Sure, I'll leave dout messages alone. > > >> > > >>> 2) For pr_info/pr_warn/etc messages, make the format consistent and > > >>> more grepable, e.g. > > >>> > > >>> libceph ( ): > > >>> > > >>> libceph (ef1ab157-688c-483b-a94d-0aeec9ca44e0 4181): osd10 down > > >>> > > >>> as I suggested earlier. Sometimes printing just the fsid, sometimes > > >>> the fsid and the gid and sometimes none is undesirable. > > >> > > >> Let me confirm two points: > > >> > > >> - For consistency, should all pr_info/pr_warn/etc messages in libceph > > >> uses format with fsid and gid? Or does your suggestion means messages > > >> with osd or mon id (i.e. messages which I had edited in this patch) > > >> should have consistent format? > > > > > > Definitely not all messages. I'd start with those that are most common > > > and that _you_ think are important to distinguish between. Whether mon > > > or osd id is included is probably irrelevant. > > > > > > The reason I'm deferring to you here is that I haven't seen this come > > > up as an issue. 99% of users would connect to a single Ceph cluster > > > (which means a single fsid) with a single libceph instance (which means > > > a single gid). > > > > > > But consistency is very important, so IMO a particular message should > > > either be not touched at all or be converted to a consistent format. > > > > > >> > > >> - What should be displayed if fsid or gid cannot be obtained? For example, > > >> we may not know fsid yet when establishing session with mon. Also, > > >> decode_new_up_state_weight() outputs message like "osd10 down" etc, but > > >> it seems not easy to get client gid within this function. This is why > > >> there are sometimes fsid only and sometimes gid only and sometimes both > > >> in my patch. > > > > > > For when the mon session is being established, do nothing (i.e. > > > leave existing messages as is). For after the fsid and gid become > > > known, either convert to a consistent format with both fsid and gid or > > > do nothing if the message isn't important. If this causes too much > > > code churn because of additional parameters being passed around, we may > > > need to reconsider whether this change is worth it at all. > > > > Thank you for your kind comments. They are very helpful for me. I'll think > > again about when fsid and gid in the logs are useful. > > > > Daichi > > There are multiple Ceph clusters in our system. A cluster provides RBD > on top of HDD > and another cluster provides RBD on top of SSD. All Ceph(more > precisely, Rook/Ceph) > clusters are in one Kubernetes cluster. Many types of > applications(Pods) can co-exist > for each node and there is not so special that an application consumes RBD(SSD) > and another application consumes RBD(HDD) are on the same node. In > this case, it's > very useful to distinguish from which cluster each kernel message comes. > > We've already encountered trouble that could have been solved earlier > if this fix is applied. > We encountered slow I/Os in an application using RBD(HDD) and found > that there were > some "OSD n down/up" messages. Then we took some time to confirm whether these > messages were related to the problem because there was another > application using RBD(SSD) > in the same node and it's hard to know these messages were about > RBD(HDD) cluster. > > What we really need for now is to clear from which "OSD n down/up" > messages come. > So, how about adding "libceph ( ):" prefix to these two > messages and don't touch > any other messages? Does it make sense? Hi Satoru, Sure, starting with just these two messages is fine with me but if I were you I would also cover the other three similar messages that may be reported while processing new osdmaps: osd down osd up + osd weight ... osd primary-affinity ... osd does not exist Thanks, Ilya