flux-framework / capacitor

A bulk runner framework and tool for the flux resource manager
GNU General Public License v3.0
1 stars 3 forks source link

Use latest submission flow #3

Open SteVwonder opened 8 years ago

SteVwonder commented 8 years ago

Flux capacitor's FluxScheduler currently does the following when "scheduling" a job:

job.kvs['state'] = 'submitted'
job.kvs.commit()

in addition to this, it should also do the following:

payload = json.dumps({'lwj':str(job.job_id)})
self.fh.event_send("wreck.state.submitted", payload=payload)

OR the submit function should send a sched.submit RPC rather than a sched.create RPC. The downside to using sched.submit is that there would no longer be a place/need for capacitor's "schedule" function. Jobs would instead be immediately processed by Flux's sched.

Relevant source code: job.c wreck.lua

grondo commented 8 years ago

If an interface in job.c to initiate the submit would be helpful here I'd be fine with adding that. We can model these changes for the job submission api replacement, and see how they feel before committing.

SteVwonder commented 8 years ago

I think a twin to "job.create" which sends the wreck state event and changes the state in the kvs would be a nice addition to the interface. So users can either do a "job.create" + "job.?", with an arbitrary amount of time in between, or just a "job.submit".

Not sure what to call the new message though. My only suggestions are "job.submit" with a payload containing the jobid, or "job.create_finish".