Commit 638082c
committed
fix: fail the install when a fleet enrollment cannot add its include
ScheduleEnrollFleet only logged a NOTE when the installer was not allowed to
change the configuration, and then enrolled anyway. The result is a host that
generates a key pair, spends its one-time bootstrap token, registers with the
fleet server and syncs - while nothing ever reads the configuration that comes
back, because ScheduleWriteConfig never added the include that points at it.
Managed on paper, unmanaged in practice, and the note lands in an MSI log that
nobody reads on an unattended install.
Fail instead, before the token is spent. The test is the same one
ScheduleWriteConfig applies (CONF_CAN_CHANGE = 1), so the install fails exactly
when the include would not have been written, and the error carries
CONF_CAN_CHANGE_REASON so the log says which of the several reasons applied.
Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Michael Medin <michael@medin.name>1 parent 3d94e51 commit 638082c
2 files changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
344 | 348 | | |
345 | 349 | | |
346 | 350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1158 | 1158 | | |
1159 | 1159 | | |
1160 | 1160 | | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
1164 | 1168 | | |
1165 | | - | |
1166 | | - | |
1167 | | - | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
1168 | 1178 | | |
1169 | 1179 | | |
1170 | 1180 | | |
| |||
0 commit comments