coreos / fleet

fleet ties together systemd and etcd into a distributed init system
Apache License 2.0
2.42k stars 302 forks source link

Batch Jobs #304

Open bcwaldon opened 10 years ago

bcwaldon commented 10 years ago

Explore how to handle batch jobs (units with Type=oneshot)

bcwaldon commented 10 years ago

Probably encompasses https://github.com/coreos/fleet/issues/240

jonboulle commented 10 years ago

I'm considering #308 a blocker for this, as properly implementing this feature turns out to require a lot of changes to the CLI plumbing.

bcwaldon commented 10 years ago

@jonboulle fair enough

yichengq commented 10 years ago

What syntax may be used for batch jobs? I am still a little confused about the CLI blocking. :P

jonboulle commented 10 years ago

Are you talking about CLI syntax or configuration file syntax?

yichengq commented 10 years ago

@jonboulle CLI syntax. I think it is great if we could have a consensus on what CLI should support for the feature.

sbward commented 10 years ago

As a user, I expected fleetctl start my_oneshot.service (with Type=oneshot) to launch the unit on the cluster every time I ran the command, without needing to run fleetctl stop my_oneshot.service before launching it again. It would be great to be able to run the same oneshot service N times in a row, asynchronously launching them into the cluster. Although this makes me wonder how I would get the journal entries from each of my oneshots...

termie commented 9 years ago

yay! glad this is already being talked about a bit, i guess the kinds of jobs I am starting would be called a batch job, which is not clearly defined here but i'll offer my description and maybe we can update the issue.

I have a job that runs once and then exits and, when complete, cleans up after itself (removes itself from fleetctl list-units)

termie commented 9 years ago

(I suppose that is basically the definition of "oneshot" but the issue is still somewhat terse)

xied75 commented 9 years ago

Should this be merged with #562?

Syerram commented 9 years ago

Any updates on this? oneshot feature is critical for our systems. @termie somewhat gave a high level description of batch jobs, but I elaborated a bit more below

Existing Arch (without CoreOS)

With CoreOS

I think we are missing the last part i.e. the service once finished is completely removed from fleet. Next invocation will start the service as a new unit.