theforeman / foreman_fog_proxmox

Foreman plugin to add Proxmox compute resource based on fog-proxmox gem
GNU General Public License v3.0
105 stars 30 forks source link

Error while power on VM via Compute Resource #226

Closed djken09 closed 1 year ago

djken09 commented 2 years ago

Describe the bug Foreman returns "Error - undefined method `capitalize' for nil:NillClass" even though is able to power-on/off the VM.

To Reproduce Steps to reproduce the behavior:

  1. Go to Compute Resource -> Virtual Machines
  2. Click on Power On

Expected behavior Foreman does not return an error message when a VM power on.

Version Foreman version: 2.3.2 foreman_fog_proxmox: 0.14.0-3 fog-proxmox: 0.14.0-2 Proxmox: 5.4-3

Additional context

2022-05-13T10:20:14 [I|app|032f7cc1] Started PUT "/compute_resources/1-Proxmox4VE/vms/1_101/power" for 127.0.0.1 at 2022-05-13 10:20:14 -0400
2022-05-13T10:20:14 [I|app|032f7cc1] Processing by ComputeResourcesVmsController#power as HTML
2022-05-13T10:20:14 [I|app|032f7cc1]   Parameters: {"authenticity_token"=>"CH+gK6ggwCzuxu8uyVmDnaSX+uzBAATa215ClgOKoRmPRhvwAt+Nh/NS3GFFThStWH8jKI1Qi052hPlvOPFI9Q==", "compute_resource_id"=>"1-Proxmox4VE", "id"=>"1_101"}
2022-05-13T10:20:14 [D|tax|032f7cc1] Current location set to Default Location
2022-05-13T10:20:14 [D|tax|032f7cc1] Current organization set to Default Organization
2022-05-13T10:20:14 [D|app|032f7cc1] pool_owner(101)
2022-05-13T10:20:14 [D|app|032f7cc1] found vm: 101 member of pool: 
2022-05-13T10:20:14 [D|app|032f7cc1] found vm 101 on node proxmox4
2022-05-13T10:20:18 [I|app|032f7cc1] Redirected to https://192.168.1.28/compute_resources/1-Proxmox4VE
2022-05-13T10:20:18 [I|app|032f7cc1] Completed 302 Found in 3919ms (ActiveRecord: 5.6ms | Allocations: 72577)

Screenshots sandbox_power-on_failure sandbox_vm_power-on

tristanrobert commented 1 year ago

Can't reproduce since it is fixed in 0.14.2