public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager 0/1] ui: ceph: fix muting a health check with no expiry
@ 2026-09-27 14:16 Kefu Chai
  2026-09-27 14:18 ` [PATCH manager] fix #8046: " Kefu Chai
  0 siblings, 1 reply; 2+ messages in thread
From: Kefu Chai @ 2026-09-27 14:16 UTC (permalink / raw)
  To: pve-devel

Hi everyone,

This fixes https://bugzilla.proxmox.com/show_bug.cgi?id=8046

Verified on a real PVE cluster carrying the

    all OSDs are running tentacle or later but require_osd_release < tentacle

warning. Before the patch, muting it with "Duration" set to "No
expiry" failed with:

    Parameter verification failed. (400)
    ttl: value does not match the regex pattern

After rebuilding pve-manager with this patch applied, muting the same
warning with "No expiry" succeeded, and the cluster's status moved to
HEALTH_OK.

Kefu Chai (1):
  fix #8046: ui: ceph: fix muting a health check with no expiry

 www/manager6/ceph/HealthMute.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.47.3





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH manager] fix #8046: ui: ceph: fix muting a health check with no expiry
  2026-09-27 14:16 [PATCH manager 0/1] ui: ceph: fix muting a health check with no expiry Kefu Chai
@ 2026-09-27 14:18 ` Kefu Chai
  0 siblings, 0 replies; 2+ messages in thread
From: Kefu Chai @ 2026-09-27 14:18 UTC (permalink / raw)
  To: pve-devel

Ext.form.field.ComboBox cannot round-trip an empty string as a store
record's key. Selecting the 'No expiry' item, keyed '', submitted the
record's internal id (e.g. 'KeyValue-1') instead, and the API rejected
that as an invalid ttl.

The cause is in Proxmox.form.KVComboBox's backing model: it uses the
same field, 'key', for both idProperty and valueField. Ext.data.Model
replaces a falsy id with an autogenerated one on that field, so a
record keyed '' gets its key overwritten. Use the toolkit's
'__default__' sentinel instead; Proxmox.form.KVComboBox already drops
that value on submit, so choosing no expiry now sends no ttl at all.
Most other proxmoxKVComboBox fields in this tree already key their
'unset' item as '__default__' (AuthEditLDAP.js, MachineEdit.js,
SystemEdit.js, and roughly two dozen more); HealthMute.js was the one
place still using ''.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
---
 www/manager6/ceph/HealthMute.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/manager6/ceph/HealthMute.js b/www/manager6/ceph/HealthMute.js
index 8ea73635..5d356686 100644
--- a/www/manager6/ceph/HealthMute.js
+++ b/www/manager6/ceph/HealthMute.js
@@ -14,12 +14,14 @@ Ext.define('PVE.ceph.HealthMuteInputPanel', {
             name: 'ttl',
             fieldLabel: gettext('Duration'),
             editable: true,
-            value: '',
+            value: '__default__',
             // without this an empty field is submitted as a request to delete the property,
             // which this endpoint does not accept
             deleteEmpty: false,
             comboItems: [
-                ['', gettext('No expiry')],
+                // KVComboBox cannot round-trip an empty string as a key, so use the
+                // toolkit's '__default__' sentinel, which it already drops on submit
+                ['__default__', gettext('No expiry')],
                 ['1h', gettext('1 hour')],
                 ['1d', gettext('1 day')],
                 ['1w', gettext('1 week')],
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-27 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-27 14:16 [PATCH manager 0/1] ui: ceph: fix muting a health check with no expiry Kefu Chai
2026-09-27 14:18 ` [PATCH manager] fix #8046: " Kefu Chai

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