theforeman / foreman_fog_proxmox

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

CentOS 7, unknown attributes error #152

Closed rm-td closed 4 years ago

rm-td commented 4 years ago

CentOS 7, unknown attributes error, various areas. What am I missing?

Prerequisites

Please check (put an X between the brackets) the following items before posting any issue:

Description

This is a question on operating foreman_fog_proxmox, I might not have all the configuration correct and am asking for some guidance. On a fresh install keep receiving errors "unknown attribute" when attempting to create new host or import a host from proxmox > foreman.

Preference is to install from RPMs rather than tinkering indivual files or manual GEM install.

Environment

cat /etc/centos-release CentOS 7.8.2003

rpm -qa | grep foreman-release foreman-release-scl-7-2.el7.noarch foreman-release-2.0.0-1.el7.noarch

Version

rpm -qa | grep proxmox tfm-rubygem-foreman_fog_proxmox-0.10.2-1.fm2_1.el7.noarch tfm-rubygem-fog-proxmox-0.12.0-1.el7.noarch

major packages from proxmox server: proxmox-ve: 6.2-1 (running kernel: 5.4.41-1-pve) pve-manager: 6.2-6 (running version: 6.2-6/ee1d7754) pve-kernel-5.4: 6.2-2 pve-kernel-helper: 6.2-2

Steps to reproduce

  1. After install rpms check Adminster > About > Providers observe Proxmox showing green Installed
  2. Create Compute Resource, enter Proxmox server details, Test returns OK
  3. Browsing Computer Resources at least permits display of all VMs on proxmox host and further permits a delete of a VM, returning success.
  4. Selecting Hosts > Create New Host, setting "Deploy on" to (server) Proxmox immediately fails with error under Virtual Machine "Failure: undefined method `min_memory' for #<Fog::Proxmox::Compute::ServerConfig"
  5. Importing existing host from Proxmox server to Foreman immediately fails with error "unknown attribute 'model' for Nic::Managed".

Expected behavior

success with creation of new vm and/or import of existing vm

Actual behavior

error messages as described above, unknown which log files to inspect, grateful for pointers

Reproduces how often:

Every time

Additional Information

I would be grateful to understand whether or not this is an error my side with deployment using the published RPMs, maybe I have a missing dependency not resolved by RPM install or whether I am experiencing some kind of bug. The install process on CentOS is not exactly clear and I would gladly contribute to documentation for a successful installation - the ability to link Proxmox to Foreman is very powerful, thank you for the module.

tristanrobert commented 4 years ago

Hello! min_memory method has been removed since Proxmox 6.2 API. I have fixed it in 0.11+ foreman_fog_proxmox plugin. You should install this last release of the plugin.

rm-td commented 4 years ago

Ahh, thanks for that Tristan, I now have the following installed

rpm -qa | grep proxmox tfm-rubygem-fog-proxmox-0.12.0-1.el7.noarch tfm-rubygem-foreman_fog_proxmox-0.11.1-1.fm2_0.el7.noarch

What happened the first time I think is yum incorrectly resolving the version to install. I had originally done "yum install tfm-rubygem-fog-proxmox" to let yum try to resolve and it had installed a previous version.

Doing a direct install ie yum install https://yum.theforeman.org/plugins/2.0/el7/x86_64/tfm-rubygem-fog-proxmox-0.12.0-1.el7.noarch.rpm has got me a later version. Yum should have resolved it and I hadn't seen a later version when browsing the repo, so thank you for the pointer.

The min_memory error when creating a vm has gone as you indicated and I have successfully created a VM on the proxmox host.

The unknown attribute when importing still occurs. Thoughts? Kindest regards

tristanrobert commented 4 years ago

Thank you @rm-td for your answer. Could you please close this issue if you agree and open a new issue for the unknown attribute 'model' for Nic::Managed" when importing hosts ? I will test and analyze it.

rm-td commented 4 years ago

Hi Tristan, thank you for pointing me in right direction, don't want to annoy you by not following process. Closing issue and new one will be raised for unknown attribute. Kindest regards Rob.