Commit 5d5dbe6
Start hook-managed services with --no-block to avoid deadlocks
The apply-exit hook starts nvsm and dcgm synchronously. These services
are Wants=/After=nvidia-gpu-reset.target while nvidia-mig-manager.service
runs Before= that target, so whenever the target is not yet active the
requested start queues behind the service's own start job and the hook
waits on a job that is waiting for the hook to finish: a deadlock. The
earlier fix used --no-block only while the system was starting up, which
covered boot but not package installation (or any other start while the
target is inactive), where a package scriptlet starting nvsm pulls the
whole chain into one transaction and hangs the install.
Enqueue all service starts from hooks with --no-block unconditionally,
including the k8s services in case any of them gains an ordering on the
target. The hooks no longer wait on systemd jobs at all, so no ordering
cycle can block them in any system state. The trade-off is that the
hooks only report enqueue errors; service startup failures are reported
by the started units themselves. Stops remain synchronous: the apply
must not proceed until GPU clients are actually gone.
Signed-off-by: Rajath Agasthya <ragasthya@nvidia.com>
(cherry picked from commit 92c9110)1 parent 06375d7 commit 5d5dbe6
1 file changed
Lines changed: 14 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
110 | 105 | | |
111 | 106 | | |
112 | 107 | | |
| |||
120 | 115 | | |
121 | 116 | | |
122 | 117 | | |
123 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
124 | 122 | | |
125 | 123 | | |
126 | 124 | | |
| |||
0 commit comments