coreos/fleet — pull request #463 by bcwaldon (2014-05-15 01:10:36+00:00)
Title: fix(agent): Clear UnitState before unscheduling on shutdown

On graceful shutdown, an Agent must clear each individual Job's UnitState
before unscheduling it. If an Agent takes these two actions in the
opposite order, it runs the risk of deleting legitimate state from the
Registry that was published by a different Agent.