* [PATCH 0/2] nfs-utils: detect and log write errors
@ 2009-04-02 0:05 Kevin Coffman
[not found] ` <20090402000430.3234.81110.stgit-Cm81N35Y91hZN1qrTdtDg5Vzexx5G7lz@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Coffman @ 2009-04-02 0:05 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
Address at least one cause of a problem that has been reported
where it appears that a gss context was successfully created,
but the server returns GSS_S_NO_CONTEXT.
---
Kevin Coffman (2):
svcgssd: check the return code from qword_eol() and log failures
cacheio: return any original error from qword_eol
support/nfs/cacheio.c | 10 ++++++++--
utils/gssd/svcgssd_proc.c | 4 ++++
2 files changed, 12 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] cacheio: return any original error from qword_eol
[not found] ` <20090402000430.3234.81110.stgit-Cm81N35Y91hZN1qrTdtDg5Vzexx5G7lz@public.gmane.org>
@ 2009-04-02 0:05 ` Kevin Coffman
2009-04-02 0:05 ` [PATCH 2/2] svcgssd: check the return code from qword_eol() and log failures Kevin Coffman
2009-04-04 11:52 ` [PATCH 0/2] nfs-utils: detect and log write errors Steve Dickson
2 siblings, 0 replies; 4+ messages in thread
From: Kevin Coffman @ 2009-04-02 0:05 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
From: Kevin Coffman <kwc@citi.umich.edu>
If the initial fflush() fails in qword_eol, log the failure
and return the indication of the original failure, not the
successful cover-up.
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
---
support/nfs/cacheio.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c
index f303734..6a6ed5a 100644
--- a/support/nfs/cacheio.c
+++ b/support/nfs/cacheio.c
@@ -154,15 +154,21 @@ int qword_eol(FILE *f)
fprintf(f,"\n");
err = fflush(f);
+ if (err) {
+ xlog_warn("qword_eol: fflush failed: errno %d (%s)",
+ errno, strerror(errno));
+ }
/*
* We must send one line (and one line only) in a single write
* call. In case of a write error, libc may accumulate the
* unwritten data and try to write it again later, resulting in a
* multi-line write. So we must explicitly ask it to throw away
- * any such cached data:
+ * any such cached data. But we return any original error
+ * indication to the caller.
*/
__fpurge(f);
- return fflush(f);
+ fflush(f);
+ return err;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] svcgssd: check the return code from qword_eol() and log failures
[not found] ` <20090402000430.3234.81110.stgit-Cm81N35Y91hZN1qrTdtDg5Vzexx5G7lz@public.gmane.org>
2009-04-02 0:05 ` [PATCH 1/2] cacheio: return any original error from qword_eol Kevin Coffman
@ 2009-04-02 0:05 ` Kevin Coffman
2009-04-04 11:52 ` [PATCH 0/2] nfs-utils: detect and log write errors Steve Dickson
2 siblings, 0 replies; 4+ messages in thread
From: Kevin Coffman @ 2009-04-02 0:05 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
From: Kevin Coffman <kwc@citi.umich.edu>
If qword_eol() fails while writing the context information, log
an indication of the failure.
This addresses at least one cause of the intermittent, and
previously undiagnosed, problem of the server returning
GSS_S_NO_CONTEXT when a context was seemingly successfully
created and sent down to the kernel. In my case there was a
mis-match between kernel and user-land configuration resulting in
the proper kernel module not being loaded. Therefore the write
of the context failed, but was not logged by svcgssd. When the
kernel goes to find the resulting context, it was really not
there and correctly returned GSS_S_NO_CONTEXT to the client.
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
---
utils/gssd/svcgssd_proc.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/utils/gssd/svcgssd_proc.c b/utils/gssd/svcgssd_proc.c
index b390bea..6f2ba61 100644
--- a/utils/gssd/svcgssd_proc.c
+++ b/utils/gssd/svcgssd_proc.c
@@ -109,6 +109,10 @@ do_svc_downcall(gss_buffer_desc *out_handle, struct svc_cred *cred,
qword_print(f, fname);
qword_printhex(f, context_token->value, context_token->length);
err = qword_eol(f);
+ if (err) {
+ printerr(1, "WARNING: error writing to downcall channel "
+ "%s: %s\n", SVCGSSD_CONTEXT_CHANNEL, strerror(errno));
+ }
fclose(f);
return err;
out_err:
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] nfs-utils: detect and log write errors
[not found] ` <20090402000430.3234.81110.stgit-Cm81N35Y91hZN1qrTdtDg5Vzexx5G7lz@public.gmane.org>
2009-04-02 0:05 ` [PATCH 1/2] cacheio: return any original error from qword_eol Kevin Coffman
2009-04-02 0:05 ` [PATCH 2/2] svcgssd: check the return code from qword_eol() and log failures Kevin Coffman
@ 2009-04-04 11:52 ` Steve Dickson
2 siblings, 0 replies; 4+ messages in thread
From: Steve Dickson @ 2009-04-04 11:52 UTC (permalink / raw)
To: Kevin Coffman; +Cc: linux-nfs
Kevin Coffman wrote:
> Address at least one cause of a problem that has been reported
> where it appears that a gss context was successfully created,
> but the server returns GSS_S_NO_CONTEXT.
>
> ---
>
> Kevin Coffman (2):
> svcgssd: check the return code from qword_eol() and log failures
> cacheio: return any original error from qword_eol
>
>
> support/nfs/cacheio.c | 10 ++++++++--
> utils/gssd/svcgssd_proc.c | 4 ++++
> 2 files changed, 12 insertions(+), 2 deletions(-)
Both patches committed...
steved.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-04 11:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-02 0:05 [PATCH 0/2] nfs-utils: detect and log write errors Kevin Coffman
[not found] ` <20090402000430.3234.81110.stgit-Cm81N35Y91hZN1qrTdtDg5Vzexx5G7lz@public.gmane.org>
2009-04-02 0:05 ` [PATCH 1/2] cacheio: return any original error from qword_eol Kevin Coffman
2009-04-02 0:05 ` [PATCH 2/2] svcgssd: check the return code from qword_eol() and log failures Kevin Coffman
2009-04-04 11:52 ` [PATCH 0/2] nfs-utils: detect and log write errors Steve Dickson
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.