Skip to content

Commit

Permalink
broker: don't open parent FLUX_URI
Browse files Browse the repository at this point in the history
Problem: broker unnecessarily connects to enclosing instance,
which makes tests sensitive to environment.

Don't connect to parent, and don't pass open handle to
the content cache.

Fixes #1784
  • Loading branch information
garlick committed Nov 6, 2018
1 parent 7394541 commit a7075fe
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/broker/broker.c
Expand Up @@ -132,7 +132,6 @@ typedef struct {
/* Bootstrap
*/
hello_t *hello;
flux_t *enclosing_h;
runlevel_t *runlevel;

char *init_shell_cmd;
Expand Down Expand Up @@ -341,13 +340,6 @@ int main (int argc, char *argv[])
ctx.userid = geteuid ();
ctx.rolemask = FLUX_ROLE_OWNER;

/* Connect to enclosing instance, if any.
*/
if (getenv ("FLUX_URI")) {
if (!(ctx.enclosing_h = flux_open (NULL, 0)))
log_err_exit ("flux_open enclosing instance");
}

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

Expand Down Expand Up @@ -486,8 +478,6 @@ int main (int argc, char *argv[])
if (content_cache_set_flux (ctx.cache, ctx.h) < 0)
log_err_exit ("content_cache_set_flux");

content_cache_set_enclosing_flux (ctx.cache, ctx.enclosing_h);

/* Configure attributes.
*/
if (overlay_register_attrs(ctx.overlay, ctx.attrs) < 0)
Expand Down Expand Up @@ -671,8 +661,6 @@ int main (int argc, char *argv[])

if (ctx.verbose)
log_msg ("cleaning up");
if (ctx.enclosing_h)
flux_close (ctx.enclosing_h);
if (ctx.sec)
flux_sec_destroy (ctx.sec);
overlay_destroy (ctx.overlay);
Expand Down

0 comments on commit a7075fe

Please sign in to comment.