Skip to content

Commit 06b02ae

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

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/modules/job-ingest/job-ingest.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,8 @@ static const struct flux_msg_handler_spec htab[] = {
739739
{ FLUX_MSGTYPE_REQUEST, "job-ingest.submit", submit_cb, FLUX_ROLE_USER },
740740
{ FLUX_MSGTYPE_REQUEST, "job-ingest.shutdown", shutdown_cb, 0 },
741741
{ FLUX_MSGTYPE_REQUEST, "job-ingest.config-reload", reload_cb, 0 },
742-
{ FLUX_MSGTYPE_REQUEST, "job-ingest.stats-get", stats_get_cb, 0 },
742+
{ FLUX_MSGTYPE_REQUEST, "job-ingest.stats-get",
743+
stats_get_cb, FLUX_ROLE_USER },
743744
FLUX_MSGHANDLER_TABLE_END,
744745
};
745746

t/t2100-job-ingest.t

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ test_expect_success 'job-ingest: handle total batch failure in job-ingest' '
164164
test_must_fail flux submit --cc=1-4 hostname
165165
'
166166

167+
test_expect_success 'flux module stats job-ingest is open to guests' '
168+
FLUX_HANDLE_ROLEMASK=0x2 \
169+
flux module stats job-ingest >/dev/null
170+
'
171+
167172
test_expect_success 'job-ingest: remove modules' '
168173
flux module remove job-manager &&
169174
flux exec -r all flux module remove job-ingest

0 commit comments

Comments
 (0)