From 9addcfcff93df58273e38f39d9b1f5cbaf1e78de Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20M=C3=BCller?= Date: Mon, 2 Mar 2020 12:26:48 +0100 Subject: [PATCH] mgr/dashboard: Crush rule is only send during replicated pool creation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The problem was that the crush rule setting was send during the creation of a pool - the type didn't matter, but the setting is only used if a replicated pool is created. This hasn't created any problems yet, but to prevent that it's now omitted for erasure code pool creations. Fixes: https://tracker.ceph.com/issues/44371 Signed-off-by: Stephan Müller --- .../src/app/ceph/pool/pool-form/pool-form.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts index f67adba02b8fe..8e3e18f53bf43 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts @@ -574,7 +574,11 @@ export class PoolFormComponent implements OnInit { formControlName: 'erasureProfile', attr: 'name' }, - { externalFieldName: 'rule_name', formControlName: 'crushRule', attr: 'rule_name' }, + { + externalFieldName: 'rule_name', + formControlName: 'crushRule', + replaceFn: (value: CrushRule) => (this.isReplicated ? value && value.rule_name : undefined) + }, { externalFieldName: 'quota_max_bytes', formControlName: 'max_bytes', -- 2.39.5