From: Shweta Bhosale Date: Wed, 22 Apr 2026 09:37:18 +0000 (+0530) Subject: mgr/cephadm: Fixed scheduling test for nfs qos port X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=58b57f8713e3bd99af98b6a4b4371086c3d4efc0;p=ceph.git mgr/cephadm: Fixed scheduling test for nfs qos port Fixes: https://tracker.ceph.com/issues/69861 Signed-off-by: Shweta Bhosale --- diff --git a/src/pybind/mgr/cephadm/tests/test_scheduling.py b/src/pybind/mgr/cephadm/tests/test_scheduling.py index c377ed97cd0a..d76204c7ffdc 100644 --- a/src/pybind/mgr/cephadm/tests/test_scheduling.py +++ b/src/pybind/mgr/cephadm/tests/test_scheduling.py @@ -813,8 +813,8 @@ class NodeAssignmentTest(NamedTuple): ], {0: {2: '0.2'}, 1: {2: '1.2'}}, {0: {2: '0.2'}, 1: {2: '1.2'}, 2: {0: None}, 3: {0: None}}, - ['nfs:host1(rank=0.2 *:2049,9587,31311)', 'nfs:host2(rank=1.2 *:2049,9587,31311)', 'nfs:host3(rank=2.0 *:2049,9587,31311)', 'nfs:host3(rank=3.0 *:2050,9588,31311)'], - ['nfs:host3(rank=2.0 *:2049,9587,31311)', 'nfs:host3(rank=3.0 *:2050,9588,31311)'], + ['nfs:host1(rank=0.2 *:2049,9587,31311)', 'nfs:host2(rank=1.2 *:2049,9587,31311)', 'nfs:host3(rank=2.0 *:2049,9587,31311)', 'nfs:host3(rank=3.0 *:2050,9588,31312)'], + ['nfs:host3(rank=2.0 *:2049,9587,31311)', 'nfs:host3(rank=3.0 *:2050,9588,31312)'], [] ), # ranked, scale down @@ -841,10 +841,10 @@ class NodeAssignmentTest(NamedTuple): [], {}, {0: {0: None}, 1: {0: None}, 2: {0: None}, 3: {0: None}}, - ['nfs:host2(rank=0.0 *:2049,9587)', 'nfs:host1(rank=1.0 *:2049,9587)', - 'nfs:host2(rank=2.0 *:2050,9588)', 'nfs:host1(rank=3.0 *:2050,9588)'], - ['nfs:host2(rank=0.0 *:2049,9587)', 'nfs:host1(rank=1.0 *:2049,9587)', - 'nfs:host2(rank=2.0 *:2050,9588)', 'nfs:host1(rank=3.0 *:2050,9588)'], + ['nfs:host2(rank=0.0 *:2049,9587,31311)', 'nfs:host1(rank=1.0 *:2049,9587,31311)', + 'nfs:host2(rank=2.0 *:2050,9588,31312)', 'nfs:host1(rank=3.0 *:2050,9588,31312)'], + ['nfs:host2(rank=0.0 *:2049,9587,31311)', 'nfs:host1(rank=1.0 *:2049,9587,31311)', + 'nfs:host2(rank=2.0 *:2050,9588,31312)', 'nfs:host1(rank=3.0 *:2050,9588,31312)'], [] ), # NFS colocation with existing daemons @@ -853,14 +853,14 @@ class NodeAssignmentTest(NamedTuple): PlacementSpec(count=4), 'host1 host2'.split(), [ - DaemonDescription('nfs', '0.1', 'host1', rank=0, rank_generation=1, ports=[2049, 9587]), - DaemonDescription('nfs', '1.1', 'host2', rank=1, rank_generation=1, ports=[2049, 9587]), + DaemonDescription('nfs', '0.1', 'host1', rank=0, rank_generation=1, ports=[2049, 9587, 31311]), + DaemonDescription('nfs', '1.1', 'host2', rank=1, rank_generation=1, ports=[2049, 9587, 31311]), ], {0: {1: '0.1'}, 1: {1: '1.1'}}, {0: {1: '0.1'}, 1: {1: '1.1'}, 2: {0: None}, 3: {0: None}}, - ['nfs:host1(rank=0.1 *:2049,9587)', 'nfs:host2(rank=1.1 *:2049,9587)', - 'nfs:host2(rank=2.0 *:2050,9588)', 'nfs:host1(rank=3.0 *:2050,9588)'], - ['nfs:host2(rank=2.0 *:2050,9588)', 'nfs:host1(rank=3.0 *:2050,9588)'], + ['nfs:host1(rank=0.1 *:2049,9587,31311)', 'nfs:host2(rank=1.1 *:2049,9587,31311)', + 'nfs:host2(rank=2.0 *:2050,9588,31312)', 'nfs:host1(rank=3.0 *:2050,9588,31312)'], + ['nfs:host2(rank=2.0 *:2050,9588,31312)', 'nfs:host1(rank=3.0 *:2050,9588,31312)'], [] ), # NFS colocation with custom ports @@ -871,10 +871,10 @@ class NodeAssignmentTest(NamedTuple): [], {}, {0: {0: None}, 1: {0: None}, 2: {0: None}, 3: {0: None}}, - ['nfs:host2(rank=0.0 *:2049,9587)', 'nfs:host1(rank=1.0 *:2049,9587)', - 'nfs:host2(rank=2.0 *:3049,9588)', 'nfs:host1(rank=3.0 *:3049,9588)'], - ['nfs:host2(rank=0.0 *:2049,9587)', 'nfs:host1(rank=1.0 *:2049,9587)', - 'nfs:host2(rank=2.0 *:3049,9588)', 'nfs:host1(rank=3.0 *:3049,9588)'], + ['nfs:host2(rank=0.0 *:2049,9587,31311)', 'nfs:host1(rank=1.0 *:2049,9587,31311)', + 'nfs:host2(rank=2.0 *:3049,9588,31315)', 'nfs:host1(rank=3.0 *:3049,9588,31315)'], + ['nfs:host2(rank=0.0 *:2049,9587,31311)', 'nfs:host1(rank=1.0 *:2049,9587,31311)', + 'nfs:host2(rank=2.0 *:3049,9588,31315)', 'nfs:host1(rank=3.0 *:3049,9588,31315)'], [] ), ]) @@ -895,7 +895,7 @@ def test_node_assignment(service_type, placement, hosts, daemons, rank_map, post # Check if this is the custom ports test by looking at expected ports if expected and any('3049' in str(e) for e in expected): # Custom colocation ports test case - # First daemon uses base ports (port, monitoring_port) + # First daemon uses base ports (port, monitoring_port, cluster_qos_port) # colocation_ports defines ADDITIONAL daemons only spec = NFSServiceSpec(service_type=service_type, service_id=service_id, @@ -903,10 +903,10 @@ def test_node_assignment(service_type, placement, hosts, daemons, rank_map, post port=2049, monitoring_port=9587, colocation_ports=[ - {'data_port': 3049, 'monitoring_port': 9588}, - {'data_port': 3050, 'monitoring_port': 9589}, - {'data_port': 3051, 'monitoring_port': 9590}, - {'data_port': 3052, 'monitoring_port': 9591} + {'data_port': 3049, 'monitoring_port': 9588, 'cluster_qos_port': 31315}, + {'data_port': 3050, 'monitoring_port': 9589, 'cluster_qos_port': 31316}, + {'data_port': 3051, 'monitoring_port': 9590, 'cluster_qos_port': 31317}, + {'data_port': 3052, 'monitoring_port': 9591, 'cluster_qos_port': 31318} ]) else: spec = ServiceSpec(service_type=service_type, @@ -1978,7 +1978,7 @@ def test_blocking_daemon_host( ], [], None, - ['nfs:host1(*:2049,9587)'], + ['nfs:host1(*:2049,9587,31311)'], [], ['nfs.nfs2'] # to_remove ), @@ -2022,7 +2022,7 @@ def test_blocking_daemon_host( DaemonDescription('keepalived', 'ingress4', 'host4'), ], None, - ['nfs:host3(*:2049,9587)', 'nfs:host4(*:2049,9587)'], + ['nfs:host3(*:2049,9587,31311)', 'nfs:host4(*:2049,9587,31311)'], [], ['nfs.nfs1', 'nfs.nfs2'] # to_remove ), @@ -2042,7 +2042,7 @@ def test_blocking_daemon_host( DaemonDescription('keepalived', 'ingress3', 'host3'), ], {0: {1: '0.1', 2: '0.2'}, 1: {1: '1.1'}}, - ['nfs:host1(rank=0.2 *:2049,9587)', 'nfs:host3(rank=1.1 *:2049,9587)'], + ['nfs:host1(rank=0.2 *:2049,9587,31311)', 'nfs:host3(rank=1.1 *:2049,9587,31311)'], [], ['nfs.0.1'] ),