Whamcloud - gitweb
LU-16829 gss: quiet noisy warnings
authorAurelien Degremont <adegremont@nvidia.com>
Wed, 12 Apr 2023 09:44:37 +0000 (11:44 +0200)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 12 Jun 2023 23:49:18 +0000 (23:49 +0000)
GSS code has plenty of debugging messages as warnings.
Update the code to make them just debugging messages and
nothing more.

Lustre-change: https://review.whamcloud.com/50613
Lustre-commit: 2247cf23ce55398ea4bebc1f8093275534736a0a

Test-Parameters: trivial

Change-Id: I53c471d758b0309ae10bab000211fa0381cabf87
Signed-off-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51190
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@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 555e325..88aabf3 100644 (file)
@@ -378,11 +378,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 9f1c59c..040b118 100644 (file)
@@ -1086,7 +1086,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 ec6e5c0..db5886c 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 3fb6adf..aba31b4 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)
@@ -1220,12 +1218,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;
 }
@@ -2059,15 +2057,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_nid2str(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_nid2str(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_nid2str(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_nid2str(req->rq_peer.nid));
 
         if (gw->gw_flags & LUSTRE_GSS_PACK_USER) {
                 if (reqbuf->lm_bufcount < 4) {
@@ -2321,9 +2319,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_nid2str(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_nid2str(req->rq_peer.nid));
 
         gss_svc_upcall_destroy_ctx(grctx->src_ctx);