Foreman 3.0.0-rc1 + Proxmox: changing compute profiles impossible

After Upgrading to Foreman 3.0.0-rc1 on Debian10 using Proxmox 6.4 changing compute profiles via GUI is not possible anymore.

I.e.

Compute Resource VM Attributes (1-Small)
stays fixed at
Type qemu, node proxmox-01, 1 CPUs and 512 MB memory

and necessary flags like Qemu Agent or KVM are selectable but will not be saved.

I have not checked yet whether this occurs only with other compute resources but Proxmox.

Any suggestions how to analyze or fix this?
Thanks,
AnHu

Foreman and Proxy versions:

foreman 3.0.0~rc1-1
foreman-assets 3.0.0~rc1-1
foreman-cli 3.0.0~rc1-1
foreman-debug 3.0.0~rc1-1
foreman-dynflow-sidekiq 3.0.0~rc1-1
foreman-installer 3.0.0~rc1-1
foreman-postgresql 3.0.0~rc1-1
foreman-proxy 3.0.0~rc1-1
foreman-service 3.0.0~rc1-1
ruby-foreman-ansible 9999-plugin+scratchbuild+20210716145329
ruby-foreman-deface 1.5.3-1
ruby-foreman-fog-proxmox 0.13.3-1
ruby-foreman-puppet 1.0.0~rc1-1
ruby-foreman-remote-execution 9999-plugin+scratchbuild+20210715153232
ruby-foreman-tasks 5.0.0-1
ruby-foreman-tasks-core 0.4.0-1
ruby-foreman-templates 9.0.0-1
ruby-hammer-cli-foreman 3.0.0-1
ruby-hammer-cli-foreman-puppet 0.0.3-2

Distribution and version:
Debian 10

Other relevant data:

production.log:

2021-08-10   Rendered compute_resources_vms/form/_volumes.html.erb (Duration: 1688.8ms | Allocations: 91610)
2021-08-10   Rendered compute_attributes/_compute_form.html.erb (Duration: 3853.8ms | Allocations: 267784)
2021-08-10   Rendered compute_attributes/_form.html.erb (Duration: 4733.5ms | Allocations: 321623)
2021-08-10   Rendered compute_attributes/edit.html.erb within layouts/application (Duration: 4840.9ms | Allocations: 327369)
2021-08-10   Rendered layouts/_application_content.html.erb (Duration: 10.9ms | Allocations: 5415)
2021-08-10   Rendering layouts/base.html.erb
2021-08-10   Rendered layouts/base.html.erb (Duration: 98.1ms | Allocations: 22434)
2021-08-10 Completed 200 OK in 5128ms (Views: 4931.4ms | ActiveRecord: 44.3ms | Allocations: 377710)
2021-08-10 Started GET "/notification_recipients" for 127.0.0.1 at 2021-08-10 13:27:13 +0000 
2021-08-10 Processing by NotificationRecipientsController#index as JSON
2021-08-10 Completed 200 OK in 105ms (Views: 0.3ms | ActiveRecord: 3.9ms | Allocations: 14613)
2021-08-10 Started GET "/notification_recipients" for 127.0.0.1 at 2021-08-10 13:27:24 +0000 
2021-08-10 Processing by NotificationRecipientsController#index as JSON
2021-08-10 Completed 200 OK in 120ms (Views: 0.3ms | ActiveRecord: 3.8ms | Allocations: 14476)
2021-08-10 Started GET "/notification_recipients" for 127.0.0.1 at 2021-08-10 13:27:33 +0000 
2021-08-10 Processing by NotificationRecipientsController#index as JSON
2021-08-10 Completed 200 OK in 104ms (Views: 0.3ms | ActiveRecord: 3.7ms | Allocations: 14465)
2021-08-10 Started GET "/notification_recipients" for 127.0.0.1 at 2021-08-10 13:27:43 +0000 
2021-08-10 Processing by NotificationRecipientsController#index as JSON
2021-08-10 Completed 200 OK in 100ms (Views: 0.4ms | ActiveRecord: 4.1ms | Allocations: 14465)
2021-08-10 Started PATCH "/compute_profiles/1-1-Small/compute_attributes/1" for 127.0.0.1 at 2021-08-10 13:27:51 +0000 
2021-08-10 Processing by ComputeAttributesController#update as HTML
2021-08-10   Parameters: {"utf8"=>"✓", "authenticity_token"=>"yKs....", "compute_attribute"=>{"vm_attrs"=>{"type"=>"qemu", "node_id"=>"proxmox-01", "start_after_create"=>"0", "pool"=>"mypool", "config_attributes"=>{"description"=>"", "boot"=>"", "onboot"=>"1", "agent"=>"1", "kvm"=>"1", "vga"=>"std", "scsihw"=>"virtio-scsi-pci", "bios"=>"seabios", "cpu_type"=>"kvm64", "sockets"=>"1", "cores"=>"4", "vcpus"=>"", "cpulimit"=>"", "cpuunits"=>"", "numa"=>"0", "spectre"=>"0", "pcid"=>"0", "ssbd"=>"0", "ibpb"=>"0", "virt_ssbd"=>"0", "amd_ssbd"=>"0", "amd_no_ssb"=>"0", "md_clear"=>"0", "pdpe1gb"=>"0", "hv_tlbflush"=>"0", "aes"=>"0", "hv_evmcs"=>"0", "memory"=>"4294967296", "balloon"=>"0", "shares"=>"", "ostype"=>"l26"}, "interfaces_attributes"=>{"0"=>{"model"=>"virtio", "bridge"=>"vmbr0", "tag"=>"", "rate"=>"", "queues"=>"", "firewall"=>"0", "link_down"=>"0", "id"=>"net0"}}, "volumes_attributes"=>{"0"=>{"storage_type"=>"hard_disk", "storage"=>"mystorage", "controller"=>"virtio", "device"=>"0", "cache"=>"", "size"=>"8589934592", "id"=>"virtio0"}, "1"=>{"id"=>"rootfs"}}}}, "show_server_config_options"=>"1", "show_server_config_memory"=>"1", "commit"=>"Submit", "compute_profile_id"=>"1-1-Small", "id"=>"1"}
2021-08-10 ComputeAttribute (1) update event on vm_attrs {"type"=>"qemu", "node_id"=>"proxmox-01", "start_after_create"=>"1", "pool"=>"mypool", "config_attributes"=>{"description"=>"", "boot"=>"", "onboot"=>"1", "agent"=>"1", "kvm"=>"1", "vga"=>"std", "scsihw"=>"virtio-scsi-pci", "bios"=>"seabios", "cpu_type"=>"kvm64", "sockets"=>"1", "cores"=>"4", "vcpus"=>"", "cpulimit"=>"", "cpuunits"=>"", "numa"=>"0", "spectre"=>"0", "pcid"=>"0", "ssbd"=>"0", "ibpb"=>"0", "virt_ssbd"=>"0", "amd_ssbd"=>"0", "amd_no_ssb"=>"0", "md_clear"=>"0", "pdpe1gb"=>"0", "hv_tlbflush"=>"0", "aes"=>"0", "hv_evmcs"=>"0", "memory"=>"536870912", "balloon"=>"0", "shares"=>"", "ostype"=>"l26"}, "interfaces_attributes"=>{"0"=>{"model"=>"virtio", "bridge"=>"vmbr0", "tag"=>"", "rate"=>"", "queues"=>"", "firewall"=>"0", "link_down"=>"0", "id"=>"net0"}}, "volumes_attributes"=>{"0"=>{"storage_type"=>"hard_disk", "storage"=>"mystorage", "controller"=>"virtio", "device"=>"0", "cache"=>"", "size"=>"8589934592", "id"=>"virtio0"}, "1"=>{"id"=>"rootfs"}}}, {"type"=>"qemu", "node_id"=>"proxmox-01", "start_after_create"=>"0", "pool"=>"SWE", "config_attributes"=>{"description"=>"", "boot"=>"", "onboot"=>"1", "agent"=>"1", "kvm"=>"1", "vga"=>"std", "scsihw"=>"virtio-scsi-pci", "bios"=>"seabios", "cpu_type"=>"kvm64", "sockets"=>"1", "cores"=>"4", "vcpus"=>"", "cpulimit"=>"", "cpuunits"=>"", "numa"=>"0", "spectre"=>"0", "pcid"=>"0", "ssbd"=>"0", "ibpb"=>"0", "virt_ssbd"=>"0", "amd_ssbd"=>"0", "amd_no_ssb"=>"0", "md_clear"=>"0", "pdpe1gb"=>"0", "hv_tlbflush"=>"0", "aes"=>"0", "hv_evmcs"=>"0", "memory"=>"4294967296", "balloon"=>"0", "shares"=>"", "ostype"=>"l26"}, "interfaces_attributes"=>{"0"=>{"model"=>"virtio", "bridge"=>"vmbr0", "tag"=>"", "rate"=>"", "queues"=>"", "firewall"=>"0", "link_down"=>"0", "id"=>"net0"}}, "volumes_attributes"=>{"0"=>{"storage_type"=>"hard_disk", "storage"=>"mystorage", "controller"=>"virtio", "device"=>"0", "cache"=>"", "size"=>"8589934592", "id"=>"virtio0"}, "1"=>{"id"=>"rootfs"}}}

Has anyone seen this with any other Compute Resources?

Looking at the Compatibility versions of foreman-fog-proxmox at
https://github.com/theforeman/foreman_fog_proxmox
it seems that at least v0.14 is necessary.
Foreman 3.0.0-rc1 got ruby-foreman-fog-proxmox 0.13.3-1 on Debian10. Are there plans to update this to 0.14? Anything I could do to help with this?

To get foreman-fox-proxmox v0.14 on Debian10 work with Foreman 3.0.0-rc2, edit the configuration:

 foreman@host:~/bundler.d# diff foreman_fog_proxmox.rb foreman_fog_proxmox.rb.saveold
 1c1 
 <gem 'foreman_fog_proxmox','0.14.0'
 ---
 >gem 'foreman_fog_proxmox', '0.13.3'

and install via

foreman@host:~/bundler.d# RAILS_ENV="production" /usr/bin/foreman-ruby /usr/bin/bundle exec /usr/bin/rake plugin:assets:precompile[foreman_fog_proxmox]

You need to restart Foreman afterwards, of course.

Would be nice to get this automatically on installation/update.

Thanks for considering this in
(Release meeting notes 2021-09-06)

Accessing a compute profile and major advanced parameters like “Main options” (KVM, Qemu) , CPU, memory works with v0.14 but unfortunately some other important parameters stay at its default configuration: hard disk controller at “VirtIO Block” which leads to /dev/vda for the first disk. Changing to “SCSI” is not possible and adding another disk fails as well.

P.S. Concerning the compute resource “Controller” (which was immutable “VirtIO Block”) I simply patched the default which works for me (for now) with Foreman 3.0.0:

# diff app/models/foreman_fog_proxmox/proxmox_vm_new.rb app/models/foreman_fog_proxmox/proxmox_vm_new.rb.orig
42c42
<         controller = 'scsi'
---
>         controller = 'virtio'
1 Like