Skip to content

Commit

Permalink
broker: allow cleanup-push to continue to work
Browse files Browse the repository at this point in the history
Problem: some framework projects are using "test personalities"
that call flux admin cleanup-push.

Accept "cleanup" as an alias for "shutdown" to allow those projects
to continue to work while transitioning to the shutdown script.
  • Loading branch information
garlick committed Apr 8, 2024
1 parent 6c31028 commit 82bc90c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/broker/runat.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,12 @@ static void runat_push_cb (flux_t *h,
errstr = "commands array is empty";
goto error;
}
/* Transition: treat "cleanup" as an alias for "shutdown"
* so framework projects that are still using flux admin cleanup-push
* can add commands to "shutdown".
*/
if (streq (name, "cleanup"))
name = "shutdown";

Check warning on line 716 in src/broker/runat.c

View check run for this annotation

Codecov / codecov/patch

src/broker/runat.c#L715-L716

Added lines #L715 - L716 were not covered by tests
json_array_foreach (commands, index, el) {
const char *cmdline = json_string_value (el);
if (!cmdline || strlen (cmdline) == 0) {
Expand Down

0 comments on commit 82bc90c

Please sign in to comment.