def touch_dc(): if constants.SKIP_LVL == 1: return node = crmutils.get_dc() if node and node == constants.WE: with open(os.path.join(constants.WORKDIR, "DC"), 'w') as f: pass
def before_tag(context, tag): # tag @clean means need to stop cluster service if tag == "clean": time.sleep(3) online_nodes = get_online_nodes() if online_nodes: resource_cleanup() while True: time.sleep(1) if utils.get_dc(): break utils.get_stdout_or_raise_error("crm cluster stop --all")
def collect_dc_file(): if constants.SKIP_LVL: return node = crmutils.get_dc() if node and node == constants.WE: open(os.path.join(constants.WORKDIR, "DC"), 'w')
def step_impl(context): while True: time.sleep(1) if crmutils.get_dc(): break