Skip to content

Conversation

@zaneb
Copy link
Member

@zaneb zaneb commented Oct 31, 2025

Automatically generate the graph of systemd unit interactions, so that it can automatically reflect changes.

The result is considerably uglier than the hand-drawn originals, but on balance I think knowing that they really reflect what is in the code (not just what we think should be in the code) is worth it.

Needless to say, I did not write any of this script myself.

zaneb added 2 commits October 31, 2025 15:22
Convert the agent installer service workflow diagrams from PNG to
maintainable GraphViz DOT format. This allows the diagrams to be
edited as text files rather than requiring image editing tools.

Changes:
- Add GraphViz DOT source files for all four workflows
- Add Makefile to generate PNGs from DOT sources
- Add README with build and editing instructions
- Regenerate all PNG files from DOT sources

The new workflow enables easier maintenance and collaboration:
  cd docs/user/agent/diagrams
  edit *.dot files
  make

Assisted-by: Claude Code
Replace manually-maintained GraphViz DOT files with an auto-generation
system that parses systemd unit files and generates diagrams showing
service dependencies and workflow structure.

Key features:
- Parses systemd units from data/data/agent/systemd/units
- Extracts Before/After dependencies for edges
- Infers cluster membership from PartOf/BindsTo relationships
- Filters services by workflow based on discriminator files
- Shows file creation during workflows (node-zero creates node0, etc)
- Auto-detects disconnected services and marks with thin borders
- Auto-computes workflow differences (add-nodes vs install)
- Maintains consistent layout with invisible edge chains

Only a small number of exceptions are hardcoded:
- load-config-iso@ triggered by udev (unconfigured_ignition only)
- 99-agent-copy-files.sh excluded from interactive (agent-extract-tui provides tui)
- agent-interactive-console services disabled in unconfigured-ignition

Assisted-by: Claude Code
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 31, 2025
@openshift-ci-robot
Copy link
Contributor

@zaneb: This pull request explicitly references no jira issue.

In response to this:

Automatically generate the graph of systemd unit interactions, so that it can automatically reflect changes.

The result is considerably uglier than the hand-drawn originals, but on balance I think knowing that they really reflect what is in the code (not just what we think should be in the code) is worth it.

Needless to say, I did not write any of this script myself.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@andfasano
Copy link
Contributor

/approve

Really nice work @zaneb ! I think the graphical is definitely better than the hand-written ones 🤣. And agree that the ability to generate them automatically is definitely worth it. Maybe we should add also some info on how to regenerate the script in future, in case something is going to change?

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 3, 2025
zaneb added 2 commits November 4, 2025 15:49
When systemd unit [Unit] sections are modified, the agent installer
service diagrams need to be regenerated. This CLAUDE.md file provides
directory-specific instructions for Claude Code to run the appropriate
make command when making such changes.

Assisted-by: Claude Code
Updated Makefile and all documentation references accordingly.

Assisted-by: Claude Code
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 4, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andfasano

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zaneb
Copy link
Member Author

zaneb commented Nov 4, 2025

Maybe we should add also some info on how to regenerate the script in future, in case something is going to change?

Done.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 4, 2025

@zaneb: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-agent-ha-dualstack ce73de0 link false /test e2e-agent-ha-dualstack
ci/prow/e2e-agent-two-node-fencing-ipv4 ce73de0 link false /test e2e-agent-two-node-fencing-ipv4

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@zaneb
Copy link
Member Author

zaneb commented Nov 5, 2025

/cc @pawanpinjarkar
/verified bypass

@openshift-ci openshift-ci bot requested a review from pawanpinjarkar November 5, 2025 22:58
@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Nov 5, 2025
@openshift-ci-robot
Copy link
Contributor

@zaneb: The verified label has been added.

In response to this:

/cc @pawanpinjarkar
/verified bypass

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants