I’m writing some design documentation, and thought I would document the series of states that a host goes through (including some of the post-OS-install states we have).
Can someone point me to any documentation? Or help me create a rough picture? I was thinking the machine might look something like:
In the fully automated flow, hosts never are unmanaged right? Or are they unmanaged to start, and only become managed after the OS is installed? I guess I’m asking if the three states you listed are orthogonal, and how host transitions happen between them (beyond the manual action you mentioned).
Perhaps “group” and “is managed” should become state vars inside each of the primary states in the graph. e.g. Maybe a host can go from “Deployed (managed=true)” --> “Deployed (managed=false)” after operator UI/CLI/API action?
Is there a “building” state during the OS installation? I’m okay with introducing conceptual or implicit states to help explain the process.
Unmanaged state is usually only used by users who use Foreman just as UI for Puppet. So yes, it kinda stays aside in traditional discovery workflow.
Group is weird term, maybe you think that you have “managed host with associated hosgroup”. Beware, there can also be unmanaged hosts with hostgroups.
There is a state (boolean) flag called “build” and when true, host is in build mode. This mode expires after 6 hours in case OS installation went bad (configurable). This is the only state when client (OS installer) can get to provisioning template.
Hosts also have special “status framework”. You see this on the left page in host detail page. It reports various statuses across features. Things like OS installation (pending, failed, expired, complete), configuration (pending, out of sync, pending, alerts, active, no changes) and various plugins add more. There is an overall status which can be: OK, WARN, ERROR and according to this main icon is rendered: green, yellow, red.
When you have your doc complete, can you submit the main text into our docs please? We need this.
Edit: After talking with my team, they said that “building” isn’t really a distinct state. e.g. Once a host gets assigned a host group with a configured OS, the installation begins immediately. So I updated the state graph to make the build process an edge instead of “building” being a distinct state.