All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeff Layton <jlayton@redhat.com>
Cc: linux-nfs@vger.kernel.org, nfsv4@linux-nfs.org
Subject: Re: [PATCH 3/5] nfs-utils: query for remote port using rpcbind instead of getaddrinfo
Date: Tue, 7 Apr 2009 19:16:06 -0400	[thread overview]
Message-ID: <20090407231606.GD28733@fieldses.org> (raw)
In-Reply-To: <20090407163019.4eae5367@tleilax.poochiereds.net>

On Tue, Apr 07, 2009 at 04:30:19PM -0400, Jeff Layton wrote:
> On Tue, 07 Apr 2009 16:01:31 -0400
> Tom Talpey <tmtalpey@gmail.com> wrote:
> > 
> > >
> > >I'd rather see these people just update their kernels so that this
> > >isn't needed...
> > 
> > Agreed. Would it make sense to log a message when the default 2049
> > is used? At least then, there's a chance an admin will know it's needed.
> > 
> 
> That's sounds reasonable. I've already asked Steve to commit the latest
> set, but we should be able to add something like this untested patch on
> top of it.
> 
> If it looks ok, I'll test it out and officially resend it...
> 
> Thoughts?

Would it work to do this in mount?--do the mount, then check any new
info file in rpc_pipefs to see if there's a port field?

Then we could give the error to the user where it's actually useful (as
output from the mount command).  And also maybe only bother with it when
port= was specified.

--b.

> 
> ----------------[snip]--------------------
> 
> >From 7ac66dd50eafec3db3c816203fc24b9b72ff1f36 Mon Sep 17 00:00:00 2001
> From: Jeff Layton <jlayton@redhat.com>
> Date: Tue, 7 Apr 2009 16:27:13 -0400
> Subject: [PATCH] nfs-utils: log warning when gssd detects an older kernel that doesn't send port in upcall
> 
> Older kernels don't send port information in the upcall. This could
> cause mounts to fail for mysterious reasons. Log a warning the first
> time that gssd encounters an upcall without any port information in it.
> 
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> ---
>  utils/gssd/gssd_proc.c |   12 +++++++++++-
>  1 files changed, 11 insertions(+), 1 deletions(-)
> 
> diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
> index 02239d2..90182b0 100644
> --- a/utils/gssd/gssd_proc.c
> +++ b/utils/gssd/gssd_proc.c
> @@ -99,6 +99,8 @@
>   *      and rescan the whole {pipefs_nfsdir} when this happens.
>   */
>  
> +static int warned_on_port_field;
> +
>  struct pollfd * pollarray;
>  
>  int pollsize;  /* the size of pollaray (in pollfd's) */
> @@ -228,8 +230,16 @@ read_service_info(char *info_file_name, char **servicename, char **servername,
>  	}
>  
>  	cb_port[0] = '\0';
> -	if ((p = strstr(buf, "port")) != NULL)
> +	if ((p = strstr(buf, "port")) != NULL) {
>  		sscanf(p, "port: %127s\n", cb_port);
> +	} else if (!warned_on_port_field) {
> +		warned_on_port_field = 1;
> +		printerr(0, "WARNING: This kernel does not send port info "
> +			    "in the upcall. That support was added in "
> +			    "upstream kernel version 2.6.24. Using "
> +			    "non-standard ports may not work with this "
> +			    "kernel.\n");
> +	}
>  
>  	/* check service, program, and version */
>  	if(memcmp(service, "nfs", 3)) return -1;
> -- 
> 1.6.0.6
> _______________________________________________
> NFSv4 mailing list
> NFSv4@linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/nfsv4

  reply	other threads:[~2009-04-07 23:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-07 15:25 [PATCH 0/5] nfs-utils: convert gssd to TI-RPC and add IPv6 support (try #4) Jeff Layton
2009-04-07 15:25 ` [PATCH 1/5] nfs-utils: make getnameinfo() required for --enable-gss Jeff Layton
2009-04-07 15:25 ` [PATCH 2/5] nfs-utils: store the address given in the upcall for later use Jeff Layton
2009-04-07 15:25 ` [PATCH 3/5] nfs-utils: query for remote port using rpcbind instead of getaddrinfo Jeff Layton
2009-04-07 16:02   ` Chuck Lever
2009-04-07 16:20     ` J. Bruce Fields
2009-04-07 16:29       ` Chuck Lever
2009-04-07 16:32         ` J. Bruce Fields
2009-04-07 16:34           ` Chuck Lever
2009-04-07 17:00             ` Jeff Layton
2009-04-07 17:12               ` Chuck Lever
2009-04-07 16:27     ` Tom Talpey
2009-04-07 16:32       ` Chuck Lever
2009-04-07 17:11       ` Jeff Layton
     [not found]         ` <20090407131151.69203e5e-RtJpwOs3+0O+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2009-04-07 19:43           ` Tom Talpey
2009-04-07 19:53             ` Jeff Layton
2009-04-07 20:01               ` Tom Talpey
     [not found]                 ` <49dbb129.02045a0a.023b.6bc7-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2009-04-07 20:30                   ` Jeff Layton
2009-04-07 23:16                     ` J. Bruce Fields [this message]
2009-04-07 23:27                       ` Jeff Layton
2009-04-07 23:14             ` J. Bruce Fields
2009-04-07 23:37               ` Jeff Layton
2009-04-08 19:32               ` Chuck Lever
2009-04-09 16:19                 ` J. Bruce Fields
2009-04-09 17:34                   ` Chuck Lever
2009-04-07 15:25 ` [PATCH 4/5] nfs-utils: switch gssd to use standard function for getting an RPC client Jeff Layton
2009-04-07 15:25 ` [PATCH 5/5] nfs-utils: add IPv6 code to gssd Jeff Layton
2009-04-15 16:02 ` [PATCH 0/5] nfs-utils: convert gssd to TI-RPC and add IPv6 support (try #4) Steve Dickson

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=20090407231606.GD28733@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=nfsv4@linux-nfs.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.