* [PATCH manager v2] ui: ceph: pool: set target ratio to 0 when the value is not set
@ 2026-07-29 10:26 Maximiliano Sandoval
2026-07-29 15:27 ` applied: " Fiona Ebner
0 siblings, 1 reply; 2+ messages in thread
From: Maximiliano Sandoval @ 2026-07-29 10:26 UTC (permalink / raw)
To: pve-devel
Leaving the field empty in the web UI results in the parameter being dropped
before the API call and the value remaining unchanged on the pool.
We address this by passing down target_size_ratio=0 to the API if the value is
not explicitly set, this results in the key being unset on the pool.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
Notes:
One can get the target_size_ratio using
$ ceph osd pool get <POOL_NAME> target_size_ratio
after setting the value to 0 through the API or Web UI (explicitly as 0, or
leaving the field as empty) it should output
Error ENOENT: option 'target_size_ratio' is not set on pool '<POOL_NAME>'
Note that:
- This is handled automatically for the target_size property.
- The same fix does not work for the Min. # of PGs field
Differences from v1:
- Rebased on top of master
- Reworded commit message
www/manager6/ceph/Pool.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/www/manager6/ceph/Pool.js b/www/manager6/ceph/Pool.js
index 80d57f113..a64230fbc 100644
--- a/www/manager6/ceph/Pool.js
+++ b/www/manager6/ceph/Pool.js
@@ -234,7 +234,11 @@ Ext.define('PVE.CephPoolInputPanel', {
onGetValues: function (values) {
Object.keys(values || {}).forEach(function (name) {
if (values[name] === '') {
- delete values[name];
+ if (name === 'target_size_ratio') {
+ values[name] = 0;
+ } else {
+ delete values[name];
+ }
}
});
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-29 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 10:26 [PATCH manager v2] ui: ceph: pool: set target ratio to 0 when the value is not set Maximiliano Sandoval
2026-07-29 15:27 ` applied: " Fiona Ebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox