Skip to content

Commit

Permalink
resource: make feasibility service registration optional
Browse files Browse the repository at this point in the history
Problem: There are many cases in the testsuite where the Fluxion
resource module is loaded alongside sched-simple for testing, but
this currently fails because these two modules now conflict due to
the feasibility service.

Since feasibilty is an optional service, and may soon move to a
separate module anyway, make feasibility service registration optional.
  • Loading branch information
grondo committed Aug 21, 2024
1 parent ca046b4 commit d46d09d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions resource/modules/resource_match.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2997,10 +2997,12 @@ extern "C" int mod_main (flux_t *h, int argc, char **argv)
flux_aux_set (h, "sched-fluxion-resource", &ctx, NULL);
flux_log (h, LOG_DEBUG, "%s: resource module starting", __FUNCTION__);

if ((rc = register_feasibility (h)) < 0) {
flux_log_error (ctx->h, "%s: register_feasibility", __FUNCTION__);
goto done;
}
/* Attempt to register the feasibility service. Print a warning
* if this fails (likely because sched-simple is still loaded), but
* do not make it a fatal error.
*/
if (register_feasibility (h) < 0)
flux_log (ctx->h, LOG_WARNING, "unable to register feasibility service");

/* Before beginning synchronous resource.acquire RPC, set module status
* to 'running' to let flux module load return success.
Expand Down

0 comments on commit d46d09d

Please sign in to comment.