[lxc-devel] [PATCH v3 4/7] run stop hook between STOPPING and STOPPED states

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Oct 6 08:01:04 UTC 2015


Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
---
 src/lxc/start.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lxc/start.c b/src/lxc/start.c
index 87fc32f..a1eb961 100644
--- a/src/lxc/start.c
+++ b/src/lxc/start.c
@@ -493,6 +493,8 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
 	 */
 	lxc_set_state(name, handler, STOPPING);
 
+	if (run_lxc_hooks(name, "stop", handler->conf, handler->lxcpath, NULL))
+		ERROR("failed to run stop hooks for container '%s'.", name);
 	for (i = 0; i < LXC_NS_MAX; i++) {
 		if (handler->nsfd[i] != -1) {
 			close(handler->nsfd[i]);
-- 
2.1.4




More information about the lxc-devel mailing list