coreos/fleet — pull request #1024 by phemmer (2014-11-11 23:59:31+00:00)
Title: 978 load template fix

This is a PR to fix #978

This contains 2 separate commits.
The first commit is to prevent systemd from hanging when getting the state of a unit fails. Previously every time `GetUnitStates` was called, it would return with an error when any of the units was invalid. So a single bad unit would prevent processing of other valid units.
The change simply makes it log a message and then skip that unit. Note however that the `fleetctl load` command which caused the issue will still hang as it perpetually waits for the unit to load. One option to fix this might be to create a fake `UnitState{LoadState: "Failed"}` if `getUnitState()` returns error.

The other commit is a direct fix for doing `fleetctl load foo@.service`. It causes `GetUnitStates()` to not attempt to get the state for a template unit.