public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>,
	"Fabian Grünbichler" <f.gruenbichler@proxmox.com>
Subject: [pve-devel] applied: [PATCH ha-manager] lrm: fix getting stuck on restart
Date: Wed, 27 Apr 2022 14:00:12 +0200	[thread overview]
Message-ID: <54cb7acd-2586-aeae-d867-34b9e1f271ac@proxmox.com> (raw)
In-Reply-To: <20220427101955.3550677-1-f.gruenbichler@proxmox.com>

On 27.04.22 12:19, Fabian Grünbichler wrote:
> run_workers is responsible for updating the state after workers have
> exited. if the current LRM state is 'active', but a shutdown_request was
> issued in 'restart' mode (like on package upgrades), this call is the
> only one made in the LRM work() loop.
> 
> skipping it if there are active services means the following sequence of
> events effectively keeps the LRM from restarting or making any progress:
> 
> - start HA migration on node A
> - reload LRM on node A while migration is still running
> 
> even once the migration is finished, the service count is still >= 1
> since the LRM never calls run_workers (directly or via
> manage_resources), so the service having been migrated is never noticed.
> 
> maintenance mode (i.e., rebooting the node with shutdown policy migrate)
> does call manage_resources and thus run_workers, and will proceed once
> the last worker has exited.
> 
> reported by a user:
> 
> https://forum.proxmox.com/threads/lrm-hangs-when-updating-while-migration-is-running.108628
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
> better viewed with -w ;)
> 
>  src/PVE/HA/LRM.pm | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
> 
>

good fix!

applied, thanks!




      reply	other threads:[~2022-04-27 12:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 10:19 [pve-devel] " Fabian Grünbichler
2022-04-27 12:00 ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54cb7acd-2586-aeae-d867-34b9e1f271ac@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=f.gruenbichler@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal