-
Notifications
You must be signed in to change notification settings - Fork 274
docs: create a flow diagram of the Ignition services #2195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This is a great initiative to visualize the Ignition boot flow, which will be very helpful for new contributors. The diagram is well-structured. I've left a few comments with suggestions to improve the accuracy of the flow in the 'Network Stack' and 'Ignition Fetch' sections, and a minor styling suggestion for consistency. Overall, this is a valuable addition to the documentation.
docs/ignition-flow.md
Outdated
| D1a --> D2 | ||
| D1b --> D2 | ||
| D2 --> D3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part of the flow could be misleading. Requesting cloud-specific configs (D2) and opening a config device like /dev/sr0 (D3) are typically alternative actions that depend on the detected platform, rather than sequential steps. The current diagram with D2 --> D3 suggests one follows the other. It would be more accurate to represent them as alternative paths.
docs/ignition-flow.md
Outdated
| N4["systemd-networkd.service - Network Configuration"] | ||
| N5["network.target reached"] | ||
| N6["Get DHCP address"] | ||
| N1 --> N2 --> N3 --> N4 --> N5 --> N6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order of operations in the network stack appears to be incorrect. The network.target (N5) is reached only after the network is fully configured, which includes acquiring an IP address via DHCP (N6). Therefore, N6 should come before N5 in the sequence.
| N1 --> N2 --> N3 --> N4 --> N5 --> N6 | |
| N1 --> N2 --> N3 --> N4 --> N6 --> N5 |
docs/ignition-flow.md
Outdated
| classDef service fill:#42a5f5,stroke:#1565c0,stroke-width:2px,color:#000 | ||
| classDef target fill:#ffa726,stroke:#e65100,stroke-width:2px,color:#000 | ||
|
|
||
| class A,B,C,D,E,F,H,I,J,K,N4 service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/ignition-flow.md
Outdated
| N3["Link up"] | ||
| N4["systemd-networkd.service - Network Configuration"] | ||
| N5["network.target reached"] | ||
| N6["Get DHCP address"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ignition-fetch.service is after network.target, how do we know if the DHCP succeeded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running through the services and targets (at least on Flatcar), the actual queries to the cloud platforms may be started before the DHCP request has been completed. For example, here are some of the journalctl logs from a recent machine:

We see:
- The link come up
- The system reach
network.target Ignition-fetch.servicebegin (which is also corroborated in the systemd service file found below:)After=network.target - Calls to the IMDS user-data begin and fail (presumably because DHCP has not been completed)
- The DCHPv4 address 10.0.0.4 return
- IMDS user-data is successfully queried (attempt 7)
To answer your question, ignition-fetch.service does not necessarily know that DHCP has succeeded, but it relies on DHCP to do so before the calls to IMDS exhaust the retries.
While looking through the Ignition booting documentation, I was attempting to piece together how each service interacts with each other and ended up creating a flowchart of the ordering of some of the services. I figured this visual diagram could be useful to other new contributors to the project, and am happy to expand on, or correct, any relationship here as needed.