Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48C1AC4727F for ; Tue, 29 Sep 2020 12:48:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF78D2083B for ; Tue, 29 Sep 2020 12:48:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601383717; bh=vbxzyR83QewFUg1q1jRuRlk5dC8cWidPMEgsft8BWtY=; h=Subject:From:To:Cc:Date:In-Reply-To:References:List-ID:From; b=ZZ99YHlxd6yE4jaQh2O9v9dT8Ja2YnEMj7ZjBzSI/aVHwEDxD/hJwgHQPogV+TEGp mWIOjrdPzvhRbXv+i8pWc2VhRK+Y2yBrPfDWbK1h0RG9PrxUmYNe83R1mSqBQGBBJs TBIv7gX3F6BWfARjVJ7U2Odz6OOMhJ1Zo8YeY6fk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730749AbgI2Msa (ORCPT ); Tue, 29 Sep 2020 08:48:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:57656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728632AbgI2MsZ (ORCPT ); Tue, 29 Sep 2020 08:48:25 -0400 Received: from tleilax.poochiereds.net (68-20-15-154.lightspeed.rlghnc.sbcglobal.net [68.20.15.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EF52A2083B; Tue, 29 Sep 2020 12:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601383704; bh=vbxzyR83QewFUg1q1jRuRlk5dC8cWidPMEgsft8BWtY=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=uxe5LwDD8tafghBMZvtk8OTB0hDt8VZQl0BMR/vme5RiI3yFT4TPb3jk8zWE+rwNk J4wV40ZXE6nN7wLOPXMWFoNp5PdnXGuO8BcHMFuA+3xFdPGN/sstIqQWZUYZ2zRGjn jgTmEMf60y02NJTyOQ96giwDpfwskn8I/Oq9pjJI= Message-ID: <3224feb0441327729dc777666c33042b4ced82a8.camel@kernel.org> Subject: Re: [RFC PATCH 0/4] ceph: fix spurious recover_session=clean errors From: Jeff Layton To: Ilya Dryomov , "Yan, Zheng" Cc: ceph-devel , Patrick Donnelly Date: Tue, 29 Sep 2020 08:48:22 -0400 In-Reply-To: References: <20200925140851.320673-1-jlayton@kernel.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org On Tue, 2020-09-29 at 12:58 +0200, Ilya Dryomov wrote: > On Tue, Sep 29, 2020 at 12:44 PM Yan, Zheng wrote: > > On Tue, Sep 29, 2020 at 4:55 PM Ilya Dryomov wrote: > > > On Tue, Sep 29, 2020 at 10:28 AM Yan, Zheng wrote: > > > > On Fri, Sep 25, 2020 at 10:08 PM Jeff Layton wrote: > > > > > Ilya noticed that he would get spurious EACCES errors on calls done just > > > > > after blocklisting the client on mounts with recover_session=clean. The > > > > > session would get marked as REJECTED and that caused in-flight calls to > > > > > die with EACCES. This patchset seems to smooth over the problem, but I'm > > > > > not fully convinced it's the right approach. > > > > > > > > > > > > > the root is cause is that client does not recover session instantly > > > > after getting rejected by mds. Before session gets recovered, client > > > > continues to return error. > > > > > > Hi Zheng, > > > > > > I don't think it's about whether that happens instantly or not. > > > In the example from [1], the first "ls" would fail even if issued > > > minutes after the session reject message and the reconnect. From > > > the user's POV it is well after the automatic recovery promised by > > > recover_session=clean. > > > > > > [1] https://tracker.ceph.com/issues/47385 > > > > Reconnect should close all old session. It's likely because that > > client didn't detect it's blacklisted. > > Sorry, I should have pasted dmesg there as well. It _does_ detect > blacklisting -- notice that I wrote "after the session reject message > and the reconnect". > Yep, this is pretty easy to reproduce too (as Ilya points out in the tracker). I'm open to other ways of smoothing this over. If we end up with a small window where errors can occur, then so be it, but I think we can probably do better than we have now. -- Jeff Layton