public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Lukas Wagner" <l.wagner@proxmox.com>
To: "Thomas Lamprecht" <t.lamprecht@proxmox.com>,
	<pdm-devel@lists.proxmox.com>
Subject: Re: [PATCH datacenter-manager v2 6/8] cli: add subscription key pool management subcommands
Date: Tue, 12 May 2026 14:56:02 +0200	[thread overview]
Message-ID: <DIGPQGPENFI6.25K5TTKUAVPGF@proxmox.com> (raw)
In-Reply-To: <20260507082943.2749725-7-t.lamprecht@proxmox.com>

On Thu May 7, 2026 at 10:26 AM CEST, Thomas Lamprecht wrote:
> Expose the new key-pool API to the CLI so that the subscriptions
> command group gains the following sub commands:
>
>   list-keys
>   add-keys (variadic)
>   assign-key
>   clear-key
>   remove-key
>   auto-assign
>   apply-pending
>   clear-pending
>
> The pre-existing `status` subcommand becomes a sibling under this
> `subscriptions` group.

Looks good to me in general. Maybe I've missed it, but it does not seem
that I can see which keys/nodes are pending in the CLI?

One further note inline.

Otherwise:

Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>

>
> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
> ---
>  cli/client/src/subscriptions.rs | 195 +++++++++++++++++++++++++++++++-
>  lib/pdm-client/src/lib.rs       | 126 ++++++++++++++++++++-
>  2 files changed, 316 insertions(+), 5 deletions(-)
>

[...]

> +
> +#[api]
> +/// Push all pending key assignments to remotes as a worker task.
> +async fn apply_pending() -> Result<(), Error> {
> +    match client()?.subscription_apply_pending().await? {
> +        None => println!("No pending assignments to apply."),
> +        Some(upid) => println!("Task started: {upid}"),
> +    }
> +    Ok(())
> +}

I guess this should at least wait for the task to finish? At least
that's what we usually do, see for example `remote_migrate_qemu` in
pve.rs

Streaming the task logs to the CLI would be even nicer, not sure if we
do this anywhere yet though.

> +
> +#[api]
> +/// Clear every pending assignment in one bulk transaction.
> +async fn clear_pending() -> Result<(), Error> {
> +    let cleared = client()?.subscription_clear_pending().await?;
> +    if cleared == 0 {
> +        println!("No pending assignments to clear.");
> +    } else {
> +        println!("Cleared {cleared} pending assignment(s).");
> +    }
> +    Ok(())
> +}




  reply	other threads:[~2026-05-12 12:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07  8:26 [PATCH datacenter-manager v2 0/8] subscription: add central key pool registry with reissue support Thomas Lamprecht
2026-05-07  8:26 ` [PATCH datacenter-manager v2 1/8] api: subscription cache: ensure max_age=0 forces a fresh fetch Thomas Lamprecht
2026-05-07 13:23   ` Lukas Wagner
2026-05-08 12:43   ` applied: " Lukas Wagner
2026-05-07  8:26 ` [PATCH datacenter-manager v2 2/8] api types: subscription level: render full names Thomas Lamprecht
2026-05-07 13:23   ` Lukas Wagner
2026-05-07  8:26 ` [PATCH datacenter-manager v2 3/8] subscription: add key pool data model and config layer Thomas Lamprecht
2026-05-12  9:51   ` Lukas Wagner
2026-05-07  8:26 ` [PATCH datacenter-manager v2 4/8] subscription: add key pool and node status API endpoints Thomas Lamprecht
2026-05-07 13:23   ` Lukas Wagner
2026-05-12 12:21   ` Lukas Wagner
2026-05-07  8:26 ` [PATCH datacenter-manager v2 5/8] ui: add subscription registry with key pool and node status Thomas Lamprecht
2026-05-12 14:45   ` Lukas Wagner
2026-05-07  8:26 ` [PATCH datacenter-manager v2 6/8] cli: add subscription key pool management subcommands Thomas Lamprecht
2026-05-12 12:56   ` Lukas Wagner [this message]
2026-05-07  8:26 ` [PATCH datacenter-manager v2 7/8] docs: add subscription registry chapter Thomas Lamprecht
2026-05-07  8:26 ` [PATCH datacenter-manager v2 8/8] subscription: add Reissue Key action with pending-reissue queue Thomas Lamprecht
2026-05-12 13:57   ` Lukas Wagner
2026-05-07  8:34 ` [PATCH datacenter-manager v2 9/9] fixup! ui: add subscription registry with key pool and node status Thomas Lamprecht
2026-05-07 13:23 ` [PATCH datacenter-manager v2 0/8] subscription: add central key pool registry with reissue support Lukas Wagner
2026-05-15  7:48 ` superseded: " Thomas Lamprecht

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=DIGPQGPENFI6.25K5TTKUAVPGF@proxmox.com \
    --to=l.wagner@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