Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

agent,unit: check errors from start/stop/unload-ing unit #1647

Merged

Conversation

dongsupark
Copy link
Contributor

Now that UnitManager.{TriggerStart,TriggerStop,Unload}() could return an error, the error should be delivered up to mapTaskToFunc(), not to be ignored by the task manager. Doing that, we can fix a bug in fleet ignoring failed attempt to start/stop a unit.

Fixes #998

Dongsu Park added 2 commits July 22, 2016 14:08
Now that it's possible to retrieve an error from a.um.TriggerStop(),
a.um.Unload() should be able to return an error for consistency.
Also the error should be delivered up to mapTaskToFunc() not to be
ignored from the task manager.
Now that UnitManager.Trigger{Start,Stop}() could return an error, the
error should be delivered up to mapTaskToFunc(), not to be ignored by
the task manager. Doing that, we can fix a bug in fleet ignoring failed
attempt to start/stop a unit.

Fixes coreos#998
@dongsupark dongsupark self-assigned this Jul 22, 2016
@dongsupark dongsupark merged commit a7bb40f into coreos:master Jul 28, 2016
@dongsupark dongsupark deleted the dongsu/fleetd-errcheck-startstop-task branch July 28, 2016 13:51
// removing the unit file. Otherwise "systemctl stop fleet" could end up
// hanging forever.
var errf error
func(name string) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of these closures?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fleet apparently ignores failed attempt to start unit
2 participants