From 2247cf23ce55398ea4bebc1f8093275534736a0a Mon Sep 17 00:00:00 2001 From: Aurelien Degremont Date: Wed, 12 Apr 2023 11:44:37 +0200 Subject: [PATCH] LU-16829 gss: quiet noisy warnings GSS code has plenty of debugging messages as warnings. Update the code to make them just debugging messages and nothing more. Test-Parameters: trivial Change-Id: I53c471d758b0309ae10bab000211fa0381cabf87 Signed-off-by: Aurelien Degremont Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50613 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Arshad Hussain Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin --- lustre/ptlrpc/gss/gss_cli_upcall.c | 10 +++--- lustre/ptlrpc/gss/gss_keyring.c | 2 +- lustre/ptlrpc/gss/gss_svc_upcall.c | 6 ++-- lustre/ptlrpc/gss/sec_gss.c | 62 ++++++++++++++++++-------------------- 4 files changed, 39 insertions(+), 41 deletions(-) diff --git a/lustre/ptlrpc/gss/gss_cli_upcall.c b/lustre/ptlrpc/gss/gss_cli_upcall.c index 0b4bfba..94be1ed 100644 --- a/lustre/ptlrpc/gss/gss_cli_upcall.c +++ b/lustre/ptlrpc/gss/gss_cli_upcall.c @@ -375,11 +375,11 @@ int gss_do_ctx_fini_rpc(struct gss_cli_ctx *gctx) might_sleep(); - CWARN("%s ctx %p idx %#llx (%u->%s)\n", - sec_is_reverse(ctx->cc_sec) ? - "server finishing reverse" : "client finishing forward", - ctx, gss_handle_to_u64(&gctx->gc_handle), - ctx->cc_vcred.vc_uid, sec2target_str(ctx->cc_sec)); + CDEBUG(D_SEC, "%s ctx %p idx %#llx (%u->%s)\n", + sec_is_reverse(ctx->cc_sec) ? + "server finishing reverse" : "client finishing forward", + ctx, gss_handle_to_u64(&gctx->gc_handle), + ctx->cc_vcred.vc_uid, sec2target_str(ctx->cc_sec)); gctx->gc_proc = PTLRPC_GSS_PROC_DESTROY; diff --git a/lustre/ptlrpc/gss/gss_keyring.c b/lustre/ptlrpc/gss/gss_keyring.c index 08ad7d1..a1c67d49 100644 --- a/lustre/ptlrpc/gss/gss_keyring.c +++ b/lustre/ptlrpc/gss/gss_keyring.c @@ -1092,7 +1092,7 @@ void gss_sec_gc_ctx_kr(struct ptlrpc_sec *sec) struct ptlrpc_cli_ctx *ctx; ENTRY; - CWARN("running gc\n"); + CDEBUG(D_SEC, "running gc\n"); spin_lock(&sec->ps_lock); hlist_for_each_entry_safe(ctx, next, &gsec_kr->gsk_clist, diff --git a/lustre/ptlrpc/gss/gss_svc_upcall.c b/lustre/ptlrpc/gss/gss_svc_upcall.c index f535042..ea94cb6 100644 --- a/lustre/ptlrpc/gss/gss_svc_upcall.c +++ b/lustre/ptlrpc/gss/gss_svc_upcall.c @@ -836,9 +836,9 @@ int gss_svc_upcall_install_rvs_ctx(struct obd_import *imp, rscp->target = imp->imp_obd; rawobj_dup(&gctx->gc_svc_handle, &rscp->handle); - CWARN("create reverse svc ctx %p to %s: idx %#llx\n", - &rscp->ctx, obd2cli_tgt(imp->imp_obd), gsec->gs_rvs_hdl); - rc = 0; + CDEBUG(D_SEC, "create reverse svc ctx %p to %s: idx %#llx\n", + &rscp->ctx, obd2cli_tgt(imp->imp_obd), gsec->gs_rvs_hdl); + rc = 0; out: if (rscp) cache_put(&rscp->h, &rsc_cache); diff --git a/lustre/ptlrpc/gss/sec_gss.c b/lustre/ptlrpc/gss/sec_gss.c index 1bf1f8a..8f84531 100644 --- a/lustre/ptlrpc/gss/sec_gss.c +++ b/lustre/ptlrpc/gss/sec_gss.c @@ -308,11 +308,11 @@ int cli_ctx_expire(struct ptlrpc_cli_ctx *ctx) if (!ctx->cc_early_expire) clear_bit(PTLRPC_CTX_UPTODATE_BIT, &ctx->cc_flags); - CWARN("ctx %p(%u->%s) get expired: %lld(%+llds)\n", - ctx, ctx->cc_vcred.vc_uid, sec2target_str(ctx->cc_sec), - ctx->cc_expire, - ctx->cc_expire == 0 ? 0 : - ctx->cc_expire - ktime_get_real_seconds()); + CDEBUG(D_SEC, "ctx %p(%u->%s) get expired: %lld(%+llds)\n", + ctx, ctx->cc_vcred.vc_uid, sec2target_str(ctx->cc_sec), + ctx->cc_expire, + ctx->cc_expire == 0 ? 0 : + ctx->cc_expire - ktime_get_real_seconds()); sptlrpc_cli_ctx_wakeup(ctx); return 1; @@ -363,18 +363,16 @@ void gss_cli_ctx_uptodate(struct gss_cli_ctx *gctx) set_bit(PTLRPC_CTX_UPTODATE_BIT, &ctx->cc_flags); if (sec_is_reverse(ctx->cc_sec)) { - CWARN("server installed reverse ctx %p idx %#llx, " - "expiry %lld(%+llds)\n", ctx, - gss_handle_to_u64(&gctx->gc_handle), - ctx->cc_expire, - ctx->cc_expire - ktime_get_real_seconds()); + CDEBUG(D_SEC, "server installed reverse ctx %p idx %#llx, expiry %lld(%+llds)\n", + ctx, gss_handle_to_u64(&gctx->gc_handle), + ctx->cc_expire, + ctx->cc_expire - ktime_get_real_seconds()); } else { - CWARN("client refreshed ctx %p idx %#llx (%u->%s), " - "expiry %lld(%+llds)\n", ctx, - gss_handle_to_u64(&gctx->gc_handle), - ctx->cc_vcred.vc_uid, sec2target_str(ctx->cc_sec), - ctx->cc_expire, - ctx->cc_expire - ktime_get_real_seconds()); + CDEBUG(D_SEC, "client refreshed ctx %p idx %#llx (%u->%s), expiry %lld(%+llds)\n", + ctx, gss_handle_to_u64(&gctx->gc_handle), + ctx->cc_vcred.vc_uid, sec2target_str(ctx->cc_sec), + ctx->cc_expire, + ctx->cc_expire - ktime_get_real_seconds()); /* install reverse svc ctx for root context */ if (ctx->cc_vcred.vc_uid == 0) @@ -1216,12 +1214,12 @@ int gss_cli_ctx_fini_common(struct ptlrpc_sec *sec, } if (sec_is_reverse(sec)) - CWARN("reverse sec %p: destroy ctx %p\n", - ctx->cc_sec, ctx); + CDEBUG(D_SEC, "reverse sec %p: destroy ctx %p\n", + ctx->cc_sec, ctx); else - CWARN("%s@%p: destroy ctx %p(%u->%s)\n", - sec->ps_policy->sp_name, ctx->cc_sec, - ctx, ctx->cc_vcred.vc_uid, sec2target_str(ctx->cc_sec)); + CDEBUG(D_SEC, "%s@%p: destroy ctx %p(%u->%s)\n", + sec->ps_policy->sp_name, ctx->cc_sec, + ctx, ctx->cc_vcred.vc_uid, sec2target_str(ctx->cc_sec)); return 0; } @@ -2055,15 +2053,15 @@ int gss_svc_handle_init(struct ptlrpc_request *req, if (grctx->src_ctx->gsc_usr_mds || grctx->src_ctx->gsc_usr_oss || grctx->src_ctx->gsc_usr_root) - CWARN("create svc ctx %p: user from %s authenticated as %s\n", - grctx->src_ctx, libcfs_nidstr(&req->rq_peer.nid), - grctx->src_ctx->gsc_usr_root ? "root" : - (grctx->src_ctx->gsc_usr_mds ? "mds" : - (grctx->src_ctx->gsc_usr_oss ? "oss" : "null"))); + CDEBUG(D_SEC, "create svc ctx %p: user from %s authenticated as %s\n", + grctx->src_ctx, libcfs_nidstr(&req->rq_peer.nid), + grctx->src_ctx->gsc_usr_root ? "root" : + (grctx->src_ctx->gsc_usr_mds ? "mds" : + (grctx->src_ctx->gsc_usr_oss ? "oss" : "null"))); else - CWARN("create svc ctx %p: accept user %u from %s\n", - grctx->src_ctx, grctx->src_ctx->gsc_uid, - libcfs_nidstr(&req->rq_peer.nid)); + CDEBUG(D_SEC, "create svc ctx %p: accept user %u from %s\n", + grctx->src_ctx, grctx->src_ctx->gsc_uid, + libcfs_nidstr(&req->rq_peer.nid)); if (gw->gw_flags & LUSTRE_GSS_PACK_USER) { if (reqbuf->lm_bufcount < 4) { @@ -2317,9 +2315,9 @@ int gss_svc_handle_destroy(struct ptlrpc_request *req, if (gss_svc_verify_request(req, grctx, gw, &major)) RETURN(SECSVC_DROP); - CWARN("destroy svc ctx %p idx %#llx (%u->%s)\n", - grctx->src_ctx, gss_handle_to_u64(&gw->gw_handle), - grctx->src_ctx->gsc_uid, libcfs_nidstr(&req->rq_peer.nid)); + CDEBUG(D_SEC, "destroy svc ctx %p idx %#llx (%u->%s)\n", + grctx->src_ctx, gss_handle_to_u64(&gw->gw_handle), + grctx->src_ctx->gsc_uid, libcfs_nidstr(&req->rq_peer.nid)); gss_svc_upcall_destroy_ctx(grctx->src_ctx); -- 1.8.3.1