| 805 | } |
| 806 | |
| 807 | foreach (const ContainerID& containerId, containers.get()) { |
| 808 | process::Future<Option<ContainerTermination>> termination = |
| 809 | containerizer->destroy(containerId); |
| 810 | |
| 811 | AWAIT(termination); |
| 812 | |
| 813 | if (!termination.isReady()) { |
| 814 | LOG(ERROR) << "Failed to destroy container " << containerId << ": " |
| 815 | << (termination.isFailed() ? |
| 816 | termination.failure() : |
| 817 | "discarded"); |
| 818 | } |
| 819 | } |
| 820 | |
| 821 | // When using the composing containerizer, the assertion checking |
| 822 | // `containers->empty()` below is racy, since the containers are |