From: "Dominik Rusovac" <d.rusovac@proxmox.com>
To: "Daniel Kral" <d.kral@proxmox.com>,
"Thomas Lamprecht" <t.lamprecht@proxmox.com>,
<pve-devel@lists.proxmox.com>
Subject: Re: [PATCH ha-manager v2 2/2] manager: avoid nodes where moving a service failed
Date: Mon, 23 Nov 2026 13:33:37 +0100 [thread overview]
Message-ID: <DN2LDJ04WE6C.2GYJE6HFP16G1@proxmox.com> (raw)
In-Reply-To: <DN2KVVS20592.114CDHPOCIDN5@proxmox.com>
On Mon Nov 23, 2026 at 1:10 PM CET, Daniel Kral wrote:
[snip]
>> @@ -529,6 +573,7 @@ my $change_service_state = sub {
>> $sd->{state} = $new_state;
>> $sd->{node} = $old_node;
>> $sd->{failed_nodes} = $old_failed_nodes if defined($old_failed_nodes);
>> + $sd->{failed_targets} = $old_failed_targets if defined($old_failed_targets);
>> $sd->{maintenance_node} = $old_maintenance_node if defined($old_maintenance_node);
>>
>> my $text_state = '';
>> @@ -1170,6 +1215,8 @@ sub manage {
>> $self->{last_services_digest} = $services_digest;
>> }
>>
>> + $self->forget_expired_failed_targets();
>> +
>> $self->update_crm_commands();
>>
>> my $deferred_sids;
>> @@ -1353,6 +1400,7 @@ sub next_state_migrate_relocate {
>> $change_service_state->($self, $sid, $req_state, node => $sd->{node});
>> } else {
>> $haenv->log('err', "service '$sid' - migration failed (exit code $exit_code)");
>> + $sd->{failed_targets}->{ $sd->{target} } = $haenv->get_time();
>
> nit: $sd->{target} coulde be factored out as $target_node before to
> avoid dereferencing a hash value to dereference another hash value
>
> It should be noted that now any HA resource migration marks failed
> targets.
>
> Also, should we log that the HA resource will not be automatically moved
> to the node again for $FAILED_TARGET_EXPIRY, so that users are aware for
> that behavior when looking at the logs?
>
+1
[snip]
prev parent reply other threads:[~2026-11-23 12:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 6:53 [PATCH ha-manager v2 0/2] avoid stopping guests for refused moves and retrying failed targets Thomas Lamprecht
2026-11-23 6:53 ` [PATCH ha-manager v2 1/2] lrm: refuse targets dropping the guest identity before stopping guests Thomas Lamprecht
2026-11-23 6:53 ` [PATCH ha-manager v2 2/2] manager: avoid nodes where moving a service failed Thomas Lamprecht
2026-11-23 12:10 ` Daniel Kral
2026-11-23 12:33 ` Dominik Rusovac [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=DN2LDJ04WE6C.2GYJE6HFP16G1@proxmox.com \
--to=d.rusovac@proxmox.com \
--cc=d.kral@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@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