Skip to content

Commit 130ec9d

Browse files
committed
job-manager: allow guests to access module stats
Problem: flux module stats is generally open to guests, but the RPC override in the job-manager module is not. Open job-manager.stats-get to guests. Add a test to t2202-job-manager.t.
1 parent 06b02ae commit 130ec9d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/modules/job-manager/job-manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static const struct flux_msg_handler_spec htab[] = {
140140
FLUX_MSGTYPE_REQUEST,
141141
"job-manager.stats-get",
142142
stats_cb,
143-
0
143+
FLUX_ROLE_USER,
144144
},
145145

146146
FLUX_MSGHANDLER_TABLE_END,

t/t2202-job-manager.t

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,11 @@ test_expect_success 'job-manager stats works' '
377377
cat stats.out | $jq -e .journal.listeners
378378
'
379379

380+
test_expect_success 'flux module stats job-manager is open to guests' '
381+
FLUX_HANDLE_ROLEMASK=0x2 \
382+
flux module stats job-manager >/dev/null
383+
'
384+
380385
test_expect_success 'job-manager: remove job-info, job-manager, job-ingest' '
381386
flux module remove job-info &&
382387
flux module remove job-manager &&

0 commit comments

Comments
 (0)