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

ActionView::Template::Error undefined method `type' for nil:NilClass #150

Closed Manisha15 closed 4 years ago

Manisha15 commented 4 years ago

ActionView::Template::Error undefined method `type' for nil:NilClass while creating proxmox host.

I get the error when creating proxmox host using bootdisk as provision method. But this has noting to do with bootdisk provisioning as I debugged and the error occurred before even reaching the foreman_boodisk proxmox extension iso_upload method of PR: https://github.com/theforeman/foreman_bootdisk/pull/90

Error: The error is as follows: ActionView::Template::Error undefined method 'type' for nil:NilClass /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_fog_proxmox0.10.2/app/helpers/proxmox_vm_helper.rb:90:in 'vm_type'

In Production log:

ActionView::Template::Error (undefined method 'type' for nil:NilClass):
17:40:03 rails.1   | 2020-05-24T17:40:03 [F|app|15d6a095]     28: along with ForemanFogProxmox. If not, see <http://www.gnu.org/licenses/>. %>

17:40:03 rails.1   |  |     29: <% if @host.compute_resource.class == ForemanFogProxmox::Proxmox %>

17:40:03 rails.1   |  |     30: <% compute_attributes = f.object.compute_attributes %>

17:40:03 rails.1   |  |     31: <% vm_type = vm_type(@host) %>

17:40:03 rails.1   |  |     32: <% node_id = node_id(@host) %>

In foreman_fog_proxmox : https://github.com/theforeman/foreman_fog_proxmox/blob/c112ba30e275feb8b0694869c9c2f5fdb4507216/app/views/compute_resources_vms/form/proxmox/_add_vm_type_to_nic_provider_specific_form.html.erb#L19

Versions: Foreman 1.24 Foreman_fog_proxmox 0.10 and above

Additional Information: This error is not produced when I use foreman_fog_proxmox < 0.10.0 , i.e, foreman_fog_proxmox 0.9.x OR When I replace lines in https://github.com/theforeman/foreman_fog_proxmox/blob/c112ba30e275feb8b0694869c9c2f5fdb4507216/app/views/compute_resources_vms/form/proxmox/_add_vm_type_to_nic_provider_specific_form.html.erb

From:

<% vm_type = vm_type(@host) %>
<% node_id = node_id(@host) %> 

To:

<% vm_type = f.object.respond_to?('type') ? f.object.type : nil %>
<% node_id = f.object.respond_to?('node_id') ? f.object.node_id : nil %>
tristanrobert commented 4 years ago
  1. Last plugin release is 0.11.1. You should try with this last one.
  2. This bug has been fixed in 0.11.1
Manisha15 commented 4 years ago

I tried with foreman_fog_proxmox version 0.11.1 but the problem still persists.

hakong commented 4 years ago

I'm having the same issue. Just installed Foreman and Katello on a new CentOS 7 host yesterday. This happens when I try to edit a host that's associated with a Proxmox VM.

Steps to reproduce:

The only host I have associated with a VM is the foreman host itself. I didn't manage to associate any other hosts, clicking "Associate VMs" give me a green checkmark saying "No VMs matched any host." I'm opening a seperate issue for that.

Error screenshot: image

From production.log:

2020-06-14T23:21:07 [I|app|e695e4b8] Started GET "/hosts/foreman.domain.com/edit" for 123.123.123.123 at 2020-06-14 23:21:07 +0000
2020-06-14T23:21:07 [I|app|e695e4b8] Processing by HostsController#edit as HTML
2020-06-14T23:21:07 [I|app|e695e4b8]   Parameters: {"id"=>"foreman.domain.com"}
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendering hosts/edit.html.erb within layouts/application
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered hosts/_progress.html.erb (0.3ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.15.1.1/app/views/overrides/activation_keys/_host_environment_select.html.erb (24.5ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered hosts/puppet/_main_tab_fields.html.erb (8.8ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered collection of puppetclasses/_selectedClasses.html.erb [0 times] (0.0ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered collection of puppetclasses/_classes_in_groups.html.erb [0 times] (0.0ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered puppetclasses/_classes.html.erb (0.2ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered puppetclasses/_class_selection.html.erb (48.8ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered hosts/puppet/_puppet_classes_tab.html.erb (49.3ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered nic/_base_form.html.erb (57.9ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered nic/_virtual_form.html.erb (1.4ms)
2020-06-14T23:21:07 [I|app|e695e4b8] Deface: 'foreman_fog_proxmox/engine_add_vm_type_to_nic_provider_specific_form' matched starting with 'erb[loud]:contains('f.fields_for')' and ending with 'erb[silent]:contains('end')'
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered nic/_provider_specific_form.html.erb (15.0ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered nic/manageds/_managed.html.erb (76.0ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered hosts/_interfaces.html.erb (77.0ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered hosts/_form.html.erb (245.9ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered hosts/edit.html.erb within layouts/application (248.2ms)
2020-06-14T23:21:07 [W|app|e695e4b8] Action failed
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendering common/500.html.erb within layouts/application
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered common/500.html.erb within layouts/application (1.3ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered layouts/_application_content.html.erb (0.6ms)
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendering layouts/base.html.erb
2020-06-14T23:21:07 [I|app|e695e4b8]   Rendered layouts/base.html.erb (2.4ms)
2020-06-14T23:21:07 [I|app|e695e4b8] Completed 500 Internal Server Error in 305ms (Views: 5.8ms | ActiveRecord: 29.7ms)

OS version: kernel-3.10.0-1127.el7.x86_64 / CentOS Linux release 7.8.2003 (Core)

Package versions (foreman server):

Installed Packages
candlepin-3.1.7-1.el7.noarch
candlepin-selinux-3.1.7-1.el7.noarch
foreman-2.0.1-1.el7.noarch
foreman-cli-2.0.1-1.el7.noarch
foreman-debug-2.0.1-1.el7.noarch
foreman-dynflow-sidekiq-2.0.1-1.el7.noarch
foreman-installer-2.0.1-1.el7.noarch
foreman-installer-katello-2.0.1-1.el7.noarch
foreman-postgresql-2.0.1-1.el7.noarch
foreman-proxy-2.0.1-1.el7.noarch
foreman-release-2.0.1-1.el7.noarch
foreman-release-scl-7-2.el7.noarch
foreman-selinux-2.0.1-1.el7.noarch
katello-3.15.1-1.el7.noarch
katello-certs-tools-2.6.0-1.el7.noarch
katello-client-bootstrap-1.7.4-1.el7.noarch
katello-common-3.15.1-1.el7.noarch
katello-debug-3.15.1-1.el7.noarch
katello-default-ca-1.0-1.noarch
katello-host-tools-3.5.3-1.el7.noarch
katello-host-tools-fact-plugin-3.5.3-1.el7.noarch
katello-repos-3.15.1-1.el7.noarch
katello-selinux-3.1.1-1.el7.noarch
katello-server-ca-1.0-3.noarch
pulp-client-1.0-1.noarch
pulp-deb-plugins-1.10.1-1.el7.noarch
pulp-docker-plugins-3.2.6-1.el7.noarch
pulp-katello-1.0.3-1.el7.noarch
pulp-puppet-plugins-2.21.2-1.el7.noarch
pulp-puppet-tools-2.21.2-1.el7.noarch
pulp-rpm-plugins-2.21.2-1.el7.noarch
pulp-selinux-2.21.2-1.el7.noarch
pulp-server-2.21.2-1.el7.noarch
pulpcore-selinux-1.0.0-2.el7.x86_64
python-gofer-qpid-2.12.5-3.el7.noarch
python-pulp-common-2.21.2-1.el7.noarch
python-pulp-deb-common-1.10.1-1.el7.noarch
python-pulp-docker-common-3.2.6-1.el7.noarch
python-pulp-oid_validation-2.21.2-1.el7.noarch
python-pulp-puppet-common-2.21.2-1.el7.noarch
python-pulp-repoauth-2.21.2-1.el7.noarch
python-pulp-rpm-common-2.21.2-1.el7.noarch
python-pulp-streamer-2.21.2-1.el7.noarch
python2-qpid-1.37.0-4.el7.noarch
python2-qpid-proton-0.30.0-2.el7.x86_64
python2-qpid-qmf-1.39.0-1.el7.x86_64
python3-pulp-2to3-migration-0.1.0-1.el7.noarch
python3-pulp-container-1.0.0-1.el7.noarch
python3-pulp-file-0.1.1-1.el7.noarch
python3-pulpcore-3.0.1-2.el7.noarch
qpid-cpp-client-1.39.0-1.el7.x86_64
qpid-cpp-client-devel-1.39.0-1.el7.x86_64
qpid-cpp-server-1.39.0-1.el7.x86_64
qpid-cpp-server-linearstore-1.39.0-1.el7.x86_64
qpid-dispatch-router-1.11.0-1.el7.x86_64
qpid-proton-c-0.30.0-2.el7.x86_64
qpid-qmf-1.39.0-1.el7.x86_64
qpid-tools-1.39.0-1.el7.noarch
rubygem-foreman_maintain-0.6.2-1.el7.noarch
tfm-rubygem-actioncable-5.2.1-3.el7.noarch
tfm-rubygem-actionmailer-5.2.1-3.el7.noarch
tfm-rubygem-actionpack-5.2.1-3.el7.noarch
tfm-rubygem-actionview-5.2.1-3.el7.noarch
tfm-rubygem-activejob-5.2.1-3.el7.noarch
tfm-rubygem-activemodel-5.2.1-3.el7.noarch
tfm-rubygem-activerecord-5.2.1-3.el7.noarch
tfm-rubygem-activerecord-import-1.0.0-2.el7.noarch
tfm-rubygem-activerecord-session_store-1.1.1-3.el7.noarch
tfm-rubygem-activestorage-5.2.1-3.el7.noarch
tfm-rubygem-activesupport-5.2.1-3.el7.noarch
tfm-rubygem-addressable-2.6.0-1.el7.noarch
tfm-rubygem-algebrick-0.7.3-6.el7.noarch
tfm-rubygem-ancestry-3.0.0-4.el7.noarch
tfm-rubygem-anemone-0.7.2-17.el7.noarch
tfm-rubygem-angular-rails-templates-1.0.2-5.el7.noarch
tfm-rubygem-apipie-bindings-0.3.0-1.el7.noarch
tfm-rubygem-apipie-params-0.0.5-3.el7.noarch
tfm-rubygem-apipie-rails-0.5.17-2.el7.noarch
tfm-rubygem-arel-9.0.0-3.el7.noarch
tfm-rubygem-audited-4.9.0-2.el7.noarch
tfm-rubygem-awesome_print-1.8.0-4.el7.noarch
tfm-rubygem-bcrypt-3.1.12-1.el7.x86_64
tfm-rubygem-builder-3.2.3-3.el7.noarch
tfm-rubygem-bundler_ext-0.4.1-4.el7.noarch
tfm-rubygem-clamp-1.1.2-4.el7.noarch
tfm-rubygem-concurrent-ruby-1.1.6-1.el7.noarch
tfm-rubygem-concurrent-ruby-edge-0.6.0-1.fm2_0.el7.noarch
tfm-rubygem-connection_pool-2.2.2-1.el7.noarch
tfm-rubygem-crass-1.0.4-3.el7.noarch
tfm-rubygem-css_parser-1.4.7-3.el7.noarch
tfm-rubygem-daemons-1.2.3-5.el7.noarch
tfm-rubygem-deacon-1.0.0-3.el7.noarch
tfm-rubygem-deep_cloneable-3.0.0-2.el7.noarch
tfm-rubygem-deface-1.5.3-2.el7.noarch
tfm-rubygem-diffy-3.0.1-5.el7.noarch
tfm-rubygem-domain_name-0.5.20160310-3.el7.noarch
tfm-rubygem-dynflow-1.4.3-1.fm2_0.el7.noarch
tfm-rubygem-erubi-1.7.1-3.el7.noarch
tfm-rubygem-ethon-0.12.0-1.el7.noarch
tfm-rubygem-excon-0.58.0-4.el7.noarch
tfm-rubygem-facter-2.4.0-6.el7.x86_64
tfm-rubygem-faraday-0.15.4-1.el7.noarch
tfm-rubygem-fast_gettext-1.4.1-3.el7.noarch
tfm-rubygem-ffi-1.11.3-1.el7.x86_64
tfm-rubygem-fog-core-2.1.0-2.el7.noarch
tfm-rubygem-fog-json-1.2.0-2.el7.noarch
tfm-rubygem-fog-proxmox-0.12.0-1.el7.noarch
tfm-rubygem-foreman-tasks-1.1.1-1.fm2_0.el7.noarch
tfm-rubygem-foreman-tasks-core-0.3.4-1.fm2_0.el7.noarch
tfm-rubygem-foreman_ansible-5.0.1-1.fm2_0.el7.noarch
tfm-rubygem-foreman_ansible_core-3.0.3-1.fm2_0.el7.noarch
tfm-rubygem-foreman_column_view-0.4.0-3.fm1_22.el7.noarch
tfm-rubygem-foreman_discovery-16.0.1-2.fm2_0.el7.noarch
tfm-rubygem-foreman_fog_proxmox-0.11.1-1.fm2_0.el7.noarch
tfm-rubygem-foreman_remote_execution-3.2.1-1.fm2_0.el7.noarch
tfm-rubygem-foreman_remote_execution-cockpit-3.2.1-1.fm2_0.el7.noarch
tfm-rubygem-foreman_remote_execution_core-1.3.0-1.el7.noarch
tfm-rubygem-foreman_setup-7.0.0-2.fm2_0.el7.noarch
tfm-rubygem-foreman_templates-8.0.0-1.fm2_0.el7.noarch
tfm-rubygem-formatador-0.2.1-11.el7.noarch
tfm-rubygem-friendly_id-5.2.4-3.el7.noarch
tfm-rubygem-get_process_mem-0.2.1-3.el7.noarch
tfm-rubygem-gettext_i18n_rails-1.8.0-1.el7.noarch
tfm-rubygem-git-1.5.0-1.el7.noarch
tfm-rubygem-gitlab-sidekiq-fetcher-0.5.2-1.el7.noarch
tfm-rubygem-globalid-0.4.1-5.el7.noarch
tfm-rubygem-graphql-1.8.14-1.el7.noarch
tfm-rubygem-graphql-batch-0.3.10-1.el7.noarch
tfm-rubygem-gssapi-1.2.0-6.el7.noarch
tfm-rubygem-hammer_cli-2.0.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman-2.0.2-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.3.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.4-4.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.14-1.fm2_0.el7.noarch
tfm-rubygem-hammer_cli_katello-0.21.0-2.el7.noarch
tfm-rubygem-hashie-3.6.0-1.el7.noarch
tfm-rubygem-highline-1.7.8-4.el7.noarch
tfm-rubygem-http-cookie-1.0.2-3.el7.noarch
tfm-rubygem-i18n-1.4.0-3.el7.noarch
tfm-rubygem-ipaddress-0.8.0-11.el7.noarch
tfm-rubygem-jwt-2.2.1-1.el7.noarch
tfm-rubygem-katello-3.15.1.1-1.el7.noarch
tfm-rubygem-ldap_fluff-0.4.7-4.el7.noarch
tfm-rubygem-little-plugger-1.1.4-1.el7.noarch
tfm-rubygem-locale-2.0.9-13.el7.noarch
tfm-rubygem-logging-2.2.2-4.el7.noarch
tfm-rubygem-loofah-2.2.2-4.el7.noarch
tfm-rubygem-mail-2.7.0-3.el7.noarch
tfm-rubygem-marcel-0.3.2-3.el7.noarch
tfm-rubygem-method_source-0.9.0-3.el7.noarch
tfm-rubygem-mime-types-3.2.2-3.el7.noarch
tfm-rubygem-mime-types-data-3.2018.0812-3.el7.noarch
tfm-rubygem-mimemagic-0.3.2-3.el7.noarch
tfm-rubygem-mini_mime-1.0.0-3.el7.noarch
tfm-rubygem-mini_portile2-2.3.0-3.el7.noarch
tfm-rubygem-multi_json-1.14.1-1.el7.noarch
tfm-rubygem-multipart-post-2.0.0-1.el7.noarch
tfm-rubygem-mustermann-1.0.2-3.el7.noarch
tfm-rubygem-net-ldap-0.16.1-1.el7.noarch
tfm-rubygem-net-ping-2.0.1-3.el7.noarch
tfm-rubygem-net-scp-1.2.1-3.el7.noarch
tfm-rubygem-net-ssh-4.2.0-1.el7.noarch
tfm-rubygem-netrc-0.11.0-4.el7.noarch
tfm-rubygem-nio4r-2.3.1-3.el7.x86_64
tfm-rubygem-nokogiri-1.8.4-6.el7.x86_64
tfm-rubygem-oauth-0.5.4-3.el7.noarch
tfm-rubygem-parse-cron-0.1.4-4.fm2_0.el7.noarch
tfm-rubygem-passenger-4.0.18-10.13.el7.x86_64
tfm-rubygem-passenger-native-4.0.18-10.13.el7.x86_64
tfm-rubygem-passenger-native-libs-4.0.18-10.13.el7.x86_64
tfm-rubygem-pg-1.1.4-1.el7.x86_64
tfm-rubygem-polyglot-0.3.5-2.el7.noarch
tfm-rubygem-powerbar-2.0.1-1.el7.noarch
tfm-rubygem-promise.rb-0.7.4-1.el7.noarch
tfm-rubygem-public_suffix-3.0.3-1.el7.noarch
tfm-rubygem-pulp_2to3_migration_client-0.1.0-1.el7.noarch
tfm-rubygem-pulp_ansible_client-0.2.0b1.dev0.1560866833-1.el7.noarch
tfm-rubygem-pulp_container_client-1.0.0-1.el7.noarch
tfm-rubygem-pulp_file_client-0.1.0-1.el7.noarch
tfm-rubygem-pulp_rpm_client-3.0.0-1.el7.noarch
tfm-rubygem-pulpcore_client-3.0.0-3.el7.noarch
tfm-rubygem-qpid_messaging-1.38.0-1.el7.x86_64
tfm-rubygem-rabl-0.13.1-3.el7.noarch
tfm-rubygem-rack-2.0.6-3.el7.noarch
tfm-rubygem-rack-cors-1.0.2-1.el7.noarch
tfm-rubygem-rack-jsonp-1.3.1-8.el7.noarch
tfm-rubygem-rack-protection-2.0.3-3.el7.noarch
tfm-rubygem-rack-test-1.1.0-3.el7.noarch
tfm-rubygem-rails-5.2.1-3.el7.noarch
tfm-rubygem-rails-dom-testing-2.0.3-5.el7.noarch
tfm-rubygem-rails-html-sanitizer-1.0.4-4.el7.noarch
tfm-rubygem-rails-i18n-5.1.1-3.el7.noarch
tfm-rubygem-railties-5.2.1-3.el7.noarch
tfm-rubygem-rainbow-2.2.1-3.el7.noarch
tfm-rubygem-rake-compiler-1.0.7-2.el7.noarch
tfm-rubygem-rb-inotify-0.9.7-4.el7.noarch
tfm-rubygem-record_tag_helper-1.0.1-2.el7.noarch
tfm-rubygem-redis-4.1.2-1.el7.noarch
tfm-rubygem-responders-3.0.0-2.el7.noarch
tfm-rubygem-rest-client-2.0.2-2.el7.noarch
tfm-rubygem-rkerberos-0.1.5-16.el7.x86_64
tfm-rubygem-roadie-3.4.0-2.el7.noarch
tfm-rubygem-roadie-rails-2.0.0-2.el7.noarch
tfm-rubygem-robotex-1.0.0-21.el7.noarch
tfm-rubygem-rsec-0.4.3-3.el7.noarch
tfm-rubygem-ruby2ruby-2.4.2-1.el7.noarch
tfm-rubygem-ruby_parser-3.10.1-2.el7.noarch
tfm-rubygem-rubyipmi-0.10.0-5.el7.noarch
tfm-rubygem-runcible-2.12.1-2.el7.noarch
tfm-rubygem-safemode-1.3.5-2.el7.noarch
tfm-rubygem-scoped_search-4.1.7-2.el7.noarch
tfm-rubygem-secure_headers-6.3.0-1.el7.noarch
tfm-rubygem-sequel-5.7.1-2.el7.noarch
tfm-rubygem-sexp_processor-4.10.0-5.el7.noarch
tfm-rubygem-sidekiq-5.2.7-2.el7.noarch
tfm-rubygem-sinatra-2.0.3-3.el7.noarch
tfm-rubygem-smart_proxy_ansible-3.0.1-3.fm2_0.el7.noarch
tfm-rubygem-smart_proxy_discovery-1.0.5-3.fm2_0.el7.noarch
tfm-rubygem-smart_proxy_discovery_image-1.0.9-3.fm2_0.el7.noarch
tfm-rubygem-smart_proxy_dynflow-0.2.4-3.fm2_0.el7.noarch
tfm-rubygem-smart_proxy_dynflow_core-0.2.4-2.fm2_0.el7.noarch
tfm-rubygem-smart_proxy_pulp-2.0.0-2.fm2_0.el7.noarch
tfm-rubygem-smart_proxy_remote_execution_ssh-0.3.0-1.fm2_0.el7.noarch
tfm-rubygem-sprockets-3.7.2-5.el7.noarch
tfm-rubygem-sprockets-rails-3.2.1-5.el7.noarch
tfm-rubygem-sqlite3-1.3.13-4.el7.x86_64
tfm-rubygem-sshkey-1.9.0-3.el7.noarch
tfm-rubygem-statsd-instrument-2.1.4-2.el7.noarch
tfm-rubygem-thor-0.20.0-7.el7.noarch
tfm-rubygem-thread_safe-0.3.6-5.el7.noarch
tfm-rubygem-tilt-2.0.8-3.el7.noarch
tfm-rubygem-typhoeus-1.3.1-1.el7.noarch
tfm-rubygem-tzinfo-1.2.5-3.el7.noarch
tfm-rubygem-unf-0.1.3-7.el7.noarch
tfm-rubygem-unf_ext-0.0.7.2-1.el7.x86_64
tfm-rubygem-unicode-0.4.4.4-1.el7.x86_64
tfm-rubygem-unicode-display_width-1.0.5-3.el7.noarch
tfm-rubygem-validates_lengths_from_database-0.5.0-6.el7.noarch
tfm-rubygem-webpack-rails-0.9.8-4.el7.noarch
tfm-rubygem-websocket-driver-0.7.0-3.el7.x86_64
tfm-rubygem-websocket-extensions-0.1.3-3.el7.noarch
tfm-rubygem-will_paginate-3.1.7-2.el7.noarch
tfm-rubygem-x-editable-rails-1.5.5-4.el7.noarch
tfm-runtime-6.1-0.1.el7.x86_64

Package versions (proxmox hosts):

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
pve-kernel-5.3: 6.1-6
pve-kernel-5.0: 6.0-11
pve-kernel-5.4.41-1-pve: 5.4.41-1
pve-kernel-5.3.18-3-pve: 5.3.18-3
pve-kernel-5.0.21-5-pve: 5.0.21-10
pve-kernel-5.0.15-1-pve: 5.0.15-1
ceph: 14.2.9-pve1
ceph-fuse: 14.2.9-pve1
corosync: 3.0.3-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.15-pve1
libproxmox-acme-perl: 1.0.4
libpve-access-control: 6.1-1
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.1-3
libpve-guest-common-perl: 3.0-10
libpve-http-server-perl: 3.0-5
libpve-storage-perl: 6.1-8
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.2-1
lxcfs: 4.0.3-pve2
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.2-7
pve-cluster: 6.1-8
pve-container: 3.1-8
pve-docs: 6.2-4
pve-edk2-firmware: 2.20200229-1
pve-firewall: 4.1-2
pve-firmware: 3.1-1
pve-ha-manager: 3.0-9
pve-i18n: 2.1-3
pve-qemu-kvm: 5.0.0-4
pve-xtermjs: 4.3.0-1
qemu-server: 6.2-3
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.4-pve1
RedChops commented 4 years ago

This also affects 0.11.1, see: ActionView::Template::Error un defined method 'type' for nil:NilClass /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_fog_proxmox-0.11.1/app/helpers/proxmox_vm_helper.rb:90:in 'vm_type' /usr/share/foreman/app/views/nic/_provider_specific_form.html.erb:31:in '_9a4ed00364bf866e1745cbe82093e631' /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/base.rb:274:in '_run' /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/template.rb:185:in 'block in render' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/notifications.rb:182:in 'instrument' /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/template.rb:385:in 'instrument_render_template' /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/template.rb:183:in 'render' /opt/theforeman/tfm/root/usr/share/gems/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in 'render' /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/renderer/partial_renderer.rb:357:in 'block in render_partial' /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/renderer/abstract_renderer.rb:88:in 'block in instrument' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/notifications.rb:180:in 'block in instrument' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/notifications/instrumenter.rb:24:in 'instrument' /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.1/lib/active_support/notifications.rb:180:in 'instrument' /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/renderer/abstract_renderer.rb:87:in 'instrument' /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/renderer/partial_renderer.rb:346:in 'render_partial' /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/renderer/partial_renderer.rb:317:in 'render' /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/renderer/renderer.rb:65:in 'render_partial_to_object' /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/renderer/renderer.rb:53:in 'render_partial' /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.1/lib/action_view/helpers/rendering_helper.rb:38:in 'render' /usr/share/foreman/app/views/nic/manageds/_managed.html.erb:16:in '_44a7ed0a149b63f56dff190acb056027'

Applying the above fix to /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_fog_proxmox-0.11.1/app/views/compute_resources_vms/form/proxmox/_add_vm_type_to_nic_provider_specific_form.html.erb then restarting Foreman fixes the error for me as well