def METHOD_NAME(my_host, my_port, my_user, my_passwd, timeout, my_module_set, upgrade_params):
  try:
    conn = mysql.connector.connect(user = my_user,
                                   password = my_passwd,
                                   host = my_host,
                                   port = my_port,
                                   database = 'oceanbase',
                                   raise_on_warnings = True)
    cur = conn.cursor(buffered=True)
    try:
      query_cur = actions.QueryCursor(cur)
      actions.check_server_version_by_cluster(cur)
      if run_modules.MODULE_BEGIN_UPGRADE in my_module_set:
        logging.info('================begin to run begin upgrade action===============')
        conn.autocommit = True
        actions.do_begin_upgrade(cur, timeout)
        conn.autocommit = False
        actions.refresh_commit_sql_list()
        logging.info('================succeed to run begin upgrade action===============')
      if run_modules.MODULE_BEGIN_ROLLING_UPGRADE in my_module_set:
        logging.info('================begin to run begin rolling upgrade action===============')
        conn.autocommit = True
        actions.do_begin_rolling_upgrade(cur, timeout)
        conn.autocommit = False
        actions.refresh_commit_sql_list()
        logging.info('================succeed to run begin rolling upgrade action===============')
      if run_modules.MODULE_SPECIAL_ACTION in my_module_set:
        logging.info('================begin to run special action===============')
        conn.autocommit = True
        special_upgrade_action_pre.do_special_upgrade(conn, cur, timeout, my_user, my_passwd)
        conn.autocommit = False
        actions.refresh_commit_sql_list()
        logging.info('================succeed to run special action===============')
      if run_modules.MODULE_HEALTH_CHECK in my_module_set:
        logging.info('================begin to run health check action ===============')
        upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, True) # need_check_major_status = True
        logging.info('================succeed to run health check action ===============')
    except Exception, e:
      logging.exception('run error')
      raise e
    finally:
      # 打印统计信息
      print_stats()
      # 将回滚sql写到文件中
      # actions.dump_rollback_sql_to_file(upgrade_params.rollback_sql_filename)
      cur.close()
      conn.close()
  except mysql.connector.Error, e:
    logging.exception('connection error')
    raise e
  except Exception, e:
    logging.exception('normal error')
    raise e