Module Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore SubscriptLoad NameLoad Index Str body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Expr Call NameLoad keyword NameLoad keyword Num keyword Num Expr Call NameLoad keyword NameLoad keyword Num Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Expr Call NameLoad keyword NameLoad keyword Num keyword Num Expr Call NameLoad keyword NameLoad keyword Num Assign NameStore Num Assign NameStore Num While NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index Num Assign NameStore NameLoad For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr NameLoad body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Break If NameLoad body Break If CompareGtE NameLoad NameLoad body Raise Call NameLoad Str AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr NameLoad Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str TryExcept body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore SubscriptLoad NameLoad Index Str body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Expr Call NameLoad keyword NameLoad keyword Num keyword Num Expr Call NameLoad keyword NameLoad keyword Num Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Expr Call NameLoad keyword NameLoad keyword Num keyword Num Expr Call NameLoad keyword NameLoad keyword Num Assign NameStore Num Assign NameStore Num While NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Index Num Assign NameStore NameLoad For NameStore SubscriptLoad NameLoad Index Str body If CompareEq AttributeLoad NameLoad attr NameLoad body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Break If NameLoad body Break If CompareGtE NameLoad NameLoad body Raise Call NameLoad Str AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr NameLoad Expr Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr NameLoad Return NameLoad decorator_list decorator_list
N/A N/A logging util full_stack workflow.steps.util.base BaseStep workflow.exceptions.error_codes DBAAS_0020 workflow.steps.redis.util change_slave_priority_file workflow.steps.redis.util change_slave_priority_instance workflow.steps.redis.util failover_sentinel time sleep N/A LOG N/A N/A logging getLogger __name__ SwitchMaster N/A BaseStep N/A __unicode__ N/A N/A self N/A N/A N/A Switching master... N/A do N/A N/A self workflow_dict N/A N/A N/A N/A N/A databaseinfra N/A workflow_dict N/A databaseinfra N/A driver N/A N/A databaseinfra get_driver N/A source_instance N/A workflow_dict N/A source_instances N/A N/A N/A N/A source_instance instance_type N/A source_instance REDIS N/A N/A source_host N/A source_instance hostname N/A N/A change_slave_priority_file host source_host original_value 100 final_value 0 N/A N/A change_slave_priority_instance instance source_instance final_value 0 N/A target_instance N/A source_instance future_instance N/A target_host N/A target_instance hostname N/A N/A change_slave_priority_file host target_host original_value 0 final_value 100 N/A N/A change_slave_priority_instance instance target_instance final_value 100 N/A attempts 1 N/A max_attempts 10 N/A True N/A N/A sentinel_instance N/A N/A N/A driver get_non_database_instances N/A 0 N/A N/A failover_sentinel host N/A sentinel_instance hostname sentinel_host N/A sentinel_instance address sentinel_port N/A sentinel_instance port service_name N/A databaseinfra name N/A N/A sleep 30 N/A sentinel_client N/A N/A driver get_sentinel_client sentinel_instance N/A master_address N/A N/A N/A sentinel_client discover_master N/A databaseinfra name N/A 0 N/A target_is_master False N/A source_instance N/A workflow_dict N/A source_instances N/A N/A target_instance N/A source_instance future_instance N/A N/A N/A target_instance address master_address N/A N/A target_is_master True N/A N/A N/A LOG info N/A N/A {} is master format target_instance N/A N/A target_is_master N/A N/A N/A N/A attempts max_attempts N/A N/A N/A Exception It could not switch the master. N/A attempts 1 N/A N/A N/A LOG info There was something wrong in sentinel failover. N/A N/A N/A LOG info N/A N/A Trying again ( {} of {} ) format attempts max_attempts N/A True N/A N/A N/A Exception N/A N/A traceback N/A full_stack N/A N/A N/A N/A N/A workflow_dict N/A exceptions N/A error_codes append DBAAS_0020 N/A N/A N/A N/A N/A workflow_dict N/A exceptions N/A traceback append traceback N/A False N/A undo N/A N/A self workflow_dict N/A N/A N/A N/A N/A LOG info Running undo... N/A N/A N/A databaseinfra N/A workflow_dict N/A databaseinfra N/A driver N/A N/A databaseinfra get_driver N/A source_instance N/A workflow_dict N/A source_instances N/A N/A N/A N/A source_instance instance_type N/A source_instance REDIS N/A N/A source_host N/A source_instance hostname N/A N/A change_slave_priority_file host source_host original_value 0 final_value 100 N/A N/A change_slave_priority_instance instance source_instance final_value 100 N/A target_instance N/A source_instance future_instance N/A target_host N/A target_instance hostname N/A N/A change_slave_priority_file host target_host original_value 100 final_value 0 N/A N/A change_slave_priority_instance instance target_instance final_value 0 N/A attempts 1 N/A max_attempts 10 N/A True N/A N/A sentinel_instance N/A N/A N/A driver get_non_database_instances N/A 0 N/A N/A failover_sentinel host N/A sentinel_instance hostname sentinel_host N/A sentinel_instance address sentinel_port N/A sentinel_instance port service_name N/A databaseinfra name N/A N/A sleep 30 N/A sentinel_client N/A N/A driver get_sentinel_client sentinel_instance N/A master_address N/A N/A N/A sentinel_client discover_master N/A databaseinfra name N/A 0 N/A source_is_master False N/A source_instance N/A workflow_dict N/A source_instances N/A N/A N/A N/A source_instance address master_address N/A N/A source_is_master True N/A N/A N/A LOG info N/A N/A {} is master format source_instance N/A N/A source_is_master N/A N/A N/A N/A attempts max_attempts N/A N/A N/A Exception It could not switch the master. N/A attempts 1 N/A N/A N/A LOG info There was something wrong in sentinel failover. N/A N/A N/A LOG info N/A N/A Trying again ( {} of {} ) format attempts max_attempts N/A True N/A N/A N/A Exception N/A N/A traceback N/A full_stack N/A N/A N/A N/A N/A workflow_dict N/A exceptions N/A error_codes append DBAAS_0020 N/A N/A N/A N/A N/A workflow_dict N/A exceptions N/A traceback append traceback N/A False N/A N/A