public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Kefu Chai <k.chai@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager] fix #8281: ceph: unify add-storage parameter
Date: Thu,  5 Nov 2026 18:03:41 +0800	[thread overview]
Message-ID: <20261105100341.3100419-1-k.chai@proxmox.com> (raw)

Pool and CephFS creation both configure a PVE storage entry, but use
different option names. Use add-storage consistently to make the CLI less
confusing and easier to script, while keeping add_storages as a
deprecated alias for existing callers.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
---
 PVE/API2/Ceph/FS.pm       |  2 +-
 PVE/API2/Ceph/Pool.pm     | 14 ++++++++++----
 www/manager6/ceph/Pool.js |  2 +-
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/PVE/API2/Ceph/FS.pm b/PVE/API2/Ceph/FS.pm
index 8f2e8b63..e738552e 100644
--- a/PVE/API2/Ceph/FS.pm
+++ b/PVE/API2/Ceph/FS.pm
@@ -138,7 +138,7 @@ __PACKAGE__->register_method({
                 maximum => 32768,
             },
             'add-storage' => {
-                description => "Configure the created CephFS as storage for this cluster.",
+                description => "Add the created CephFS to the cluster storage configuration.",
                 type => 'boolean',
                 optional => 1,
                 default => 0,
diff --git a/PVE/API2/Ceph/Pool.pm b/PVE/API2/Ceph/Pool.pm
index 8fd11b82..c03a4799 100644
--- a/PVE/API2/Ceph/Pool.pm
+++ b/PVE/API2/Ceph/Pool.pm
@@ -438,14 +438,20 @@ __PACKAGE__->register_method({
         additionalProperties => 0,
         properties => {
             node => get_standard_option('pve-node'),
-            add_storages => {
-                description => "Configure VM and CT storage using the new pool. Defaults to"
-                    . " false for replicated pools and to true for erasure-coded pools"
+            'add-storage' => {
+                description => "Add the created Ceph pool to the cluster storage configuration."
+                    . " Defaults to false for replicated pools and to true for erasure-coded pools"
                     . " (since EC pools are typically only useful when wired up to storage).",
                 type => 'boolean',
                 optional => 1,
                 default => 0,
             },
+            add_storages => {
+                description => "Deprecated alias for 'add-storage'.",
+                alias => 'add-storage',
+                type => 'boolean',
+                optional => 1,
+            },
             'erasure-coding' => {
                 description => "Create an erasure coded pool for RBD with an accompaning"
                     . " replicated pool for metadata storage. With EC, the common ceph options 'size',"
@@ -466,7 +472,7 @@ __PACKAGE__->register_method({
 
         my $pool = my $name = extract_param($param, 'name');
         my $node = extract_param($param, 'node');
-        my $add_storages = extract_param($param, 'add_storages');
+        my $add_storages = extract_param($param, 'add-storage');
 
         my $rpcenv = PVE::RPCEnvironment::get();
         my $user = $rpcenv->get_user();
diff --git a/www/manager6/ceph/Pool.js b/www/manager6/ceph/Pool.js
index a64230fb..39dcd5da 100644
--- a/www/manager6/ceph/Pool.js
+++ b/www/manager6/ceph/Pool.js
@@ -109,7 +109,7 @@ Ext.define('PVE.CephPoolInputPanel', {
                 value: '{isCreate}',
                 hidden: '{!isCreate}',
             },
-            name: 'add_storages',
+            name: 'add-storage',
             labelWidth: 140,
             autoEl: {
                 tag: 'div',
-- 
2.47.3





                 reply	other threads:[~2026-11-05 10:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261105100341.3100419-1-k.chai@proxmox.com \
    --to=k.chai@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