Skip to content

mgr/dashboard: NFS Rate Limit for enabling disabling QOS for Cluster and Export - #62120

Closed
Achintk1491 wants to merge 8 commits into
ceph:mainfrom
rhcs-dashboard:nfs-cluster-form
Closed

Achintk1491 wants to merge 8 commits into
ceph:mainfrom
rhcs-dashboard:nfs-cluster-form

Conversation

@Achintk1491

@Achintk1491 Achintk1491 commented Mar 5, 2025 •

Copy link
Copy Markdown
Contributor

This PR is based on #61283

Fixes: https://tracker.ceph.com/issues/69839

Signed-off-by: Achint Kaur [email protected]

NFS.Bandwidth.For.Cluster.Export.mp4

Screenshare NFS Export Listing PR merged -

Screencast.from.2025-03-25.13-22-38.mp4

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

@github-actions

github-actions Bot commented Mar 5, 2025

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@Achintk1491
Achintk1491 force-pushed the nfs-cluster-form branch 3 times, most recently from 40b1b1c to 3e27648 Compare March 5, 2025 11:14
@dnyanee1997

Copy link
Copy Markdown
Contributor

@Achintk1491 , space between name and email.

@dnyanee1997

Copy link
Copy Markdown
Contributor

@Achintk1491 , need space between name and email id for Signed-Off-by

@Achintk1491
Achintk1491 force-pushed the nfs-cluster-form branch 3 times, most recently from afe6513 to 632cbd1 Compare March 5, 2025 20:00
@afreen23

afreen23 commented Mar 6, 2025 •

Copy link
Copy Markdown
Contributor

Looks great @Achintk1491 one thing here:
image

I assume this is a warning /info ? So we need proper alert in that case. Right now looks odd.

@github-project-automation github-project-automation Bot moved this from New to Review in progress in Ceph-Dashboard Mar 6, 2025
@Achintk1491
Achintk1491 marked this pull request as ready for review March 6, 2025 11:29
@Achintk1491
Achintk1491 requested review from a team as code owners March 6, 2025 11:29
@Achintk1491
Achintk1491 requested review from dnyanee1997 and pecastro and removed request for a team March 6, 2025 11:29
@dnyanee1997

Copy link
Copy Markdown
Contributor

jenkins test make check

@dnyanee1997

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@dnyanee1997

Copy link
Copy Markdown
Contributor

jenkins test api

@nizamial09 nizamial09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionally everything works.

only one thing I saw is the below one where the Bandwidth QOS Type is set to empty when ideally it should say Select a bandwidth type text in the dropdown box.

Screenshot From 2025-03-26 11-13-49

also the QOS should need to be changed as QoS everywhere in the front-end code where that's being exposed to the user.

@nizamial09

Copy link
Copy Markdown
Member

jenkins retest this please

@dnyanee1997

Copy link
Copy Markdown
Contributor

jenkins test make check

@dnyanee1997

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@dnyanee1997

Copy link
Copy Markdown
Contributor

jenkins test api

@nizamial09 nizamial09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got hit with a validation error in the backend btw. I was putting 1Gb/s to everything and it seems to fail for the IOPS QoS?

Apr 02 14:12:50 ceph-node-00 ceph-mgr[3517]: [dashboard ERROR exception] Internal Server Error
                                             Traceback (most recent call last):
                                               File "/usr/share/ceph/mgr/dashboard/services/exception.py", line 47, in dashboard_exception_handler
                                                 return handler(*args, **kwargs)
                                               File "/lib/python3.9/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__
                                                 return self.callable(*self.args, **self.kwargs)
                                               File "/usr/share/ceph/mgr/dashboard/controllers/_base_controller.py", line 263, in inner
                                                 ret = func(*args, **kwargs)
                                               File "/usr/share/ceph/mgr/dashboard/controllers/nfs.py", line 157, in toggle_cluster_qos_operation
                                                 return mgr.remote('nfs', 'enable_cluster_qos_ops', cluster_id, qos_type, **obj)
                                               File "/usr/share/ceph/mgr/mgr_module.py", line 2407, in remote
                                                 return self._ceph_dispatch_remote(module_name, method_name,
                                             RuntimeError: Remote method threw exception: Traceback (most recent call last):
                                               File "/usr/share/ceph/mgr/nfs/module.py", line 387, in enable_cluster_qos_ops
                                                 ops_obj = QOSOpsControl(enable_iops_ctrl=True,
                                               File "/usr/share/ceph/mgr/nfs/qos_conf.py", line 222, in __init__
                                                 self.max_export_iops = _validate_qos_ops(max_export_iops)
                                               File "/usr/share/ceph/mgr/nfs/qos_conf.py", line 73, in _validate_qos_ops
                                                 raise Exception(f"Provided IOS count value is not in range, Please enter a value between {min_cnt} and {max_cnt} bytes per second.")
                                             Exception: Provided IOS count value is not in range, Please enter a value between 10 and 16384 bytes per second.
                                             
                                             The above exception was the direct cause of the following exception:
                                             
                                             Traceback (most recent call last):
                                               File "/usr/share/ceph/mgr/nfs/module.py", line 391, in enable_cluster_qos_ops
                                                 raise object_format.ErrorResponse.wrap(e)
                                             object_format.ErrorResponse: Provided IOS count value is not in range, Please enter a value between 10 and 16384 bytes per second.

Comment on lines +121 to +130
observableConcat(...this.submitObservables1).subscribe({
error: () => {
// Reset the 'Submit' button.
this.nfsForm.setErrors({ cdSubmitButton: true });
},
complete: () => {
this.notificationService.show(NotificationType.success, notificationTitle);
this.goToListView();
}
});

@nizamial09 nizamial09 Apr 2, 2025 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, we already have the subscription above which does the exact same thing. Why not just reuse that. I think if you simply push to the new observable, then we don't need these changes.

I see we have

    this.submitObservables.push(this.nfsService.enableQosBandwidthForCLuster(ratelimitbwValue));

so you could just push your new observable to it?

this.submitObservables.push(
      this.nfsService.enableQosBandwidthForCLuster(ratelimitbwValue),
      this.nfsService.enableQosOpsForCLuster(ratelimitOpsValue)
    );

this should be enough right, and that would execute the observables and when everything is done it'd return you to the list page.

But right now it'll execute two observables at different time and tries to reload the listView twice which is not what we want.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a validator - For all iops values : minimum 10 iops, maximum 16384 iops

Comment on lines +643 to +656
if (
!!this.bandwidthObj &&
this.clusterAllConfig?.enable_qos === this.bandwidthObj?.enable_qos
) {
this.submitRateLimit();
}
}
if (this.bandwidthIopsObj) {
if (
!!this.bandwidthIopsObj &&
this.clusterAllConfig?.enable_ops === this.bandwidthIopsObj?.enable_ops
) {
this.submitRateOPSLimit();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both of them invokes separate observables which gets invoked and executed at different times even though they are essentially for the same thing which is not good.

Let's collect them to an observable and later execute that observable to produce a consistent behavior, rather than executing them in an asyncrhonous uncontrollable manner. And that would ensure that we only show one notification rather than multiple for each action which is also not good.

@@ -33,6 +33,7 @@ export class NfsClusterFormComponent extends CdForm implements OnInit {
qosValue: string;
nfsBwIopConfig: NFSBwIopConfig;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nfsIopsConfig: NFSBwIopConfig

@afreen23

afreen23 commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

Hey @dnyanee1997 ,
Can we keep only dashboard commits and remove the commits from other backend PR.
I see the PR on which it was based has been closed too, PTAL

Thanks

@afreen23

afreen23 commented Apr 8, 2025

Copy link
Copy Markdown
Contributor

Merge after cephadm changes

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

1 similar comment
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

ShwetaBhosale1 and others added 8 commits March 5, 2026 15:31
…parameters, then allow nfs export apply command if file has same qos block which is already set

fixes: https://tracker.ceph.com/issues/69458
Signed-off-by: Shweta Bhosale <[email protected]>
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants