Skip to content

Commit

Permalink
broker: register content attributes early
Browse files Browse the repository at this point in the history
Occasionally this sharness test fails:

not ok 5 - Attempt to start instance with invalid hash fails hard
FAIL: t2008-althash.t 5 - Attempt to start instance with invalid hash fails hard
 #
 #  test_must_fail flux start -o,-Scontent.hash=wronghash /bin/true
 #
The broker asserts in zsys teardown:
 src/zsock_option.c:1347: zsock_set_sndtimeo:
   Assertion `rc == 0 || zmq_errno () == (156384712 + 53)' failed.

Since we are deliberately triggering this early failure in sharness,
move the content-cache attribute initialization to before
zsys is initialized.

Fixes flux-framework#1063
  • Loading branch information
garlick committed May 28, 2017
1 parent e10001f commit 3d59fbf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/broker/broker.c
Expand Up @@ -365,6 +365,9 @@ int main (int argc, char *argv[])
log_err_exit ("flux_open enclosing instance");
}

if (content_cache_register_attrs (ctx.cache, ctx.attrs) < 0)
log_err_exit ("content cache attributes");

/* Block all signals, saving old mask and actions for SIGINT, SIGTERM.
*/
sigset_t sigmask;
Expand Down Expand Up @@ -499,8 +502,7 @@ int main (int argc, char *argv[])
|| attr_add_active_int (ctx.attrs, "tbon.descendants",
&ctx.tbon.descendants,
FLUX_ATTRFLAG_IMMUTABLE) < 0
|| hello_register_attrs (ctx.hello, ctx.attrs) < 0
|| content_cache_register_attrs (ctx.cache, ctx.attrs) < 0) {
|| hello_register_attrs (ctx.hello, ctx.attrs) < 0) {
log_err_exit ("configuring attributes");
}

Expand Down

0 comments on commit 3d59fbf

Please sign in to comment.