resources: nspawn: Use new API

We broke the API (*cough* Joe), this updates it with the new version.
This commit is contained in:
James Shubin
2016-11-14 19:36:13 -05:00
parent 3e419c4955
commit e588f51824

View File

@@ -262,7 +262,7 @@ func (obj *NspawnRes) CheckApply(apply bool) (checkok bool, err error) {
// terminate the machine with // terminate the machine with
// org.freedesktop.machine1.Manager.KillMachine // org.freedesktop.machine1.Manager.KillMachine
log.Printf("%s[%s]: Stopping machine", obj.Kind(), obj.GetName()) log.Printf("%s[%s]: Stopping machine", obj.Kind(), obj.GetName())
if err := conn.KillMachine(obj.GetName()); err != nil { if err := conn.TerminateMachine(obj.GetName()); err != nil {
return false, errwrap.Wrapf(err, "Failed to stop machine") return false, errwrap.Wrapf(err, "Failed to stop machine")
} }
} }