refactor: Clarify conditions for skipping VM resize in UpdateVmConfigJob documentation
This commit is contained in:
@@ -31,7 +31,7 @@ use Illuminate\Support\Facades\Log;
|
||||
* VM is still powered off — this is also what CreateVirtualMachineJob relies
|
||||
* on to power the VM on before the next step.
|
||||
*
|
||||
* Skipped if the order has no cpu/ram addon → just power on, dispatch AssignIpToGuestJob.
|
||||
* Skipped only if product base cpu/ram AND addon cpu/ram are all zero → just power on, dispatch AssignIpToGuestJob.
|
||||
*
|
||||
* PS1 on vSphere host must accept:
|
||||
* $server_name, $cpu, $memoryGB, $vcenter_host, $vcenter_user, $vcenter_password
|
||||
@@ -98,8 +98,11 @@ class UpdateVmConfigJob implements ShouldQueue
|
||||
|
||||
[$addonCpu, $addonRamGb] = $this->resolveAddonCpuRam($addonsMeta);
|
||||
|
||||
if ($addonCpu === 0 && $addonRamGb === 0) {
|
||||
$logger->step('no cpu/ram addon — powering on and skipping resize', [
|
||||
$baseCpu = (int) ($product?->cpu ?? 0);
|
||||
$baseRam = (int) ($product?->ram ?? 0);
|
||||
|
||||
if ($baseCpu === 0 && $baseRam === 0 && $addonCpu === 0 && $addonRamGb === 0) {
|
||||
$logger->step('no cpu/ram to apply (product+addon) — powering on and skipping resize', [
|
||||
'module_vmware_id' => $this->moduleVmwareId,
|
||||
'vm_id' => $this->vmId,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user