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

rc: set URI's in enclosing instance for hierarchical flux #2322

Merged
merged 4 commits into from Aug 17, 2019

Conversation

@garlick
Copy link
Member

commented Aug 16, 2019

To assist tools that need to look up the URI for child instances, repair rc1.d/01-enclosing-instance to work with the new exec system and write e.g.

job.0000.0029.d400.0000.guest.flux.local_uri
job.0000.0029.d400.0000.guest.flux.remote_uri
garlick added 4 commits Aug 16, 2019
Add a flag that causes an environment variable
to be unset of a 'sanitize' flag is set in the
struct attrmap array.
Problem: FLUX_KVS_NAMESPACE is cleared in the broker
environment if set, but it is need by rc3.d/01-enclosing-instance.

Eliminate code to explicitly sanitize FLUX_KVS_NAMESPACE and
FLUX_URI in the broker environment, then set the 'sanitize' bit
for FLUX_URI in attrmap, and add FLUX_KVS_NAMESPACE to attrmap
with 'sanitize' set.

Now the attribute 'parent-kvs-namespace' contains
the previous value of FLUX_KVS_NAMESPACE, if it was set.
Rc scripts can use flux getattr to obtain the value.
Problem: 01-enclosing-instance doesn't work with the
new exec system.

Since the 'parent-kvs-namespace' attribute is now set in
a child instance, to complement 'parent-uri', use the pair
of them to set the local and remote uri's for the instance
in its job directory in the KVS, e.g.

job.0000.0029.d400.0000.guest.flux.local_uri
job.0000.0029.d400.0000.guest.flux.remote_uri

Fixes #2318
@codecov-io

This comment has been minimized.

Copy link

commented Aug 16, 2019

Codecov Report

❗️ No coverage uploaded for pull request base (master@2982693). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master    #2322   +/-   ##
=========================================
  Coverage          ?   80.88%           
=========================================
  Files             ?      214           
  Lines             ?    33815           
  Branches          ?        0           
=========================================
  Hits              ?    27352           
  Misses            ?     6463           
  Partials          ?        0
Impacted Files Coverage Δ
src/broker/broker.c 73.52% <100%> (ø)
@grondo

This comment has been minimized.

Copy link
Contributor

commented Aug 17, 2019

Cool! Checked this out and was able to hack together a quick script to list hierarchical instances as a test:

$ ./uris.sh
527324676096 
536954798080 
744019197952 local:///tmp/flux-kQwrs6/0
758565044224 local:///tmp/flux-v32zKa/0
784217407488 
809886547968 local:///tmp/flux-ZJNn69/0
  \_1132747292672 
  \_1366336471040 local:///tmp/flux-s6rIZX/0
  \_1387794530304 local:///tmp/flux-8Z1cte/0
      \_318649663488 local:///tmp/flux-6rfZqo/0
@grondo

This comment has been minimized.

Copy link
Contributor

commented Aug 17, 2019

Looks like we have a use case for this immediately, so merging!

@grondo grondo merged commit 9383f4d into flux-framework:master Aug 17, 2019
4 checks passed
4 checks passed
Summary 1 potential rule
Details
codecov/patch No report found to compare against
Details
codecov/project No report found to compare against
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@garlick garlick deleted the garlick:remote_uri branch Aug 21, 2019
@garlick garlick referenced this pull request Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.