From: Stephan Müller Date: Mon, 2 Mar 2020 11:26:48 +0000 (+0100) Subject: mgr/dashboard: Crush rule is only send during replicated pool creation X-Git-Tag: v15.1.1~39^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9addcfcff93df58273e38f39d9b1f5cbaf1e78de;p=ceph.git mgr/dashboard: Crush rule is only send during replicated pool creation 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 --- 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',