]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nfs: Updating QoS min and max limit of bandwidth and iops values
authorShweta Bhosale <Shweta.Bhosale1@ibm.com>
Mon, 24 Feb 2025 05:52:20 +0000 (11:22 +0530)
committerShweta Bhosale <Shweta.Bhosale1@ibm.com>
Mon, 27 Apr 2026 12:49:14 +0000 (18:19 +0530)
fixes: https://tracker.ceph.com/issues/69458
Signed-off-by: Shweta Bhosale <Shweta.Bhosale1@ibm.com>
src/pybind/mgr/nfs/qos_conf.py
src/pybind/mgr/nfs/tests/test_nfs.py

index b76ec54b0606db1aeb8b5fe62bd60d4e378a5e8b..bea1dc81b4a32593de21d0efc43212ac0d215b5f 100644 (file)
@@ -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
 
 
index 39c18c786d0f63be06088835d75092e4a20ef557..cf396ecf83fb94e109a651e424433f889c25ace4 100644 (file)
@@ -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)