Repository navigation
tentacle: mgr/dashboard : add stretch cluster validation for pools form - #68476
Conversation
batrick
left a comment
There was a problem hiding this comment.
Automated Backport Parity Review - Multiple PRs Detected
This backport appears to pull commits from multiple main PRs including: PR #67952, PR #67841.
This must be explicitly documented in the backport PR description. Furthermore, each backport tracker ticket associated with these main PRs must be linked to this PR.
Commit Parity Visualizer:
================================================================================
COMMIT PARITY VISUALIZER
================================================================================
BACKPORT PR #68476 SOURCE PR / STATUS
--------------------------------------------------------------------------------
[ feed9f7e ] mgr/dashboard : add stret... PR #67952 [ 6fa8d64e ] mgr/dashboard : add ...
[ b5a660b5 ] mgr/dashboard : Fix appli... PR #67841 [ 5c29aa59 ] mgr/dashboard : Fix ...
[ 8763578b ] mgr/dashboard : Select re... [ 195cc2f8 ] mgr/dashboard : Sele...
================================================================================
When you are ready for this to be reviewed and QA'd again, please add the pdonnell-tentacle-RFA label to this PR.
batrick
left a comment
There was a problem hiding this comment.
Automated Backport Parity Review - Backport Deviation Alert
A conflict or unapproved deviation was detected during the simulation of this backport, and the changes appear to be incorrect or undocumented. Please review the highlighted files. Make sure Conflict markers are left into cherry-picks with explanations.
Be familiar with the rules and guidelines for writing backports.
Affected File(s):
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.tssrc/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts
Commit Parity Visualizer:
================================================================================
COMMIT PARITY VISUALIZER
================================================================================
BACKPORT PR #68476 SOURCE PR / STATUS
--------------------------------------------------------------------------------
[ feed9f7e ] mgr/dashboard : add stret... PR #67952 [ 6fa8d64e ] mgr/dashboard : add ...
[ b5a660b5 ] mgr/dashboard : Fix appli... PR #67841 [ 5c29aa59 ] mgr/dashboard : Fix ...
[ 8763578b ] mgr/dashboard : Select re... [ 195cc2f8 ] mgr/dashboard : Sele...
================================================================================
Range Diff:
Click to expand
--- Original (195cc2f8)
+++ Backport (8763578b)
@@ -1,3 +1,5 @@
mgr/dashboard : Select replicated rule by default in pools form
fixes : https://tracker.ceph.com/issues/75632
Signed-off-by: Abhishek Desai <[email protected]>
+
+(cherry picked from commit 195cc2f8c23b8ae327f769ab7aca0f460d6029ab)
================================================================================
RANGE DIFF
================================================================================
1: 195cc2f8c23 ! 1: 8763578b6bb mgr/dashboard : Select replicated rule by default in pools form fixes : https://tracker.ceph.com/issues/75632 Signed-off-by: Abhishek Desai <[email protected]>
@@ Commit message
fixes : https://tracker.ceph.com/issues/75632
Signed-off-by: Abhishek Desai <[email protected]>
+ (cherry picked from commit 195cc2f8c23b8ae327f769ab7aca0f460d6029ab)
+
## src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form-data.ts ##
@@
import { Validators } from '@angular/forms';
@@ src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.componen
import { PoolFormComponent } from './pool-form.component';
@@ src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts: describe('PoolFormComponent', () => {
+
+ it('is invalid at the beginning all sub forms are valid', () => {
expect(form.valid).toBeFalsy();
- // With default poolType 'replicated', expect 'name' required.
- ['name'].forEach((name) => formHelper.expectError(name, 'required'));
-- // For replicated type with multiple crush rules, 'crushRule' is required.
-- formHelper.expectError('crushRule', 'required');
+- ['name', 'poolType', 'pgNum'].forEach((name) => formHelper.expectError(name, 'required'));
+- ['size', 'crushRule', 'erasureProfile', 'ecOverwrites'].forEach((name) =>
+- formHelper.expectValid(name)
+- );
++ // With default poolType 'replicated', expect 'name' required.
++ ['name'].forEach((name) => formHelper.expectError(name, 'required'));
+ // crushRule is auto-selected when replicated rules exist, so it is valid.
+ formHelper.expectValid('crushRule');
- // Other fields are valid by default.
- ['size', 'erasureProfile', 'ecOverwrites'].forEach((name) => formHelper.expectValid(name));
++ // Other fields are valid by default.
++ ['size', 'erasureProfile', 'ecOverwrites'].forEach((name) => formHelper.expectValid(name));
expect(component.form.get('compression').valid).toBeTruthy();
+ });
+
+@@ src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts: describe('PoolFormComponent', () => {
+ });
+
+ it('validates poolType', () => {
+- formHelper.expectError('poolType', 'required');
++ // Default is replicated; the control is not empty, so there is no required error.
++ formHelper.expectValid('poolType');
++ expect(form.getValue('poolType')).toBe(PoolType.REPLICATED);
+ formHelper.expectValidChange('poolType', 'erasure');
+ formHelper.expectValidChange('poolType', 'replicated');
+ });
+
+ it('validates that pgNum is required creation mode', () => {
++ // After getInfo(), pgCalc() fills pgNum automatically; clear and mark dirty so
++ // auto-calc does not overwrite empty (see poolTypeChange / pgCalc guards).
++ formHelper.setValue('pgNum', '', true);
++ fixture.detectChanges();
+ formHelper.expectError(form.get('pgNum'), 'required');
+ });
+
@@ src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts: describe('PoolFormComponent', () => {
expect(form.valid).toBeTruthy();
});
@@ src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.componen
import { PoolEditModeResponseModel } from '../../block/mirroring/pool-edit-mode-modal/pool-edit-mode-response.model';
import { RbdMirroringService } from '~/app/shared/api/rbd-mirroring.service';
@@ src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts: interface MonitorResponse {
- standalone: false
+ styleUrls: ['./pool-form.component.scss']
})
export class PoolFormComponent extends CdForm implements OnInit {
+ private static readonly DEFAULT_RULE_NAME = 'replicated_rule';
@@ src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.componen
})
]
}),
-- poolType: new UntypedFormControl('replicated', {
+- poolType: new UntypedFormControl('', {
+ poolType: new UntypedFormControl(PoolType.REPLICATED, {
validators: [Validators.required]
}),
@@ src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.componen
}
this.listenToChanges();
this.setComplexValidators();
-- this.poolTypeChange('replicated');
+ this.poolTypeChange(PoolType.REPLICATED);
});
this.loadingReady();|
@abhidesai6 @afreen23 this broke the build, pls fix Auto-merging src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts |
|
All the tests are passing on this. Thanks Yuri for helping with re-scheduling those. |
c81823c to
ea577af
Compare
ea577af to
e4e27ce
Compare
|
Added conflict resolution messages in commit. |
Still @abhidesai6 @afreen23 |
batrick
left a comment
There was a problem hiding this comment.
Automated PR Review - Rebase Required
This PR currently has merge conflicts with the target base branch. Please rebase and resolve the conflicts.
Automated Backport Parity Review - Multiple PRs Detected
This backport appears to pull commits from multiple main PRs including: PR #67841, PR #67952, PR #68658.
This must be made explicit in the backport PR description. Furthermore, each backport tracker ticket associated with these main PRs must be linked to this PR.
Commit Parity Visualizer
| BACKPORT PR #68476 | SOURCE PR | SOURCE STATUS |
|---|---|---|
| 52cb63f5f9b36d090054072d187a782e3e287ddb mgr/dashboard : add stretch cluster validation for pools form | PR #67952 | 6fa8d64 mgr/dashboard : add stretch cluster validation for pools form |
| 2bd92b773b810743c4db368af887477f7e7f9bde mgr/dashboard : Fix application names in pools form | PR #67841 | 5c29aa5 mgr/dashboard : Fix application names in pools form |
| 4b0eb4b909223e5190ce846756e1356de8ad2f29 mgr/dashboard : Select replicated rule by default in pools form | 195cc2f mgr/dashboard : Select replicated rule by default in pools form | |
| e4e27ce94699bb713484a82c6db7f4f48ff3ed70 mgr/dashboard: Update permissions for pool-manager role | PR #68658 | f476cd5 mgr/dashboard: Update permissions for pool-manager role |
🛟 Need Help?
If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.
📋 Component Lead / Release Manager
To override the audit failure, apply releng-audit-override label or comment /audit override.
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
fixes : https://tracker.ceph.com/issues/75667 Signed-off-by: Abhishek Desai <[email protected]> (cherry picked from commit 6fa8d64)
Signed-off-by: Abhishek Desai <[email protected]> (cherry picked from commit 5c29aa5)
fixes : https://tracker.ceph.com/issues/75632 Signed-off-by: Abhishek Desai <[email protected]> (cherry picked from commit 195cc2f) Conflicts : - src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts changes already present in tentacle - src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts changes already present in tentacle
Fixes https://tracker.ceph.com/issues/76307 - says denied access when clicked on create pool table action - this was happening due to the failing monitor API added for stretch cluster configuration - also updates overview nav permissions Signed-off-by: Afreen Misbah <[email protected]> (cherry picked from commit f476cd5)
e4e27ce to
a363922
Compare
|
Rebased the PR. Added conflict resolution . |
This is a batch backport PR for pool form related changes and includes following PRs:
#67952
#67841
#68658