Lines Matching full:target
4 manage all processes. It has its own set of target and service units to control
13 [Target](https://www.freedesktop.org/software/systemd/man/systemd.target.html) -
17 2. Define the services that get run for a given target.
31 When an OpenBMC system first has power applied, it starts the "default.target"
32 unless an alternate target is specified on the kernel command line. In Phosphor
33 OpenBMC, there is a link from `default.target` to `multi-user.target`.
35 You'll find all the phosphor services associated with `multi-user.target`.
40 [obmc-host-start@.target](https://github.com/openbmc/phosphor-state-manager/blob/master/target_file…
43 To start it you would run `systemctl start obmc-host-start@0.target`.
49 ls -1 /lib/systemd/system/obmc-host-start@0.target.requires/
50 obmc-host-startmin@0.target
55 [obmc-host-startmin@.target](https://github.com/openbmc/phosphor-state-manager/blob/master/target_f…
57 This target is also utilized in host reboot scenarios. This distinction of a
58 host-start and a host-startmin target allows the user to put services in the
59 `obmc-host-start@.target` that should only be run on an initial host boot (and
64 Next if we look at the `obmc-host-startmin@0.target`, we see this:
67 ls -1 /lib/systemd/system/obmc-host-startmin@0.target.requires/
68 obmc-chassis-poweron@0.target
72 You can see within `obmc-host-startmin@0.target` that we have another target in
73 there, `obmc-chassis-poweron@0.target`, along with a service aptly named
76 The `obmc-chassis-poweron@0.target` has corresponding services associated with
80 ls -1 /lib/systemd/system/obmc-chassis-poweron@0.target.requires/
85 If you run `systemctl start obmc-host-start@0.target` then systemd will start
86 execution of all of the above associated target and services.
96 `obmc-host-shutdown@.target`. This target is soft in that it notifies the host
103 `obmc-chassis-hard-poweroff@.target`. This target will force the stopping of the
108 The reboot of the server is encapsulated in the `obmc-host-reboot@.target`. This
109 target will utilize the soft power off target and then, once that completes,
110 start the host power on target.
114 The `obmc-host-quiesce@.target` is utilized in host error scenarios. When the
115 `obmc-host-quiesce@0.target` is entered, it puts the host state D-Bus
121 The `obmc-chassis-emergency-poweroff@.target` is a wrapper target around the
122 `obmc-chassis-hard-poweroff@.target` and `obmc-host-quiesce@.target`. It is
126 services in the shutdown path can conflict with this target to ensure only the
129 Automated error recovery (i.e. host reboot) will not be done if this target is
149 Underneath the covers, this is calling systemd with the server power on target.
156 the start/stop of the target they are interested in.
164 - If your application failing during the target start could impact targets or
181 1. A service within a target fails
183 wanted) by the target then the target will fail if the service fails -
184 Define a behavior for when the target fails using the "OnFailure" option
185 (i.e. go to a new failure target if any required service fails)
186 - If the service is not a "oneshot", then it can not fail the target (the
187 target only knows that it started successfully) - Define a behavior for
193 2. A failure outside of a normal systemd target/service (host watchdog expires,
196 appropriate error, and instructing systemd to go to the appropriate target
198 Within OpenBMC, there is a host quiesce target. This is the target that other
200 OpenBMC can then monitor for the entry into this quiesce target and will handle
204 their error handling. For example, the target responsible for applying chassis
205 power, `obmc-chassis-poweron@0.target`, will have a
206 `OnFailure=obmc-chassis-poweroff@%i.target` error path. That is, if the chassis
207 power on target fails then power off the chassis.
212 - All targets should have a `OnFailure=obmc-quiesce-host@.target`
213 - All services which are required for a target to achieve its function should be
214 RequiredBy that target (not WantedBy)
216 the target failure path
218 `OnFailure=obmc-quiesce-host@.target` and ideally set "RemainAfterExit=no"
221 to call systemd with the `obmc-quiesce-host@.target` on failures
226 someone starts the same target twice. If the associated service with that target
229 `obmc-chassis-poweron@.target` twice. If you execute it when the operating
234 ## Target and Service Dependency Details
236 There are some tools available out there to visualize systemd service and target
248 S = Start (runs a command to start another target or service)
249 (S) = Synchronization Target
255 obmc-host-shutdown.target
257 W: obmc-host-stopping.target (S)
258 B: obmc-host-stopping.target (S)
259 R: obmc-chassis-poweroff.target
260 R: obmc-host-stop.target
262 B: obmc-host-stop-pre.target
264 W: obmc-power-stop.target (S)
265 B: obmc-power-stop.target (S)
266 W: obmc-power-stop-pre.target (S)
267 A: obmc-power-stop-pre.target (S)
271 B: obmc-power-off.target (S)
272 W: obmc-power-stop.target (S)
273 B: obmc-power-stop.target (S)
274 W: obmc-power-stop-pre.target (S)
275 A: obmc-power-stop-pre.target (S)
281 S: obmc-chassis-powered-off.target
284 A: obmc-power-stop-pre@.target
287 #### Synchronization Target Dependencies
290 obmc-power-stop.target
291 W: obmc-power-stop-pre.target
292 A: obmc-power-stop-pre.target
294 obmc-power-stop-pre.target
295 W: obmc-host-stopped.target
296 A: obmc-host-stopped.target
298 obmc-host-stopped.target
299 W: obmc-host-stopping.target
300 A: obmc-host-stopping.target
301 B: obmc-power-stop-pre.target
303 obmc-host-stopping.target
304 W: obmc-host-stop-pre.target
305 A: obmc-host-stop-pre.target
306 B: obmc-host-stopped.target
308 obmc-host-stop-pre.target
309 B: obmc-host-stopping.target