Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an error print if dlopen fails #246

Merged
merged 1 commit into from
Aug 19, 2015
Merged

Conversation

trws
Copy link
Member

@trws trws commented Jul 2, 2015

Originally from #236.

I'm not sure this is the best way to handle it, but otherwise the error for a
module dependency being unavailable is "invalid argument" in the broker. This
has to be more debuggable, but I'm open to suggestions for better handling
here.

@garlick garlick added the review label Jul 2, 2015
@grondo
Copy link
Contributor

grondo commented Jul 2, 2015

Hm, yeah, this error really needs to be propagated back to the caller (ideally all the way back to the client using flux-module insmod (?)).

There is a similar error in flux_modname_cmp which should probably be fixed in this same PR (not sure if that one causes an error in practice though)

Ideally flux_modname would somehow be able to send a useful error back to caller, but maybe in general the interface should support grabbing a modinfo handle that stores module name and service or error information if path can't be opened:

e.g.

flux_modinfo_t *mi = flux_modinfo_get (path);
if (!mi)
    /* out of memory */
if (flux_modinfo_errmsg (mi))
   /* return errmsg somehow */
service = flux_modinfo_service (mi);
name = flux_modinfo_name (mi);

out_cleanup:
flux_modinfo_destroy (mi);

Not sure if this is the best way, just thinking aloud. I though Jim had a pretty good design for the loadable module support, so perhaps propagating these errors is covered somewhere.

@grondo grondo force-pushed the master branch 2 times, most recently from fc3d15f to 5c78085 Compare July 10, 2015 17:04
@garlick
Copy link
Member

garlick commented Aug 18, 2015

Merging, maybe a better way can come later.

@garlick
Copy link
Member

garlick commented Aug 18, 2015

Oops actually @trws perhaps you could squash the two commits and rebase on current master first?

I'm not sure this is the best way to handle it, but otherwise the error for a
module dependency being unavailable is "invalid argument" in the broker.  This
has to be more debuggable, but I'm open to suggestions for better handling
here.
@trws
Copy link
Member Author

trws commented Aug 19, 2015

No problem, should be all set now @garlick.

garlick added a commit that referenced this pull request Aug 19, 2015
Add an error print if dlopen fails
@garlick garlick merged commit 917dfb1 into flux-framework:master Aug 19, 2015
@garlick garlick removed the review label Aug 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants