Skip to content

Commit 89ead8e

Browse files
committed
shell/stage-in: accept old stage-in.tags option
Problem: stage-in.tags (the old option) is now silently ignored. This might cause jobs that are pending in the queue when Flux is updated to misbehave. If stage-in.tags is set, print a warning on the leader shell, but accept it as an alias for the new option, stage-in.names. In addition, add "!" to the option parser so any unknown options trigger a hard failure and are not simply ignored.
1 parent 712f745 commit 89ead8e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/shell/stage-in.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ static int stage_in (flux_shell_t *shell, json_t *config)
197197
{
198198
struct stage_in ctx;
199199
const char *names = NULL;
200+
const char *tags = NULL;
200201
const char *destination = NULL;
201202
bool leader_only = false;
202203

@@ -205,14 +206,22 @@ static int stage_in (flux_shell_t *shell, json_t *config)
205206

206207
if (json_is_object (config)) {
207208
if (json_unpack (config,
208-
"{s?s s?s s?s}",
209+
"{s?s s?s s?s s?s !}",
209210
"names", &names,
211+
"tags", &tags,
210212
"pattern", &ctx.pattern,
211213
"destination", &destination)) {
212214
shell_log_error ("Error parsing stage_in shell option");
213215
goto error;
214216
}
215217
}
218+
if (tags) {
219+
if (shell->info->shell_rank == 0) {
220+
shell_warn ("Setting stage-in.names to the value of deprecated"
221+
" option stage-in.tags.");
222+
}
223+
names = tags;
224+
}
216225
if (!(ctx.names = parse_names (names, "main"))) {
217226
shell_log_error ("Error parsing stage_in.names shell option");
218227
goto error;

0 commit comments

Comments
 (0)