tools/xenstore: remove all watches when a domain has stopped

When a domain has been released by Xen tools, remove all its
registered watches. This avoids sending watch events to the dead domain
when all the nodes related to it are being removed by the Xen tools.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
Juergen Gross authored and Julien Grall committed 2023-01-20 09:23:51 +00:00
1 parent 1d4994ac79
commit 9260e41e73
1 file changed
+3
+3
View File
@@ -740,6 +740,9 @@ int do_release(const void *ctx, struct connection *conn,
if (IS_ERR(domain))
return -PTR_ERR(domain);
/* Avoid triggering watch events when the domain's nodes are deleted. */
conn_delete_all_watches(domain->conn);
talloc_free(domain->conn);
send_ack(conn, XS_RELEASE);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.