$this->moduleVmwareId, 'new_vm_id' => $this->newVmId, ]); $ctx = $rebuildService ->buildContext($this->moduleVmwareId, $this->newOsId, $this->newVmId); $passwordService->rotate($ctx, $this->reinstallLogId); RebuildAddonInstallJob::dispatch( $this->moduleVmwareId, $this->newOsId, $this->newVmId, $this->reinstallLogId, )->onQueue('default'); Log::info('RebuildChangePasswordJob: completed, addon job dispatched', [ 'module_vmware_id' => $this->moduleVmwareId, 'new_vm_id' => $this->newVmId, ]); } public function failed(Throwable $e): void { Log::error('RebuildChangePasswordJob: failed — old VM preserved', [ 'module_vmware_id' => $this->moduleVmwareId, 'new_vm_id' => $this->newVmId, 'error' => $e->getMessage(), ]); \App\Models\ReinstallLog::where('id', $this->reinstallLogId)->update([ 'status' => \App\Models\ReinstallLog::STATUS_FAILED, 'error_message' => 'ChangePassword failed: ' . $e->getMessage(), 'updated_at' => now(), ]); } }