Don't spam kernel log with EKEYEXPIRED and EACCESS errors
Subsystems (2)
PATCH 1/1 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.
fs/nfs/nfs4state.c +3 -12
@@ -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); }
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: [email protected] [mailto:[email protected]] On Behalf Of John Hughes
Sent: Friday, November 18, 2011 11:21 AM
To: Trond Myklebust
Cc: [email protected]; [email protected]
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.
fs/nfs/nfs4state.c +3 -12
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · On Fri 18 Nov 2011 11:27:37 AM EST, [email protected] 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?
Quoted 76 lines
Thanx... ps-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of John Hughes
Sent: Friday, November 18, 2011 11:21 AM
To: Trond Myklebust
Cc: [email protected]; [email protected]
Subject: [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errorsDon'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<[email protected]>fs/nfs/nfs4state.c +3
-13@@ -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 [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · On 18/11/11 17:27, [email protected] 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.
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:[email protected]]
Sent: Friday, November 18, 2011 11:52 AM
To: Staubach, Peter
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] Don't spam kernel log with EKEYEXPIRED and EACCESS errors
Quoted 3 lines · On 18/11/11 17:27, [email protected] 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.
Quoted 10 lines · John Hughes
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<[email protected]>fs/nfs/nfs4state.c +0
-0
fs/nfs/nfs4state.c static void nfs4_state_start_reclaim_nograce(struct nfs_client *clp) · line 1348
Quoted 10 lines
fs/nfs/nfs4state.c +0
-7@@ -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.
Quoted 13 lines
fs/nfs/nfs4state.c +0
-2-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;
fs/nfs/nfs4state.c static void nfs4_set_lease_expired(struct nfs_client *clp, int status) · line 1623
Quoted 4 lines
fs/nfs/nfs4state.c +0
-1@@ -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.
fs/nfs/nfs4state.c static void nfs4_state_manager(struct nfs_client *clp) · line 1723
Quoted 12 lines
fs/nfs/nfs4state.c +3
-2case -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...
Quoted 5 lines
fs/nfs/nfs4state.c +0
-0nfs4_end_drain_session (clp);nfs4_clear_state_manager_bit (clp); }
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
Quoted 41 lines · Trond Myklebust
Quoted 11 lines · John Hughes
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<[email protected]>fs/nfs/nfs4state.c +0
-0@@ -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);fs/nfs/nfs4state.c static void nfs4_state_start_reclaim_nograce(struct nfs_client *clp) · line 1342
Quoted 10 lines
fs/nfs/nfs4state.c +0
-7} -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.
Quoted 13 lines
fs/nfs/nfs4state.c +0
-1-static int nfs4_recovery_handle_error (struct nfs_client *clp,int error) {switch (error) {fs/nfs/nfs4state.c +0
-1@@ -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;
Quoted 9 lines
fs/nfs/nfs4state.c static void nfs4_set_lease_expired(struct nfs_client *clp, int status) · line 1614
Quoted 6 lines
fs/nfs/nfs4state.c +0
-1@@ -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?
Quoted 16 lines
Quoted 5 lines
fs/nfs/nfs4state.c +0
-0case -NFS4ERR_NOT_SAME :/* FixMe: implement recovery * in nfs4_exchange_id */ default:
fs/nfs/nfs4state.c static void nfs4_state_manager(struct nfs_client *clp) · line 1724
Quoted 9 lines
fs/nfs/nfs4state.c +3
-2@@ -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.