madecoste / swarming

Automatically exported from code.google.com/p/swarming
Apache License 2.0
0 stars 1 forks source link

Add Task request flag to request a fresh instance #198

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Goal: Have a way to guarantee a bot running a task will be a fresh VMs.

That is, the Swarming bot handling the task had not run any other task 
previously. This requires Swarming being able fire up VMS, see issue 189. This 
is an often requested feature. With the new GCE Instance Group Manager API, it 
becomes easier to implement.

Changes:
- TaskProperties.require_fresh_vm = ndb.BooleanProperty(default=False)
- On trigger task_scheduler.make_request(), talk to the AutoScaler to force it 
to fire more VMs if no fresh VM is available.
- On reaping task_scheduler.bot_reap_task(), bot skip the task if not fresh. It 
is important to note it's the server's job to know this fact, not the bot.
- Change swarming.py client code to add flag --require-fresh-vm

Thing of note, --require-fresh-vm is completely compatible with --idempotent.

Original issue reported on code.google.com by maruel@chromium.org on 16 Jan 2015 at 4:39

GoogleCodeExporter commented 9 years ago
One of the main feature of this is that this would get away with "destructive 
tests", that is, tests that modify the host VM in a hard-to-consistently-revert 
way.

Original comment by maruel@chromium.org on 19 Jan 2015 at 10:03