From: Shweta Bhosale Date: Mon, 24 Feb 2025 05:52:20 +0000 (+0530) Subject: mgr/nfs: Updating QoS min and max limit of bandwidth and iops values X-Git-Tag: v21.0.1~385^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=46cde5b75895d0a168362cc05d8d78030875aafe;p=ceph.git mgr/nfs: Updating QoS min and max limit of bandwidth and iops values fixes: https://tracker.ceph.com/issues/69458 Signed-off-by: Shweta Bhosale --- diff --git a/src/pybind/mgr/nfs/qos_conf.py b/src/pybind/mgr/nfs/qos_conf.py index b76ec54b060..bea1dc81b4a 100644 --- a/src/pybind/mgr/nfs/qos_conf.py +++ b/src/pybind/mgr/nfs/qos_conf.py @@ -59,18 +59,18 @@ class QOSType(Enum): def _validate_qos_bw(bandwidth: str) -> int: min_bw = 1000000 # 1MB - max_bw = 2000000000 # 2GB + max_bw = 4000000000 # 4GB bw_bytes = with_units_to_int(bandwidth) if bw_bytes != 0 and (bw_bytes < min_bw or bw_bytes > max_bw): - raise Exception(f"Provided bandwidth value is not in range, Please enter a value between {min_bw} (1MB) and {max_bw} (2GB) bytes") + raise Exception(f"Provided bandwidth value is not in range, Please enter a value between {min_bw} (1MB) and {max_bw} (4GB) bytes per second.") return bw_bytes def _validate_qos_ops(count: int) -> int: - min_cnt = 1000 # 1K - max_cnt = 500000 # 5L + min_cnt = 10 + max_cnt = 16384 if count != 0 and (count < min_cnt or count > max_cnt): - raise Exception(f"Provided IOS count value is not in range, Please enter a value between {min_cnt} (1K) and {max_cnt} (5L) bytes") + raise Exception(f"Provided IOS count value is not in range, Please enter a value between {min_cnt} and {max_cnt} bytes per second.") return count diff --git a/src/pybind/mgr/nfs/tests/test_nfs.py b/src/pybind/mgr/nfs/tests/test_nfs.py index 39c18c786d0..cf396ecf83f 100644 --- a/src/pybind/mgr/nfs/tests/test_nfs.py +++ b/src/pybind/mgr/nfs/tests/test_nfs.py @@ -1584,14 +1584,14 @@ EXPORT { @pytest.mark.parametrize("qos_type, params, positive_tc", [ (QOSType['PerShare'], {'max_export_iops': 10000}, True), - (QOSType['PerClient'], {'max_client_iops': 20000}, True), - (QOSType['PerShare_PerClient'], {'max_export_iops': 3000, 'max_client_iops': 40000}, True), + (QOSType['PerClient'], {'max_client_iops': 15000}, True), + (QOSType['PerShare_PerClient'], {'max_export_iops': 3000, 'max_client_iops': 14000}, True), # negative testing (QOSType['PerShare_PerClient'], {'max_export_iops': 1000}, False), (QOSType['PerShare'], {'max_client_iops': 10000}, False), (QOSType['PerShare'], {}, False), (QOSType['PerClient'], {'max_export_iops': 2000, 'max_client_iops': 1000}, False), - (QOSType['PerShare_PerClient'], {'max_export_iops': 10}, False) + (QOSType['PerShare_PerClient'], {'max_export_iops': 9}, False) ]) def test_cluster_qos_ops(self, qos_type, params, positive_tc): self._do_mock_test(self._do_test_cluster_qos_ops, qos_type, params, positive_tc) @@ -1630,13 +1630,13 @@ EXPORT { @pytest.mark.parametrize("qos_type, clust_params", [ (QOSType['PerShare'], {'max_export_iops': 10000}), - (QOSType['PerClient'], {'max_client_iops': 20000}), - (QOSType['PerShare_PerClient'], {'max_export_iops': 3000, 'max_client_iops': 40000}) + (QOSType['PerClient'], {'max_client_iops': 2000}), + (QOSType['PerShare_PerClient'], {'max_export_iops': 3000, 'max_client_iops': 4000}) ]) @pytest.mark.parametrize("export_params", [ ({'max_export_iops': 10000}), - ({'max_client_iops': 20000}), - ({'max_export_iops': 3000, 'max_client_iops': 40000}) + ({'max_client_iops': 2000}), + ({'max_export_iops': 3000, 'max_client_iops': 4000}) ]) def test_export_qos_ops(self, qos_type, clust_params, export_params): self._do_mock_test(self._do_test_export_qos_ops, qos_type, clust_params, export_params) @@ -1680,10 +1680,10 @@ EXPORT { (QOSType['PerShare'], {'export_writebw': '100MB', 'export_readbw': '200MB'}, QOSType['PerShare'], {'max_export_iops': 10000}, True), (QOSType['PerClient'], {'client_writebw': '300MB', 'client_readbw': '400MB'}, - QOSType['PerClient'], {'max_client_iops': 20000}, True), + QOSType['PerClient'], {'max_client_iops': 2000}, True), (QOSType['PerShare_PerClient'], {'export_writebw': '100MB', 'export_readbw': '200MB', 'client_writebw': '300MB', 'client_readbw': '400MB'}, - QOSType['PerShare_PerClient'], {'max_export_iops': 3000, 'max_client_iops': 40000}, True), + QOSType['PerShare_PerClient'], {'max_export_iops': 3000, 'max_client_iops': 4000}, True), # negative TCs (QOSType['PerShare'], {'export_writebw': '100MB', 'export_readbw': '200MB'}, QOSType['PerClient'], {}, False), (QOSType['PerClient'], {'client_writebw': '300MB', 'client_readbw': '400MB'}, QOSType['PerShare'], {}, False), @@ -1754,14 +1754,14 @@ EXPORT { @pytest.mark.parametrize("qos_type, clust_bw_params, clust_ops_params", [ # positive TCs (QOSType['PerShare'], {'export_writebw': '100MB', 'export_readbw': '200MB'}, {'max_export_iops': 10000}), - (QOSType['PerClient'], {'client_writebw': '300MB', 'client_readbw': '400MB'}, {'max_client_iops': 20000}), + (QOSType['PerClient'], {'client_writebw': '300MB', 'client_readbw': '400MB'}, {'max_client_iops': 2000}), (QOSType['PerShare_PerClient'], - {'export_writebw': '100MB', 'export_readbw': '200MB', 'client_writebw': '300MB', 'client_readbw': '400MB'}, {'max_export_iops': 3000, 'max_client_iops': 40000}) + {'export_writebw': '100MB', 'export_readbw': '200MB', 'client_writebw': '300MB', 'client_readbw': '400MB'}, {'max_export_iops': 3000, 'max_client_iops': 4000}) ]) @pytest.mark.parametrize("export_bw_params, export_ops_params", [ ({'export_writebw': '100MB', 'export_readbw': '200MB'}, {'max_export_iops': 10000}), - ({'client_writebw': '300MB', 'client_readbw': '400MB'}, {'max_client_iops': 20000}), - ({'export_writebw': '100MB', 'export_readbw': '200MB', 'client_writebw': '300MB', 'client_readbw': '400MB'}, {'max_export_iops': 3000, 'max_client_iops': 40000}) + ({'client_writebw': '300MB', 'client_readbw': '400MB'}, {'max_client_iops': 12000}), + ({'export_writebw': '100MB', 'export_readbw': '200MB', 'client_writebw': '300MB', 'client_readbw': '400MB'}, {'max_export_iops': 3000, 'max_client_iops': 4000}) ]) def test_export_qos_bw_ops(self, qos_type, clust_bw_params, clust_ops_params, export_bw_params, export_ops_params): self._do_mock_test(self._do_test_export_qos_bw_ops, qos_type, clust_bw_params, clust_ops_params, export_bw_params, export_ops_params)