[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/2] xl: Keep monitoring suspended domain


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Mon, 2 Dec 2024 18:30:14 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yr4+xPwlByZzVA0fa5bri/NPFAgZZCBLCSr7JMRSsUw=; b=Dn/6WH2FNVauIj2v/3MapWtgSwL11AyNLOSEWPD/ze5oKSPOzu2IkmP531Pwo0t3Rl3YWdZr26Kb1igA2lVJA0yWmPrsPGV2q9UfFSkKFQ1a+Y3sfLFBWr3LGW/R2dyJgMfurVmy4EWXhGfusqf8Uc0EyttIze5eq40XYJADAv0ARbkot+pkmupPHaEgsJaTIVcG6XoEa+7Xnfb4LLl0sOdfTpk9yNwLbAid10c51YB8k/3Ki8wUg0UzDQM1ki4e9oV+//rP95AQIAl84LKcHMFk85168/yLMou0DCrs3p/KNKuSUSJ0fZUtvqbIZelpIsFHpmpHUX5LoeAvcAFyYg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NKi/vrtKO2hxxM/BDXL0thDUAdrlWI2Bx9ujQkaZ4g9OBBQA68/btaLFfHTl4BzZoVECaPDnk49abHYnVxtxhRYOr2HvAQGD4LgXW9YluZeiN4cxv6l5t6xLROiNbpgqSQS0KDdLFBmTS359+yjYthQsFxCaaZmbZi/fmVWb78uynNJMJmJ926TYoRxM551xl3jPCKbj0Qy+OWdUmEoaV6wsDad1scxQgAasxW9DgrRwiNWRtEwN5rGv2MR9OVchvDkSLxWwdFnG2Oghx6Af1bvnMgXxYYpSgEtxIBl2qn2RpzpTueyffF0C1lgn8LXExB2YeYYnhMOu1R3xs8IQLw==
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 02 Dec 2024 23:30:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2024-12-02 03:53, Jan Beulich wrote:
On 28.11.2024 17:45, Anthony PERARD wrote:
On Tue, Nov 26, 2024 at 12:19:40PM -0500, Jason Andryuk wrote:
When a VM transitioned to LIBXL_SHUTDOWN_REASON_SUSPEND, the xl daemon
was exiting as 0 = DOMAIN_RESTART_NONE "No domain restart".
Later, when the VM actually shutdown, the missing xl daemon meant the
domain wasn't cleaned up properly.

Add a new DOMAIN_RESTART_SUSPENDED to handle the case.  The xl daemon
keeps running to react to future shutdown events.

The domain death event needs to be re-enabled to catch subsequent
events.  The libxl_evgen_domain_death is moved from death_list to
death_reported, and then it isn't found on subsequent iterations through
death_list.  We enable the new event before disabling the old event, to
keep the xenstore watch active.  If it is unregistered and
re-registered, it'll fire immediately for our suspended domain which
will end up continuously re-triggering.

Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>

Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

While committing I was wondering: Does this want/need backporting (and hence
was it perhaps lacking a Fixes: tag)?

Thanks, Jan.

I don't think it's really worth backporting. Mainly, it hasn't been an issue in the last 14 years. A Linux domU doesn't suspend itself - it only does so in response to a xenstore watch. A domU *could* suspend itself without the xenstore watch, but that doesn't seem to happen in practice. Since xl has not been able to generate those xenstore events prior to the `xl suspend` introduction, this code path hasn't run or been an issue.

The tag would be:
Fixes: 1a0e17891f ("xl: support on_{poweroff,reboot,crash} domain configuration options.")

Regards,
Jason



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.