Browse code

Allow to kill/stop ghosts

Guillaume J. Charmes authored on 2013/04/20 04:21:39
Showing 1 changed files
... ...
@@ -646,9 +646,6 @@ func (container *Container) Kill() error {
646 646
 	if !container.State.Running {
647 647
 		return nil
648 648
 	}
649
-	if container.State.Ghost {
650
-		return fmt.Errorf("Can't kill ghost container")
651
-	}
652 649
 	return container.kill()
653 650
 }
654 651
 
... ...
@@ -658,9 +655,6 @@ func (container *Container) Stop(seconds int) error {
658 658
 	if !container.State.Running {
659 659
 		return nil
660 660
 	}
661
-	if container.State.Ghost {
662
-		return fmt.Errorf("Can't stop ghost container")
663
-	}
664 661
 
665 662
 	// 1. Send a SIGTERM
666 663
 	if output, err := exec.Command("lxc-kill", "-n", container.Id, "15").CombinedOutput(); err != nil {