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

Fix missing error checks in Lua bindings, flux-wreckrun, flux-wreck #804

Merged
merged 7 commits into from Sep 12, 2016

Conversation

Projects
None yet
4 participants
@grondo
Copy link
Contributor

grondo commented Sep 11, 2016

This PR adds some lamentably missing error checks in the Lua bindings, as well as flux-wreckrun and flux-wreck. The end result is that in specific cases of kvs and fd watch failures, wreck and wreckrun will emit errors instead of mysterious hangs.

grondo added some commits Sep 10, 2016

bindings/lua: check kvs_watch return codes
Add missing checks for kvs_watch and kvs_watch_dir return value
in Lua bindings.
t/lua/t1002-kvs.t: check kvswatcher return code
Ensure f:kvswatcher fails as expected and passes return code back
to caller.
bindings/lua: check return code of kz_set_ready_cb
Be sure to check return code of kz_set_ready_cb() when creating
and iowatcher in the Lua bindings. This call can fail if called
on a kvs key that is not a directory, or due to matchtag exhaustion.
t/lua/t1003-iowatcher.t: test failure of iowatcher
Test expected failure of iowatcher creation on an invalid key.
wreck/ioplex: fix io reference count on kz error
On error opening iowatcher, decrease output stream reference
count to avoid future hang.
cmd/flux-wreckrun: check watcher return codes
Check kvs and io watcher return codes and die on failure.
cmd/flux-wreck: check state and return codes in attach
In flux-wreck attach, do not open stdin if job is already
completed. When opening stdin, check return code from
io watcher and die on failure.

@grondo grondo added the review label Sep 11, 2016

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Sep 11, 2016

Current coverage is 74.72% (diff: 100%)

Merging #804 into master will increase coverage by 0.07%

@@             master       #804   diff @@
==========================================
  Files           145        145          
  Lines         24960      24968     +8   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          18633      18658    +25   
+ Misses         6327       6310    -17   
  Partials          0          0          
Diff Coverage File Path
•••••••••• 100% src/bindings/lua/flux-lua.c

Powered by Codecov. Last update 3fd9da0...6a3622c

@coveralls

This comment has been minimized.

Copy link

coveralls commented Sep 11, 2016

Coverage Status

Coverage increased (+0.07%) to 75.044% when pulling 6a3622c on grondo:lua-error-checks into 3fd9da0 on flux-framework:master.

@garlick

This comment has been minimized.

Copy link
Member

garlick commented Sep 12, 2016

Looks great - ready to merge?

@grondo

This comment has been minimized.

Copy link
Contributor Author

grondo commented Sep 12, 2016

Yeah.

@garlick garlick merged commit ec5bd1f into flux-framework:master Sep 12, 2016

4 checks passed

codecov/patch 100% of diff hit (target 74.65%)
Details
codecov/project 74.72% (+0.07%) compared to 3fd9da0
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.07%) to 75.044%
Details

@garlick garlick removed the review label Sep 12, 2016

@grondo grondo deleted the grondo:lua-error-checks branch Sep 15, 2016

@garlick garlick referenced this pull request Oct 26, 2016

Closed

0.5.0 release notes #879

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.