This is actually a good point that I had not considered. How much of Ganeti does actually depend on 100% reproducible job queues? The only thing lost in case of luxid being restarted (on the same or on another master node) would be the aging parameter which should only come into play in cases of heavy starvation.
The other option that I had considered was to somehow "quantize" the start-time and current-time in such a way that we can calculate how many "ticks" have passed since the job was queued. This means using the wall clock to determine how long the job has been waiting and reorder the queue according to that instead. (For example, 30 seconds = 1 'age' tick) The age formula wouldn't change, it would be persistent across reboots, and it would be fairly trivial to implement. It is probably a better option than tweaking with job IDs. Calculating the age with job IDs also doesn't guarantee us a 100% accuracy because some jobs can simply be canceled before they get to run, hence consuming 1 slot in the ID list while not actually taking any space in the queue. On Thursday, August 25, 2016 at 12:05:25 PM UTC+1, Klaus Aehlig wrote: > > > >Will this age parameter be part of the job data? > > > > No, the age parameter is a runtime variable that lives in the job > > scheduler. It is not saved to disk nor propagated anywhere. > > This design decission should be well documented as it breaks the current > property that restarting luxid at any point will have no effect on how > scheduling works. > > As a lot of Ganeti builds on the assumption that all relevant state is > on disk and replicated if it might still be relevant after losing the > master node (e.g., jobs are replicated, lock not as losing the master > node will imply losing all processes on that node), I'm not sure if > breaking with that fundamental design principle is a good idea if other > alternatives exist (e.g., job id, wall-clock time (the time a job entered > the queue is recorded and does not change)). > > -- > Klaus Aehlig > Google Germany GmbH, Erika-Mann-Str. 33, 80636 Muenchen > Registergericht und -nummer: Hamburg, HRB 86891 > Sitz der Gesellschaft: Hamburg > Geschaeftsfuehrer: Matthew Scott Sucherman, Paul Terence Manicle >
