def StopMasterDaemons():
  # TODO: log and report back to the caller the error failures; we
  # need to decide in which case we fail the RPC for this

  result = utils.RunCmd([pathutils.DAEMON_UTIL, "stop-master"])
  if result.failed:
    logging.error("Could not stop Ganeti master, command %s had exitcode %s"
                  " and error %s",
                  result.cmd, result.exit_code, result.output)
Stop the master daemons on this node.
dataset/ETHPy150Open ganeti/ganeti/lib/backend.py/StopMasterDaemons