@@ -939,7 +939,6 @@ def check_for_ocp(self, name, options=Values()):
939939 db = ret .get_return ('connect' )
940940 cursor = ret .get_return ('cursor' )
941941 else :
942- self ._call_stdio ('error' , 'Failed to connect %s' % repository .name )
943942 break
944943
945944 self ._call_stdio ('verbose' , 'Call %s for %s' % (ocp_check [repository ], repository ))
@@ -1257,7 +1256,6 @@ def start_cluster(self, name, cmd=[], options=Values()):
12571256 db = ret .get_return ('connect' )
12581257 cursor = ret .get_return ('cursor' )
12591258 else :
1260- self ._call_stdio ('error' , 'Failed to connect %s' % repository .name )
12611259 break
12621260
12631261 if need_bootstrap and start_all :
@@ -1329,7 +1327,6 @@ def create_tenant(self, name, options=Values()):
13291327 db = ret .get_return ('connect' )
13301328 cursor = ret .get_return ('cursor' )
13311329 if not db :
1332- self ._call_stdio ('error' , 'Failed to connect %s' % repository .name )
13331330 return False
13341331
13351332 self ._call_stdio ('verbose' , 'Call %s for %s' % (create_tenant_plugins [repository ], repository ))
@@ -1376,7 +1373,6 @@ def drop_tenant(self, name, options=Values()):
13761373 db = ret .get_return ('connect' )
13771374 cursor = ret .get_return ('cursor' )
13781375 if not db :
1379- self ._call_stdio ('error' , 'Failed to connect %s' % repository .name )
13801376 return False
13811377
13821378 self ._call_stdio ('verbose' , 'Call %s for %s' % (drop_tenant_plugins [repository ], repository ))
@@ -1466,7 +1462,6 @@ def _reload_cluster(self, deploy):
14661462 db = ret .get_return ('connect' )
14671463 cursor = ret .get_return ('cursor' )
14681464 else :
1469- self ._call_stdio ('error' , 'Failed to connect %s' % repository .name )
14701465 continue
14711466
14721467 self ._call_stdio ('verbose' , 'Call %s for %s' % (reload_plugins [repository ], repository ))
@@ -1537,7 +1532,6 @@ def display_cluster(self, name):
15371532 db = ret .get_return ('connect' )
15381533 cursor = ret .get_return ('cursor' )
15391534 if not db :
1540- self ._call_stdio ('error' , 'Failed to connect %s' % repository .name )
15411535 return False
15421536
15431537 self ._call_stdio ('verbose' , 'Call %s for %s' % (display_plugins [repository ], repository ))
@@ -2135,7 +2129,6 @@ def upgrade_cluster(self, name, options=Values()):
21352129 db = ret .get_return ('connect' )
21362130 cursor = ret .get_return ('cursor' )
21372131 if not db :
2138- self ._call_stdio ('error' , 'Failed to connect %s' % current_repository .name )
21392132 return False
21402133 self ._call_stdio ('verbose' , 'Call %s for %s' % (upgrade_check_plugins [current_repository ], current_repository ))
21412134 if not upgrade_check_plugins [current_repository ](
@@ -2369,7 +2362,6 @@ def mysqltest(self, name, opts):
23692362 connect_plugin = self .search_py_script_plugin (repositories , 'connect' )[repository ]
23702363 ret = connect_plugin (deploy_config .components .keys (), ssh_clients , cluster_config , [], {}, self .stdio , target_server = opts .test_server , sys_root = False )
23712364 if not ret or not ret .get_return ('connect' ):
2372- self ._call_stdio ('error' , 'Failed to connect to the server' )
23732365 return False
23742366 db = ret .get_return ('connect' )
23752367 cursor = ret .get_return ('cursor' )
@@ -2430,7 +2422,6 @@ def mysqltest(self, name, opts):
24302422 connect_plugin = self .search_py_script_plugin (repositories , 'connect' )[repository ]
24312423 ret = connect_plugin (deploy_config .components .keys (), ssh_clients , cluster_config , [], {}, self .stdio , target_server = opts .test_server , sys_root = False )
24322424 if not ret or not ret .get_return ('connect' ):
2433- self ._call_stdio ('error' , 'Failed to connect server' )
24342425 break
24352426 db = ret .get_return ('connect' )
24362427 cursor = ret .get_return ('cursor' )
@@ -2482,6 +2473,14 @@ def sysbench(self, name, opts):
24822473 if opts .component is None :
24832474 for component_name in allow_components :
24842475 if component_name in deploy_config .components :
2476+ if opts .test_server is not None :
2477+ cluster_config = deploy_config .components [component_name ]
2478+ for server in cluster_config .servers :
2479+ if server .name == opts .test_server :
2480+ break
2481+ else :
2482+ continue
2483+ self ._call_stdio ('verbose' , 'Select component %s' % component_name )
24852484 opts .component = component_name
24862485 break
24872486 elif opts .component not in allow_components :
@@ -2556,14 +2555,12 @@ def sysbench(self, name, opts):
25562555 break
25572556 ret = connect_plugin (deploy_config .components .keys (), ssh_clients , cluster_config , [], {}, self .stdio , target_server = opts .test_server )
25582557 if not ret or not ret .get_return ('connect' ):
2559- self ._call_stdio ('error' , 'Failed to connect to the server' )
25602558 return False
25612559 odp_db = ret .get_return ('connect' )
25622560 odp_cursor = ret .get_return ('cursor' )
25632561
25642562 ret = connect_plugin (deploy_config .components .keys (), ssh_clients , cluster_config , [], {}, self .stdio , target_server = opts .test_server , ** env )
25652563 if not ret or not ret .get_return ('connect' ):
2566- self ._call_stdio ('error' , 'Failed to connect to the server' )
25672564 return False
25682565 db = ret .get_return ('connect' )
25692566 cursor = ret .get_return ('cursor' )
@@ -2650,7 +2647,6 @@ def tpch(self, name, opts):
26502647 connect_plugin = self .search_py_script_plugin (repositories , 'connect' )[repository ]
26512648 ret = connect_plugin (deploy_config .components .keys (), ssh_clients , cluster_config , [], {}, self .stdio , target_server = opts .test_server )
26522649 if not ret or not ret .get_return ('connect' ):
2653- self ._call_stdio ('error' , 'Failed to connect to the server' )
26542650 return False
26552651 db = ret .get_return ('connect' )
26562652 cursor = ret .get_return ('cursor' )
@@ -2786,7 +2782,6 @@ def tpcc(self, name, opts):
27862782 ret = connect_plugin (deploy_config .components .keys (), ssh_clients , cluster_config , [], {}, self .stdio ,
27872783 target_server = opts .test_server )
27882784 if not ret or not ret .get_return ('connect' ):
2789- self ._call_stdio ('error' , 'Failed to connect to the server' )
27902785 return False
27912786 odp_db = ret .get_return ('connect' )
27922787 odp_cursor = ret .get_return ('cursor' )
@@ -2798,7 +2793,6 @@ def tpcc(self, name, opts):
27982793 ret = connect_plugin (deploy_config .components .keys (), ssh_clients , cluster_config , [], {}, self .stdio ,
27992794 target_server = opts .test_server , ** env )
28002795 if not ret or not ret .get_return ('connect' ):
2801- self ._call_stdio ('error' , 'Failed to connect to the server' )
28022796 return False
28032797 db = ret .get_return ('connect' )
28042798 cursor = ret .get_return ('cursor' )
@@ -2867,15 +2861,13 @@ def tpcc(self, name, opts):
28672861 self .stdio ,
28682862 target_server = opts .test_server )
28692863 if not ret or not ret .get_return ('connect' ):
2870- self ._call_stdio ('error' , 'Failed to connect to the server' )
28712864 return False
28722865 odp_db = ret .get_return ('connect' )
28732866 odp_cursor = ret .get_return ('cursor' )
28742867 ret = connect_plugin (deploy_config .components .keys (), ssh_clients , cluster_config , [], {},
28752868 self .stdio ,
28762869 target_server = opts .test_server , ** env )
28772870 if not ret or not ret .get_return ('connect' ):
2878- self ._call_stdio ('error' , 'Failed to connect to the server' )
28792871 return False
28802872 db = ret .get_return ('connect' )
28812873 cursor = ret .get_return ('cursor' )
0 commit comments