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

Design input for the IMP exec subcommand #45

Open
grondo opened this issue Feb 2, 2018 · 1 comment
Open

Design input for the IMP exec subcommand #45

grondo opened this issue Feb 2, 2018 · 1 comment
Assignees

Comments

@grondo
Copy link
Contributor

grondo commented Feb 2, 2018

Format and contents of the input for the IMP exec subcommand still remains to be fully designed.

Because of the IMP's privsep interface, we can define the input in terms of required and optional keys and values, since the format that the "privileged parent" (pIMP) takes is already in the well-defined struct kv format. This allows the "unprivilged child of IMP" (chIMP) to be more flexible in the exact format of its input. In fact it may make sense to have multiple exec input "readers" that can be loaded by the chIMP, as long as the data can be formatted into the struct kv that the parent expects. (For instance, initially a "testing" format could be used. Future implementations may be able to load a "reader" from their enclosing instance).

@grondo grondo added this to the IMP-exec-subcommand milestone Feb 2, 2018
@grondo grondo self-assigned this Feb 13, 2018
@grondo
Copy link
Contributor Author

grondo commented Feb 22, 2018

From RFC 15, required input to the IMP includes

  • Input from instance owner:
    • Rlocal - Table identifying the locally assigned resources
    • options - Table of key,value pairs identifying optional behavior of the IMP requested by the instance
  • Signed input from guest user (J):
    • security envelope - security implementation dependent security/signature/credential information (should be transparent to the IMP, decoded as part of verification)
    • jobspec - jobspec per RFC14
    • options - table of key,value pairs identifying optional behavior of the IMP requested by the user
    • receipient - Intended receipient of job request (should equal instance owner, uid running the IMP)
    • guest userid - may be part of security envelope
    • uuid - unique identifier for this job request
    • job shell path - may be part of jobspec(?)

Strategy for J at this time may be JWT or similar dotted base64 as implemented in the signer interface from the flux-security project, and this data will be passed to the privileged parent under a single key, likely just J = x.y.z.

This leaves just the design of the "instance owner input to the IMP".

For the purposes of starting simple, I propose that Rlocal initially take the form of a table of resource types (e.g. core/cpu, memory, gpu, etc), with each table entry comprising a list of logical ids granted to the job's resource set. This will hopefully keep initial implementation very simple.

E.g., in JSON a job using cores and memory might have a Rlocal that looks something like:

{ 
  "cpu": [  0,1 ],
  "memory":  [ "2G" ],
}

While this representation may not actually reflect the topological hierarchy, any topological resource selection would be preserved via use of the logical ids of resources. For memory, it is not likely at this time that a hierarchical memory container works on Linux anyway (AFAIK, the memcg just limits RAM use, and we would rely on Linux memory allocator to grab local pages anyway)

In the long term, it probably makes sense to switch Rlocal to using the hwloc XML format, but at this point I think that approach would take too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant