public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Alexandre Derumier <aderumier@odiso.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [PATCH-SERIES pve-http-server/pve-manager] fix#4689: rewrite_uri: autofind nodename for qemu/lxc
Date: Wed, 31 May 2023 13:49:06 +0200	[thread overview]
Message-ID: <34txhm5gfddewcnzey36ztjxrqfrvlbx2csdojsq4j5kg6ebxz@6tyvuac6n3dh> (raw)
In-Reply-To: <20230531111952.568734-1-aderumier@odiso.com>

On Wed, May 31, 2023 at 01:19:50PM +0200, Alexandre Derumier wrote:
> Hi,
> 
> Currently, to manage qemu && lxc vms, we always need to specify nodename in uri.
> 
> This is a problem with automation tools like terraform, where is node is registered
> in the state of terraform.
> (That mean, than if we move the vm on another node, terraform don't known it, and try to create the vm
> again or can't delete the vm,...)
> https://github.com/Telmate/terraform-provider-proxmox/issues/168
> 
> This can also be a potential problem with race, if we need to query /cluster/ressources to find the node, then another
> query on the vm.
> 
> I have some discussion with fabian about it:
> https://bugzilla.proxmox.com/show_bug.cgi?id=4689
> 
> 
> This patch series, simply find the nodename if not specified and rewrite url.
> 
> /nodes/(qemu|lxc)/<vmid> ---> /nodes/<nodename>/<qemu|lxc>/<vmid>

But then `qemu`/`lxc` look like a node name, which is weird.
If we do this, maybe we should use a different start entry altogether to
not mix too many "aliases" into the "real" api tree, like
`/virtual/qemu/*` or `/guests/qemu/*`?




  parent reply	other threads:[~2023-05-31 11:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31 11:19 Alexandre Derumier
2023-05-31 11:19 ` [pve-devel] [PATCH pve-http-server 1/1] anyevent: add rewrite_uri Alexandre Derumier
2023-05-31 11:19 ` [pve-devel] [PATCH pve-manager 1/1] httpserver: add rewrite uri for /nodes/(qemu/lxc)/<vmid> Alexandre Derumier
2023-05-31 11:49 ` Wolfgang Bumiller [this message]
2023-05-31 14:12   ` [pve-devel] [PATCH-SERIES pve-http-server/pve-manager] fix#4689: rewrite_uri: autofind nodename for qemu/lxc DERUMIER, Alexandre
2023-05-31 13:19 ` Dominik Csapak
2023-05-31 14:05   ` DERUMIER, Alexandre

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=34txhm5gfddewcnzey36ztjxrqfrvlbx2csdojsq4j5kg6ebxz@6tyvuac6n3dh \
    --to=w.bumiller@proxmox.com \
    --cc=aderumier@odiso.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