Stop systemd unit on destroy

It totally fixes leftover ".scope" fails. Of course it's just
workaround, real issue seems to be in go-systemd library or in systemd
itself.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov
2015-06-08 15:06:05 -07:00
parent ce1f2f1c86
commit f6ad210785
+1
View File
@@ -259,6 +259,7 @@ func (m *Manager) Apply(pid int) error {
func (m *Manager) Destroy() error {
m.mu.Lock()
defer m.mu.Unlock()
theConn.StopUnit(getUnitName(m.Cgroups), "replace")
if err := cgroups.RemovePaths(m.Paths); err != nil {
return err
}