Skip to content

Commit a90749a

Browse files
committed
job-archive: allow guests to access module stats
Problem: flux module stats is generally open to guests, but the RPC override in the job-archive module is not. Open job-archive.stats-get to guests. Add a test to t2250-job-archive.t.
1 parent 193c29c commit a90749a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/modules/job-archive/job-archive.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,8 @@ static int process_config (struct job_archive_ctx *ctx)
604604
}
605605

606606
static const struct flux_msg_handler_spec htab[] = {
607-
{ FLUX_MSGTYPE_REQUEST, "job-archive.stats-get", stats_get_cb, 0 },
607+
{ FLUX_MSGTYPE_REQUEST, "job-archive.stats-get",
608+
stats_get_cb, FLUX_ROLE_USER },
608609
FLUX_MSGHANDLER_TABLE_END,
609610
};
610611

t/t2250-job-archive.t

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,11 @@ test_expect_success 'job-archive: get module stats' '
280280
flux module stats job-archive
281281
'
282282

283+
test_expect_success 'flux module stats job-archive is open to guests' '
284+
FLUX_HANDLE_ROLEMASK=0x2 \
285+
flux module stats job-archive >/dev/null
286+
'
287+
283288
test_expect_success 'job-archive: unload module' '
284289
flux module unload job-archive
285290
'

0 commit comments

Comments
 (0)