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.
Compute resources - VMware
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.
Refs #20118 - Correct string extraction
#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
Applied in changeset 21148e288fd1f7c159976654d081576dae6a3983.
#4 Updated by Tomer Brisker over 4 years ago
- Target version deleted (
#5 Updated by Kavita Gaikwad over 4 years ago
- Related to Bug #26209: undefined local variable or method `e' for #<Host::Managed> object added
Fixes #20118 - return error message
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.
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`.