* Re: [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors
[not found] <1020589474.75.1321635498473.JavaMail.root@thunderbeast.private.linuxbox.com>
@ 2011-11-18 16:58 ` Matt W. Benjamin
0 siblings, 0 replies; 8+ messages in thread
From: Matt W. Benjamin @ 2011-11-18 16:58 UTC (permalink / raw)
To: John Hughes; +Cc: Trond Myklebust, linux-nfs, linux-kernel, peter staubach
Please forgive me for speaking this aloud, but, dbus?
Matt
----- "John Hughes" <john@Calva.COM> wrote:
> On 18/11/11 17:27, peter.staubach@emc.com wrote:
> > Given that the poor user will be sitting, with almost nothing
> working because of the expired ticket, how does the user figure out
> what is going on or how does the admin help him?
> >
> > Some guidance seems like a good thing. Is there really a problem
> with these messages being printed to the log?
> If you're sat at your console with nothing responding how are you
> going
> to see the log messages?
>
> The "ticket expired" messages are rate limited.
>
> The "Error: state manager failed on NFSv4 server" messages are not
> rate
> limited, but if you use my "rpc.gssd -e" hack they'll be written to
> the
> log every 5 seconds all night long.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Matt Benjamin
The Linux Box
206 South Fifth Ave. Suite 150
Ann Arbor, MI 48104
http://linuxbox.com
tel. 734-761-4689
fax. 734-769-8938
cel. 734-216-5309
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors
@ 2011-11-18 16:20 John Hughes
2011-11-18 16:27 ` peter.staubach
2011-11-18 18:30 ` Trond Myklebust
0 siblings, 2 replies; 8+ messages in thread
From: John Hughes @ 2011-11-18 16:20 UTC (permalink / raw)
To: Trond Myklebust; +Cc: linux-nfs, linux-kernel
Don't write anything to the log if a user Kerberos ticket expires or is missing,
these are not kernel problems.
Signed-off-by: John Hughes<john@calva.com>
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 39914be..18897cb 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1339,14 +1339,6 @@ static void nfs4_state_start_reclaim_nograce(struct nfs_client *clp)
nfs4_state_mark_reclaim_helper(clp, nfs4_state_mark_reclaim_nograce);
}
-static void nfs4_warn_keyexpired(const char *s)
-{
- printk_ratelimited(KERN_WARNING "Error: state manager"
- " encountered RPCSEC_GSS session"
- " expired against NFSv4 server %s.\n",
- s);
-}
-
static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
{
switch (error) {
@@ -1378,7 +1370,6 @@ static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
return 0;
case -EKEYEXPIRED:
/* Nothing we can do */
- nfs4_warn_keyexpired(clp->cl_hostname);
return 0;
}
return error;
@@ -1620,7 +1611,6 @@ static void nfs4_set_lease_expired(struct nfs_client *clp, int status)
break;
case -EKEYEXPIRED:
- nfs4_warn_keyexpired(clp->cl_hostname);
case -NFS4ERR_NOT_SAME: /* FixMe: implement recovery
* in nfs4_exchange_id */
default:
@@ -1728,8 +1718,9 @@ static void nfs4_state_manager(struct nfs_client *clp)
} while (atomic_read(&clp->cl_count)> 1);
return;
out_error:
- printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
- " with error %d\n", clp->cl_hostname, -status);
+ if (status != -EACCESS)
+ printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
+ " with error %d\n", clp->cl_hostname, -status);
nfs4_end_drain_session(clp);
nfs4_clear_state_manager_bit(clp);
}
^ permalink raw reply related [flat|nested] 8+ messages in thread* RE: [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors
2011-11-18 16:20 John Hughes
@ 2011-11-18 16:27 ` peter.staubach
2011-11-18 16:34 ` Bryan Schumaker
2011-11-18 16:51 ` John Hughes
2011-11-18 18:30 ` Trond Myklebust
1 sibling, 2 replies; 8+ messages in thread
From: peter.staubach @ 2011-11-18 16:27 UTC (permalink / raw)
To: john, Trond.Myklebust; +Cc: linux-nfs, linux-kernel
Given that the poor user will be sitting, with almost nothing working because of the expired ticket, how does the user figure out what is going on or how does the admin help him?
Some guidance seems like a good thing. Is there really a problem with these messages being printed to the log?
Thanx...
ps
-----Original Message-----
From: linux-nfs-owner@vger.kernel.org [mailto:linux-nfs-owner@vger.kernel.org] On Behalf Of John Hughes
Sent: Friday, November 18, 2011 11:21 AM
To: Trond Myklebust
Cc: linux-nfs@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors
Don't write anything to the log if a user Kerberos ticket expires or is missing,
these are not kernel problems.
Signed-off-by: John Hughes<john@calva.com>
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 39914be..18897cb 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1339,14 +1339,6 @@ static void nfs4_state_start_reclaim_nograce(struct nfs_client *clp)
nfs4_state_mark_reclaim_helper(clp, nfs4_state_mark_reclaim_nograce);
}
-static void nfs4_warn_keyexpired(const char *s)
-{
- printk_ratelimited(KERN_WARNING "Error: state manager"
- " encountered RPCSEC_GSS session"
- " expired against NFSv4 server %s.\n",
- s);
-}
-
static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
{
switch (error) {
@@ -1378,7 +1370,6 @@ static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
return 0;
case -EKEYEXPIRED:
/* Nothing we can do */
- nfs4_warn_keyexpired(clp->cl_hostname);
return 0;
}
return error;
@@ -1620,7 +1611,6 @@ static void nfs4_set_lease_expired(struct nfs_client *clp, int status)
break;
case -EKEYEXPIRED:
- nfs4_warn_keyexpired(clp->cl_hostname);
case -NFS4ERR_NOT_SAME: /* FixMe: implement recovery
* in nfs4_exchange_id */
default:
@@ -1728,8 +1718,9 @@ static void nfs4_state_manager(struct nfs_client *clp)
} while (atomic_read(&clp->cl_count)> 1);
return;
out_error:
- printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
- " with error %d\n", clp->cl_hostname, -status);
+ if (status != -EACCESS)
+ printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
+ " with error %d\n", clp->cl_hostname, -status);
nfs4_end_drain_session(clp);
nfs4_clear_state_manager_bit(clp);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors
2011-11-18 16:27 ` peter.staubach
@ 2011-11-18 16:34 ` Bryan Schumaker
2011-11-18 16:51 ` John Hughes
1 sibling, 0 replies; 8+ messages in thread
From: Bryan Schumaker @ 2011-11-18 16:34 UTC (permalink / raw)
To: peter.staubach; +Cc: linux-nfs, linux-kernel, john, trond.myklebust
On Fri 18 Nov 2011 11:27:37 AM EST, peter.staubach@emc.com wrote:
> Given that the poor user will be sitting, with almost nothing working because of the expired ticket, how does the user figure out what is going on or how does the admin help him?
>
> Some guidance seems like a good thing. Is there really a problem with these messages being printed to the log?
I agree. Rather than removing the messages, is there a way to slow
them down even further so the logs don't fill up as quickly?
>
> Thanx...
>
> ps
>
>
> -----Original Message-----
> From: linux-nfs-owner@vger.kernel.org [mailto:linux-nfs-owner@vger.kernel.org] On Behalf Of John Hughes
> Sent: Friday, November 18, 2011 11:21 AM
> To: Trond Myklebust
> Cc: linux-nfs@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors
>
> Don't write anything to the log if a user Kerberos ticket expires or is missing,
> these are not kernel problems.
>
> Signed-off-by: John Hughes<john@calva.com>
>
> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
> index 39914be..18897cb 100644
> --- a/fs/nfs/nfs4state.c
> +++ b/fs/nfs/nfs4state.c
> @@ -1339,14 +1339,6 @@ static void nfs4_state_start_reclaim_nograce(struct nfs_client *clp)
> nfs4_state_mark_reclaim_helper(clp, nfs4_state_mark_reclaim_nograce);
> }
>
> -static void nfs4_warn_keyexpired(const char *s)
> -{
> - printk_ratelimited(KERN_WARNING "Error: state manager"
> - " encountered RPCSEC_GSS session"
> - " expired against NFSv4 server %s.\n",
> - s);
> -}
> -
> static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
> {
> switch (error) {
> @@ -1378,7 +1370,6 @@ static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
> return 0;
> case -EKEYEXPIRED:
> /* Nothing we can do */
> - nfs4_warn_keyexpired(clp->cl_hostname);
> return 0;
> }
> return error;
> @@ -1620,7 +1611,6 @@ static void nfs4_set_lease_expired(struct nfs_client *clp, int status)
> break;
>
> case -EKEYEXPIRED:
> - nfs4_warn_keyexpired(clp->cl_hostname);
> case -NFS4ERR_NOT_SAME: /* FixMe: implement recovery
> * in nfs4_exchange_id */
> default:
> @@ -1728,8 +1718,9 @@ static void nfs4_state_manager(struct nfs_client *clp)
> } while (atomic_read(&clp->cl_count)> 1);
> return;
> out_error:
> - printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
> - " with error %d\n", clp->cl_hostname, -status);
> + if (status != -EACCESS)
> + printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
> + " with error %d\n", clp->cl_hostname, -status);
> nfs4_end_drain_session(clp);
> nfs4_clear_state_manager_bit(clp);
> }
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors
2011-11-18 16:27 ` peter.staubach
2011-11-18 16:34 ` Bryan Schumaker
@ 2011-11-18 16:51 ` John Hughes
2011-11-18 17:50 ` peter.staubach
1 sibling, 1 reply; 8+ messages in thread
From: John Hughes @ 2011-11-18 16:51 UTC (permalink / raw)
To: peter.staubach; +Cc: Trond.Myklebust, linux-nfs, linux-kernel
On 18/11/11 17:27, peter.staubach@emc.com wrote:
> Given that the poor user will be sitting, with almost nothing working because of the expired ticket, how does the user figure out what is going on or how does the admin help him?
>
> Some guidance seems like a good thing. Is there really a problem with these messages being printed to the log?
If you're sat at your console with nothing responding how are you going
to see the log messages?
The "ticket expired" messages are rate limited.
The "Error: state manager failed on NFSv4 server" messages are not rate
limited, but if you use my "rpc.gssd -e" hack they'll be written to the
log every 5 seconds all night long.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors
2011-11-18 16:51 ` John Hughes
@ 2011-11-18 17:50 ` peter.staubach
0 siblings, 0 replies; 8+ messages in thread
From: peter.staubach @ 2011-11-18 17:50 UTC (permalink / raw)
To: john; +Cc: Trond.Myklebust, linux-nfs, linux-kernel
The log messages are for the poor admin who has to figure out why nothing is working for the user.
ps
-----Original Message-----
From: John Hughes [mailto:john@Calva.COM]
Sent: Friday, November 18, 2011 11:52 AM
To: Staubach, Peter
Cc: Trond.Myklebust@netapp.com; linux-nfs@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors
On 18/11/11 17:27, peter.staubach@emc.com wrote:
> Given that the poor user will be sitting, with almost nothing working because of the expired ticket, how does the user figure out what is going on or how does the admin help him?
>
> Some guidance seems like a good thing. Is there really a problem with these messages being printed to the log?
If you're sat at your console with nothing responding how are you going
to see the log messages?
The "ticket expired" messages are rate limited.
The "Error: state manager failed on NFSv4 server" messages are not rate
limited, but if you use my "rpc.gssd -e" hack they'll be written to the
log every 5 seconds all night long.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors
2011-11-18 16:20 John Hughes
2011-11-18 16:27 ` peter.staubach
@ 2011-11-18 18:30 ` Trond Myklebust
2011-11-18 19:17 ` John Hughes
1 sibling, 1 reply; 8+ messages in thread
From: Trond Myklebust @ 2011-11-18 18:30 UTC (permalink / raw)
To: John Hughes; +Cc: linux-nfs, linux-kernel
On Fri, 2011-11-18 at 17:20 +0100, John Hughes wrote:
> Don't write anything to the log if a user Kerberos ticket expires or is missing,
> these are not kernel problems.
>
> Signed-off-by: John Hughes<john@calva.com>
>
> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
> index 39914be..18897cb 100644
> --- a/fs/nfs/nfs4state.c
> +++ b/fs/nfs/nfs4state.c
> @@ -1339,14 +1339,6 @@ static void nfs4_state_start_reclaim_nograce(struct nfs_client *clp)
> nfs4_state_mark_reclaim_helper(clp, nfs4_state_mark_reclaim_nograce);
> }
>
> -static void nfs4_warn_keyexpired(const char *s)
> -{
> - printk_ratelimited(KERN_WARNING "Error: state manager"
> - " encountered RPCSEC_GSS session"
> - " expired against NFSv4 server %s.\n",
> - s);
> -}
NACK. This is useful.
> -
> static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
> {
> switch (error) {
> @@ -1378,7 +1370,6 @@ static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
> return 0;
> case -EKEYEXPIRED:
> /* Nothing we can do */
> - nfs4_warn_keyexpired(clp->cl_hostname);
> return 0;
> }
> return error;
> @@ -1620,7 +1611,6 @@ static void nfs4_set_lease_expired(struct nfs_client *clp, int status)
> break;
>
> case -EKEYEXPIRED:
> - nfs4_warn_keyexpired(clp->cl_hostname);
NACK. This means that the server can't even recover it's lease. It
shouldn't even trigger if you install a machine credential.
> case -NFS4ERR_NOT_SAME: /* FixMe: implement recovery
> * in nfs4_exchange_id */
> default:
> @@ -1728,8 +1718,9 @@ static void nfs4_state_manager(struct nfs_client *clp)
> } while (atomic_read(&clp->cl_count)> 1);
> return;
> out_error:
> - printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
> - " with error %d\n", clp->cl_hostname, -status);
> + if (status != -EACCESS)
> + printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
> + " with error %d\n", clp->cl_hostname, -status);
Obviously not even compile tested...
> nfs4_end_drain_session(clp);
> nfs4_clear_state_manager_bit(clp);
> }
>
>
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors
2011-11-18 18:30 ` Trond Myklebust
@ 2011-11-18 19:17 ` John Hughes
0 siblings, 0 replies; 8+ messages in thread
From: John Hughes @ 2011-11-18 19:17 UTC (permalink / raw)
To: Trond Myklebust; +Cc: John Hughes, linux-nfs, linux-kernel
On 11/18/2011 07:30 PM, Trond Myklebust wrote:
> On Fri, 2011-11-18 at 17:20 +0100, John Hughes wrote:
>
>> Don't write anything to the log if a user Kerberos ticket expires or is missing,
>> these are not kernel problems.
>>
>> Signed-off-by: John Hughes<john@calva.com>
>>
>> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
>> index 39914be..18897cb 100644
>> --- a/fs/nfs/nfs4state.c
>> +++ b/fs/nfs/nfs4state.c
>> @@ -1339,14 +1339,6 @@ static void nfs4_state_start_reclaim_nograce(struct nfs_client *clp)
>> nfs4_state_mark_reclaim_helper(clp, nfs4_state_mark_reclaim_nograce);
>> }
>>
>> -static void nfs4_warn_keyexpired(const char *s)
>> -{
>> - printk_ratelimited(KERN_WARNING "Error: state manager"
>> - " encountered RPCSEC_GSS session"
>> - " expired against NFSv4 server %s.\n",
>> - s);
>> -}
>>
> NACK. This is useful.
>
>
>> -
>> static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
>> {
>> switch (error) {
>> @@ -1378,7 +1370,6 @@ static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
>> return 0;
>> case -EKEYEXPIRED:
>> /* Nothing we can do */
>> - nfs4_warn_keyexpired(clp->cl_hostname);
>> return 0;
>> }
>> return error;
>>
>> @@ -1620,7 +1611,6 @@ static void nfs4_set_lease_expired(struct nfs_client *clp, int status)
>> break;
>>
>> case -EKEYEXPIRED:
>> - nfs4_warn_keyexpired(clp->cl_hostname);
>>
> NACK. This means that the server can't even recover it's lease. It
> shouldn't even trigger if you install a machine credential.
>
Ok, couldn't see why there were two such warnings. Maybe the error
should be more alarming in this case?
>
>> case -NFS4ERR_NOT_SAME: /* FixMe: implement recovery
>> * in nfs4_exchange_id */
>> default:
>> @@ -1728,8 +1718,9 @@ static void nfs4_state_manager(struct nfs_client *clp)
>> } while (atomic_read(&clp->cl_count)> 1);
>> return;
>> out_error:
>> - printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
>> - " with error %d\n", clp->cl_hostname, -status);
>> + if (status != -EACCESS)
>> + printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
>> + " with error %d\n", clp->cl_hostname, -status);
>>
> Obviously not even compile tested...
>
Oh dear, my sins have found me out. Sorry.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-11-18 19:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1020589474.75.1321635498473.JavaMail.root@thunderbeast.private.linuxbox.com>
2011-11-18 16:58 ` [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors Matt W. Benjamin
2011-11-18 16:20 John Hughes
2011-11-18 16:27 ` peter.staubach
2011-11-18 16:34 ` Bryan Schumaker
2011-11-18 16:51 ` John Hughes
2011-11-18 17:50 ` peter.staubach
2011-11-18 18:30 ` Trond Myklebust
2011-11-18 19:17 ` John Hughes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox