Project

General

Profile

Bug #20118

Provisioning VM via foreman-vmware compute resource results in "Mac not set" even when provided and then "undefined method `merge' for nil:NilClass" when submitting a second time.

Added by Phillip Inman almost 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Attached log extract on exact error.

Steps to reproduce:

  • Create a VMware compute resource.
  • Create a new vm with default options except for resource pool and host password.
  • On first submit it will say mac not set (regardless if you set it or not, see attached photo)
  • On second submit the merge issue appears (see the second attached photo)

About the setup:

Foreman is standalone and not joined to a domain, neither is the VMware host.
OS is Ubuntu 16.04 kernel 4.4.0-81-generic
Ruby Version: 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]

Goal: Setup auto provision of VM's from Foreman to Vmware.

foreman-vmware error.txt foreman-vmware error.txt 15.3 KB Phillip Inman, 06/27/2017 05:37 AM
mac issue.PNG View mac issue.PNG 4.66 KB Phillip Inman, 06/27/2017 05:40 AM
merge issue.PNG View merge issue.PNG 9.65 KB Phillip Inman, 06/27/2017 05:40 AM
Mac%20issue Merge%20issue

Related issues

Related to Foreman - Bug #26209: undefined local variable or method `e' for #<Host::Managed> objectClosed

Associated revisions

Revision 21148e28 (diff)
Added by Sebastian Ziebell over 4 years ago

Fixes #20118 - return error message

  • Fixes #20118 - display error instead of NilClass

In some scenarios when editing a host in Foreman, the VM may not
exist in VMware anymore, e.g. was deleted or uuid is missing.
The host is handled as a new VM, but cannot be saved.

In this case, an error message should be shown.

  • display failure message in case `compute_attributes` are missing
  • add unit tests to check `setCompute`
  • add integration test to check alert is displayed
  • Fixes #20118 - return not found in ajax method

Instead of a NilClass error a not found status
is returned in case no compute resource is found
in the Ajax method `compute_resource_selected`.

  • increase rubocop class length warning (unfortunately)

Revision 3affba76 (diff)
Added by Tomer Brisker over 4 years ago

Refs #20118 - Correct string extraction

History

#1 Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6332 added

#2 Updated by Timo Goebel over 4 years ago

  • Target version set to 961
  • Fixed in Releases 1.21.0 added

#3 Updated by Anonymous over 4 years ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Tomer Brisker over 4 years ago

  • Target version deleted (961)

#5 Updated by Kavita Gaikwad over 4 years ago

  • Related to Bug #26209: undefined local variable or method `e' for #<Host::Managed> object added

Also available in: Atom PDF