Commit a71d373
committed
fix: skip Proxmox compute orchestration for unmanaged hosts (#455)
When a host is registered via Global Registration with a hostgroup that
has a Compute Resource (Proxmox), the compute orchestration methods
(setComputeUpdate, delComputeUpdate, setComputeDetails) are triggered
even though the host is unmanaged (managed: false). This causes errors
like "protected method setCompute called" because the orchestration
tries to interact with the Proxmox API for a host that was not
provisioned through Foreman.
This patch adds a managed? guard to skip Proxmox-specific compute
orchestration for unmanaged hosts. When the host is not managed, the
methods return true early, allowing the registration to proceed
without attempting to modify VM state on Proxmox.1 parent f6cf842 commit a71d373
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| 104 | + | |
| 105 | + | |
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
| |||
0 commit comments