linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@redhat.com>
To: Olga Kornievskaia <aglo@umich.edu>
Cc: Olga Kornievskaia <kolga@netapp.com>,
	linux-nfs <linux-nfs@vger.kernel.org>,
	ng-linux-team <ng-linux-team@netapp.com>
Subject: Re: nfsd issue with a kerberized callback
Date: Thu, 19 Apr 2018 11:52:50 -0400	[thread overview]
Message-ID: <20180419155250.GA578@parsley.fieldses.org> (raw)
In-Reply-To: <CAN-5tyEW+vZ1gYeP8zey1SkvuzXsJwdmrG=ZEXi6XXEVNM9Z_w@mail.gmail.com>

On Thu, Apr 19, 2018 at 11:10:06AM -0400, Olga Kornievskaia wrote:
> On Tue, Apr 17, 2018 at 9:21 AM, J. Bruce Fields <bfields@redhat.com> wrote:
> > On Mon, Apr 16, 2018 at 08:05:44PM -0400, Olga Kornievskaia wrote:
> >> > On Apr 16, 2018, at 5:29 PM, J. Bruce Fields <bfields@redhat.com> wrote:
> >> >> I believe what’s happening is that because the client hasn’t received
> >> >> CB_NULL that establishes a callback channel but got a CB_RECALL it’s
> >> >> just ignoring it.
> >> >
> >> > I see two succesful CB_NULL calls and replies, so I think the context
> >> > establishment worked.  I don't know why there's a third CB_NULL in frame
> >> > 285.
> >>
> >> The two CB_NULL calls are both gss_init calls. They are not RPC NULL call. Server for some reason establishes 2 different gss context (again not necessarily a problem). The 3rd CB_NULL is gss_data and it sends an actual NULL call. I believe that’s the one that establishes a callback channel.
> >
> > Oh, I see.  No, that NULL call isn't necessary.  It's just the server
> > probing to see whether the callback channel works.  That NULL call isn't
> > required by the spec and everything should still work if the CB_RECALL
> > is sent out before it completes.
> 
> Ok thank you. Another question: can the nfsd decide to give out
> delegation regardless of the existence of the callback path? Looking
> at the nfsd open code I see that it checks if cl_cb_state is
> NFSD4_CB_UP. But I guess somehow (according to this trace), it finds
> it up? Any ideas, looks like a bug...

That CB_NULL isn't required by the spec and the lack of it shouldn't
bother the client.  But, yes, you're right, I think it's still a bug if
the server's giving out a delegation before it returns, in the NFSv4.0
case.  There are so many ways the NFSv4.0 callback connection can fail
(firewalls, NAT, gss configuration...) that I'd rather not assume it's
up.

So, I agree, it's a bug, it just doesn't necessarily explain what's
going wrong here.

> On this particular network trace, in frame 240, the server gives out
> the read delegation (which is later on it's trying to recall). However
> the setup of the callback path(s) doesn't happen until frames 259/261
> (tcp connections are established starting from frames 253/256).
> 
> Goal is to try and reproduce this problem where the client is failing
> the CB_RECALL... but so far I can't trigger this.
> 
> Also I figured out why there are 2 SETCLIENTIDs and it's not because
> of the 2 mounts (with unmount in the middle). First SETCLIENTID is
> trunking discovery. Second SETCLIENTID is for when client is trying to
> do an operation requiring a clientid. Therefore this leads to
> existence of 2 callback paths (ie 2 CB_NULL gss context
> establishment). I'm not sure if this is somehow incorrect that client
> provides 2 callback path and server establishes context for both.

When I looked I think I saw that the second SETCLIENTID/CONFIRM uses the
same callback info as the first.  So the server shouldn't need to do
anything.  But it may actually close the connection and open a new one,
which is unnecessary but not necessarily wrong.  But if it's keeping two
connections around and trying to use both then something's definitely
misbehaving.

--b.

      reply	other threads:[~2018-04-19 15:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-16 19:48 nfsd issue with a kerberized callback Olga Kornievskaia
2018-04-16 21:29 ` J. Bruce Fields
2018-04-17 13:08   ` Olga Kornievskaia
     [not found]   ` <EC52DFFD-CB6F-45F5-BAB9-C684C205DE26@netapp.com>
2018-04-17 13:21     ` J. Bruce Fields
2018-04-19 15:10       ` Olga Kornievskaia
2018-04-19 15:52         ` J. Bruce Fields [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180419155250.GA578@parsley.fieldses.org \
    --to=bfields@redhat.com \
    --cc=aglo@umich.edu \
    --cc=kolga@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=ng-linux-team@netapp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).