public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>, pdm-devel@lists.proxmox.com
Subject: Re: [RFC PATCH datacenter-manager 1/4] server: connection: multi client: use correct client error for retrying
Date: Wed, 3 Jun 2026 13:59:25 +0200	[thread overview]
Message-ID: <e5603a29-ff09-4796-8432-2680c8543579@proxmox.com> (raw)
In-Reply-To: <dc5ec7b3-9024-4fda-9f47-e2d332bbfd8d@proxmox.com>



On 6/3/26 1:48 PM, Thomas Lamprecht wrote:
> Am 01.06.26 um 09:19 schrieb Dominik Csapak:
>>
>> nice thanks, but after reading the commits wouldn't this now not also
>> retry the api call if it was a client one?
>>
>> it the first node returns a 'Client' error for any api call,
>> it will still retry on the second node, etc. ?
>>
>> the new code only does not retry the first node if it was a client
>> error?
> 
> yeah, you're right, this was still not completely right, oof tracing
> the error behavior of the client libs and these edge cases here are
> really not that trivial... I pushed another follow-up, would be glad
> if you could cross-check that too for sanity:
> 
> https://git.proxmox.com/?p=proxmox-datacenter-manager.git;a=commitdiff;h=c713876671f88d80bafdd3a1e7263644b4559da2
> 


I took a short look and it seem mostly OK FWICT

One thing that came to my mind though:

I think our API is not fully compliant with what the HTTP
spec defines as idempotent though:

from https://datatracker.ietf.org/doc/html/rfc7231#section-4.2.2

---
  Of the request methods
    defined by this specification, PUT, DELETE, and safe request methods
    are idempotent.
---

and

---
  Of the request methods defined by this specification, the GET, HEAD,
    OPTIONS, and TRACE methods are defined to be safe.
---

so of the methods we use in pve/pbs, only POST is not idempotent per
the spec, but e.g. we can use 'PUT' for making non-idempotent changes to 
a vm config (for example adding a disk to a VM, this will create
a disk and make any in the same slot unused)

I'm not super sure if we can get an client error here in a way
that would process the request with side effects on pve side and still
trigger a  retry on the pdm side, so I doubt this will make a difference
in practice. Still wanted to mention it.






  reply	other threads:[~2026-06-03 11:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 13:30 [PATCH datacenter-manager 0/4] implement back-off mechanism for Dominik Csapak
2026-05-29 13:30 ` [RFC PATCH datacenter-manager 1/4] server: connection: multi client: use correct client error for retrying Dominik Csapak
2026-05-29 23:25   ` Thomas Lamprecht
2026-06-01  7:19     ` Dominik Csapak
2026-06-03 11:48       ` Thomas Lamprecht
2026-06-03 11:59         ` Dominik Csapak [this message]
2026-06-04 16:30           ` Thomas Lamprecht
2026-05-29 13:30 ` [PATCH datacenter-manager 2/4] server: remote cache: prepare for back-off mechanism Dominik Csapak
2026-05-29 23:40   ` Thomas Lamprecht
2026-05-29 13:30 ` [PATCH datacenter-manager 3/4] server: connection: multi-client: use back-off state from remote cache Dominik Csapak
2026-05-29 13:30 ` [PATCH datacenter-manager 4/4] server: pbs client: rework to use the back-off mechanism " Dominik Csapak

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=e5603a29-ff09-4796-8432-2680c8543579@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pdm-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal