@@ -238,7 +238,7 @@ def get_unsupported_upper_protocol():
238238def wait_for_node_socket (node , timeout ):
239239 binary_itf = node .network_interfaces ['binary' ]
240240 if not common .check_socket_listening (binary_itf , timeout = timeout ):
241- log .warn ("Unable to connect to binary socket for node " + node .name )
241+ log .warning ("Unable to connect to binary socket for node " + node .name )
242242 else :
243243 log .debug ("Node %s is up and listening " % (node .name ,))
244244
@@ -293,7 +293,7 @@ def remove_cluster():
293293 return
294294 except OSError :
295295 ex_type , ex , tb = sys .exc_info ()
296- log .warn ("{0}: {1} Backtrace: {2}" .format (ex_type .__name__ , ex , traceback .extract_tb (tb )))
296+ log .warning ("{0}: {1} Backtrace: {2}" .format (ex_type .__name__ , ex , traceback .extract_tb (tb )))
297297 del tb
298298 tries += 1
299299 time .sleep (1 )
@@ -343,7 +343,7 @@ def use_cluster(cluster_name, nodes, ipformat=None, start=True, workloads=[], se
343343 CCM_CLUSTER .set_configuration_options (configuration_options )
344344 except Exception :
345345 ex_type , ex , tb = sys .exc_info ()
346- log .warn ("{0}: {1} Backtrace: {2}" .format (ex_type .__name__ , ex , traceback .extract_tb (tb )))
346+ log .warning ("{0}: {1} Backtrace: {2}" .format (ex_type .__name__ , ex , traceback .extract_tb (tb )))
347347 del tb
348348
349349 log .debug ("Creating new CCM cluster, {0}, with args {1}" .format (cluster_name , ccm_options ))
@@ -413,12 +413,12 @@ def execute_until_pass(session, query):
413413 try :
414414 return session .execute (query )
415415 except (ConfigurationException , AlreadyExists , InvalidRequest ):
416- log .warn ("Received already exists from query {0} not exiting" .format (query ))
416+ log .warning ("Received already exists from query {0} not exiting" .format (query ))
417417 # keyspace/table was already created/dropped
418418 return
419419 except (OperationTimedOut , ReadTimeout , ReadFailure , WriteTimeout , WriteFailure ):
420420 ex_type , ex , tb = sys .exc_info ()
421- log .warn ("{0}: {1} Backtrace: {2}" .format (ex_type .__name__ , ex , traceback .extract_tb (tb )))
421+ log .warning ("{0}: {1} Backtrace: {2}" .format (ex_type .__name__ , ex , traceback .extract_tb (tb )))
422422 del tb
423423 tries += 1
424424
@@ -431,12 +431,12 @@ def execute_with_long_wait_retry(session, query, timeout=30):
431431 try :
432432 return session .execute (query , timeout = timeout )
433433 except (ConfigurationException , AlreadyExists ):
434- log .warn ("Received already exists from query {0} not exiting" .format (query ))
434+ log .warning ("Received already exists from query {0} not exiting" .format (query ))
435435 # keyspace/table was already created/dropped
436436 return
437437 except (OperationTimedOut , ReadTimeout , ReadFailure , WriteTimeout , WriteFailure ):
438438 ex_type , ex , tb = sys .exc_info ()
439- log .warn ("{0}: {1} Backtrace: {2}" .format (ex_type .__name__ , ex , traceback .extract_tb (tb )))
439+ log .warning ("{0}: {1} Backtrace: {2}" .format (ex_type .__name__ , ex , traceback .extract_tb (tb )))
440440 del tb
441441 tries += 1
442442
@@ -463,12 +463,12 @@ def drop_keyspace_shutdown_cluster(keyspace_name, session, cluster):
463463 try :
464464 execute_with_long_wait_retry (session , "DROP KEYSPACE {0}" .format (keyspace_name ))
465465 except :
466- log .warn ("Error encountered when droping keyspace {0}" .format (keyspace_name ))
466+ log .warning ("Error encountered when droping keyspace {0}" .format (keyspace_name ))
467467 ex_type , ex , tb = sys .exc_info ()
468- log .warn ("{0}: {1} Backtrace: {2}" .format (ex_type .__name__ , ex , traceback .extract_tb (tb )))
468+ log .warning ("{0}: {1} Backtrace: {2}" .format (ex_type .__name__ , ex , traceback .extract_tb (tb )))
469469 del tb
470470 finally :
471- log .warn ("Shutting down cluster" )
471+ log .warning ("Shutting down cluster" )
472472 cluster .shutdown ()
473473
474474
0 commit comments