[server] Define and set valid state for hosts.