Whamcloud - gitweb
LU-16829 gss: quiet noisy warnings 13/50613/4
authorAurelien Degremont <adegremont@nvidia.com>
Wed, 12 Apr 2023 09:44:37 +0000 (11:44 +0200)
committerOleg Drokin <green@whamcloud.com>
Wed, 31 May 2023 19:13:09 +0000 (19:13 +0000)
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 <adegremont@nvidia.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50613
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/gss/gss_cli_upcall.c
lustre/ptlrpc/gss/gss_keyring.c
lustre/ptlrpc/gss/gss_svc_upcall.c
lustre/ptlrpc/gss/sec_gss.c

index 0b4bfba..94be1ed 100644 (file)
@@ -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;
 
index 08ad7d1..a1c67d4 100644 (file)
@@ -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,
index f535042..ea94cb6 100644 (file)
@@ -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);
index 1bf1f8a..8f84531 100644 (file)
@@ -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);