util: Reset Failed Before Restarting Service

If we don't reset the failed counter in systemd for a specific service
like systemd-networkd, restarts won't always be issued as expected. If
the service fails due to a bad configuration, future changes that would
normally put it in a valid state will be unable to restart it since it
hit the reset threshold for the given time window.

Tested:
    Built and ran on a zaius for testing. Issuing bad network
    configuration changes over ipmi no longer prevents future changes
    from fixing systemd-networkd.

Change-Id: I646309001a257b12e2df006d8c420c93c5c0bca8
Signed-off-by: William A. Kennington III <wak@google.com>
1 file changed