Commit c37fc74
committed
Configure install/add-node dependencies in systemd
There are two pairs of services that are always needed together in the
agent ISO. For installing a cluster, agent-register-cluster.service
followed (later) by start-cluster-installation.service. For adding a
node to a cluster, agent-import-cluster.service followed (later) by
agent-add-node.service.
Reflect these dependencies in the systemd units' Install sections, so
that we only need to enable either start-cluster-installation.service or
agent-add-node.service to ensure all of the required services are
enabled. This will simplify the implementation of adding a node via the
appliance, where one flow or the other will need to be triggered in
response to the config ISO being attached. Do not make either unit a
requirement of multi-user.target, as they conflict. That allows us to
enable both units (i.e. execute their Install sections) in the ignition.
This ensures that when we start start-cluster-installation.service upon
seeing a config ISO attached to the appliance,
agent-register-cluster.service also gets started. This service was
previously inadvertantly disabled by
9716c1f.
Up to then, we also relied on enabling
start-cluster-installation.service in the unconfigured ignition.
However, due to the remnants of an implementation that existed prior to
204c4ae, there is still code in
load-config-iso.sh to enable the service after the config drive is
attached. This would be needed for an interactive ISO, but for the
applicance we changed to enabling the service in the ignition.
In future we will need to choose whether to start
start-cluster-installation.service or agent-add-node.service based on
the contents of the config drive, so continue to do this at runtime
rather than simply re-enabling the former in the unconfigured ignition.1 parent 0ce6be8 commit c37fc74
File tree
3 files changed
+6
-4
lines changed- data/data/agent/systemd/units
- pkg/asset/agent/image
3 files changed
+6
-4
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| 330 | + | |
| 331 | + | |
330 | 332 | | |
331 | 333 | | |
332 | 334 | | |
| |||
0 commit comments