def taint_node()

in src/tinymax_healthcheck/tinymax_runner.py [0:0]


def taint_node() -> None:
  if os.environ.get("DRY_RUN") == "true":
    print("Training was set to dry run. Will not taint node.")
    return

  node_name = os.environ.get("NODE_NAME")
  taint_command = _K_TAINT_NODE_FORMAT % (node_name, _K_TAINT)
  print("Applying taint  %s to node %s" % (taint_command, node_name))
  if not checker_common.run_command(taint_command):
    print("Failed to apply taint")