Closed hakong closed 3 years ago
I see in your logs that interface compute_attributes id is an empty string: "compute_attributes"=>{"id"=>""
. It should be net0
. You should set this id to net0
in interface form > Proxmox section. I think it is related to an empty id at first creation which is computed by default: https://github.com/theforeman/foreman_fog_proxmox/blob/master/app/models/concerns/host_ext/proxmox/interfaces.rb
Should there be an ID form here?
Here are the attributes of the VM under "Compute Resources" for this VM:
net0 is set in vm show view (Nics) but not in vm edit view (eth0 is set but plugin don't get it). I think there is a bug I have to investigate: it is related to the complicated way foreman updates interfaces.
Proxmox identifier must be net0
but in your log I see eth0
. You should fix it in your interface form with Device identifier: net0
or leave it empty.
Hi,
I'm running into the same problem (foreman 2.1.2, fog_proxmox 0.11.1). Changing the device identifier is not an option for us, since we use the identifiers in the puppet based network configuration (passing @host.XYZ to the corresponding puppet module...)
If we change the identifier, the generated network configuration will not much the interface names in the VM. We can override this per host, but it requires some extra effort for a large number of instances. Since Linux inside the VM probably cannot detect the proxmox interface name (we use virtio interfaces), I would propose to add a mac address based mapping between interface identifiers in foreman (also as seen inside the VM), and the netX device identifier of proxmox.
Unable to edit host: Invalid identifier interface[0]. Must be net[n] with n integer >= 0
Prerequisites
Please check (put an X between the brackets) the following items before posting any issue:
[x] Have you check that no issue already exists and could match yours?
[x] Have you read the contributing code?
Description
Created a host. Edited it a couple of times, added an ansible role. Edit the host again, wanting to remove the ansible role, and it throws this error:
Debug from production.log:
Proxmox VM:
Environment
Foreman 2.0.1 running on CentOS 7.8.2003 (3.10.0-1127) Proxmox 6.2-6 running kernel 3.10.0-1127
Version
OS version:
kernel-3.10.0-1127.el7.x86_64 / CentOS Linux release 7.8.2003 (Core)
Package versions (foreman server):
Package versions (proxmox hosts):
Steps to reproduce
Expected behavior
Should be able to edit and save.
Actual behavior
Throws an error.
Reproduces how often:
Everytime I edit the host. Note: editing hosts that have not built yet works fine. Maybe this has something to do with reported facts from ansible/puppet?
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.