"I'm strongly against of rebooting user's machines in the agent, agent's purpose is to only report the data, it mustn't reboot the system, it's too dangerous.
I think it will be more safe to pass master_node_uid in node's metadata, and reject creation of such nodes by Nailgun on API level."
I agree with Evgeniy, it seems to be the most appropriate solution for this case.
Copy-pasting review comment from Evgeniy L:
"I'm strongly against of rebooting user's machines in the agent, agent's purpose is to only report the data, it mustn't reboot the system, it's too dangerous.
I think it will be more safe to pass master_node_uid in node's metadata, and reject creation of such nodes by Nailgun on API level."
I agree with Evgeniy, it seems to be the most appropriate solution for this case.