Project

General

Profile

Bug #8590

undefined method `template' for nil:NilClass when listing VMs

Added by Dominic Cleal over 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - VMware
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Something in vSphere instances seems to have no hardware "config" so triggers the following stack trace when listing VMs for the compute resource:

Operation FAILED: undefined method `template' for nil:NilClass
/usr/share/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:28:in `block in allvmsbyfolder'
/usr/share/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:23:in `each'
/usr/share/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:23:in `allvmsbyfolder'
/usr/share/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:25:in `block in allvmsbyfolder'
/usr/share/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:23:in `each'
/usr/share/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:23:in `allvmsbyfolder'
/usr/share/foreman/app/services/fog_extensions/vsphere/mini_servers.rb:13:in `all'
/usr/share/foreman/app/controllers/compute_resources_vms_controller.rb:5:in `index'

(reported by satar on #theforeman)

Associated revisions

Revision fc943370 (diff)
Added by Dominic Cleal over 4 years ago

fixes #8590 - handle missing 'config' when listing vSphere VMs

Revision 6031d36e (diff)
Added by Dominic Cleal over 4 years ago

fixes #8590 - handle missing 'config' when listing vSphere VMs

(cherry picked from commit fc94337014d175548746b16f2c70bb133de29497)

History

#1 Updated by The Foreman Bot over 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1997 added
  • Pull request deleted ()

#2 Updated by Dominic Cleal over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) set to 29

Also available in: Atom PDF