mech[sizeof(mech) - 1] = '\0';
seq_printf(seq,
- "- %p: { %s%s%suid: %u, ctxref: %d, expire: %lld, delta: %lld, flags: [%s], seq: %d, win: %u, key: %08x, keyref: %d, hdl: \"%#llx:%#llx\", mech: \"%s\" }\n",
- ctx, conn ? "peer_nid: " : "",
+ "- { %s%s%suid: %u, ctxref: %d, expire: %lld, delta: %lld, flags: [%s], seq: %d, win: %u, key: %08x, keyref: %d, hdl: \"%#llx:%#llx\", mech: \"%s\" }\n",
+ conn ? "peer_nid: " : "",
conn ? libcfs_nidstr(&conn->c_peer.nid) : "",
conn ? ", " : "",
ctx->cc_vcred.vc_uid, atomic_read(&ctx->cc_refcount),
if [ ! -f $DIR/$tdir/$tdir.out ]; then
error "read before rotation failed"
fi
+ # check srpc_contexts is valid YAML
+ $LCTL get_param -n *.*.srpc_contexts 2>/dev/null | verify_yaml ||
+ error "srpc_contexts is not valid YAML"
# store top key identity to ensure rotation has occurred
- SK_IDENTITY_OLD=$($LCTL get_param -n *.*.*srpc_contexts 2>/dev/null |
+ SK_IDENTITY_OLD=$($LCTL get_param -n *.*.srpc_contexts 2>/dev/null |
head -n 1 | awk 'BEGIN{RS=", "} $1=="expire:"{print $2}')
do_facet $SINGLEMDS lfs flushctx ||
error "could not run flushctx on $SINGLEMDS"
lfs flushctx || error "could not run flushctx on client"
sleep 5
# verify new key is in place
- SK_IDENTITY_NEW=$($LCTL get_param -n *.*.*srpc_contexts 2>/dev/null |
+ SK_IDENTITY_NEW=$($LCTL get_param -n *.*.srpc_contexts 2>/dev/null |
head -n 1 | awk 'BEGIN{RS=", "} $1=="expire:"{print $2}')
if [ $SK_IDENTITY_OLD == $SK_IDENTITY_NEW ]; then
error "key did not rotate correctly"