Skip to content

Commit 193c29c

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

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/modules/content-sqlite/content-sqlite.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,8 @@ static const struct flux_msg_handler_spec htab[] = {
738738
checkpoint_get_cb, 0 },
739739
{ FLUX_MSGTYPE_REQUEST, "content-backing.checkpoint-put",
740740
checkpoint_put_cb, 0 },
741-
{ FLUX_MSGTYPE_REQUEST, "content-sqlite.stats-get", stats_get_cb, 0 },
741+
{ FLUX_MSGTYPE_REQUEST, "content-sqlite.stats-get",
742+
stats_get_cb, FLUX_ROLE_USER },
742743
FLUX_MSGHANDLER_TABLE_END,
743744
};
744745

t/t0012-content-sqlite.t

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,11 @@ test_expect_success 'full instance start fails corrupt database' '
373373
test_must_fail flux start -o,-Sstatedir=$(pwd) /bin/true
374374
'
375375

376+
test_expect_success 'flux module stats content-sqlite is open to guests' '
377+
FLUX_HANDLE_ROLEMASK=0x2 \
378+
flux module stats content-sqlite >/dev/null
379+
'
380+
376381
test_expect_success 'remove content-sqlite module on rank 0' '
377382
flux module remove content-sqlite
378383
'

0 commit comments

Comments
 (0)