Skip to content

Commit 39d3018

Browse files
committed
shell: expose instance_owner in shell info object
Problem: The shell fetches the local instance owner, but does not expose this value to plugins. Add an instance_owner key to the shell info object.
1 parent 7a21458 commit 39d3018

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/shell/shell.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,9 +448,10 @@ static json_t *flux_shell_get_info_object (flux_shell_t *shell)
448448
return o;
449449

450450
if (!(o = json_pack_ex (&err, 0,
451-
"{ s:I s:i s:i s:i s:s s:O s:O s:{ s:i }}",
451+
"{ s:I s:i s:i s:i s:i s:s s:O s:O s:{ s:i }}",
452452
"jobid", shell->info->jobid,
453453
"rank", shell->info->shell_rank,
454+
"instance_owner", (int) shell->broker_owner,
454455
"size", shell->info->shell_size,
455456
"ntasks", shell->info->total_ntasks,
456457
"service", shell_svc_name (shell->svc),

src/shell/shell.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ const struct taskmap *flux_shell_get_taskmap (flux_shell_t *shell);
105105
/* Return shell info as a JSON string.
106106
* {
107107
* "jobid":I,
108+
* "instance_owner":i,
108109
* "rank":i,
109110
* "size":i,
110111
* "ntasks";i,

0 commit comments

Comments
 (0)