Project

General

Profile

Actions

Bug #2694

closed

New host creation in Vsphere fails

Added by Kal Aeolian over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Host creation
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I'm using the nightly RPM builds, this was from foreman-1.2.9999-5.201306211032gite902d93.el6.noarch

In the UI, I select which compute resource to use. The Virtual Machine tab reports
"Error loading virtual machine information: Internal Server Error"

and i get this in the logs:

Rendered compute_resources_vms/form/_vmware.html.erb (226.3ms)
Rendered hosts/_compute.html.erb (1020.1ms)
Setting current location thread-local variable to none
Setting current organization thread-local variable to none
Operation FAILED: uninitialized constant Fog::Compute::Vsphere::Real::Regex

I've attached the full debug output in a text file (vsphere_trace.txt). Let me know if you need any more info or need me to do any additional testing!


Files

vsphere_trace.txt vsphere_trace.txt 19.2 KB Kal Aeolian, 06/21/2013 03:39 PM
Actions #1

Updated by Dominic Cleal over 10 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal
  • Target version changed from 1.2.0 to 1.3.0

Thanks, submitted a patch to fog to fix it: https://github.com/fog/fog/pull/1908

The 1.2 repos contain fog 1.11.1 which doesn't include this bug, only the nightlies received the new 1.12.1.

Actions #2

Updated by Dominic Cleal over 10 years ago

  • Status changed from Assigned to Resolved

fog 1.14.0 has been released into nightlies (may take a few hours to propagate).

Actions #3

Updated by Dominic Cleal over 10 years ago

  • % Done changed from 0 to 100
Actions #4

Updated by Jamie Buchanan over 10 years ago

Hi Dominic,
You mentioned that 1.2 repos shouldn't include this bug but I seem to get it with 1.2 which I installed less than 1 week ago. I used the basic install as advised by the Foreman website and my "about" gives Version 1.2

I'm using Ubuntu 12.04. Here are my foreman packages as seen by dpkg:
ii foreman 1.2.0+ubuntu2 Systems management web interface
ii foreman-compute 1.2.0+ubuntu2 metapackage providing fog dependencies for Foreman (for
ii foreman-installer 1.2.0-debian1 no description given
ii foreman-postgresql 1.2.0+ubuntu2 metapackage providing PostgreSQL dependencies for Forema
ii foreman-proxy 1.2.0+ubuntu1 RESTful proxies for DNS, DHCP, TFTP, and Puppet
ii foreman-vmware 1.2.0+ubuntu2 metapackage providing vmware dependencies for Foreman

Initially I was trying to contact vShpere without foreman-compute installed and then I tried again without foreman-vmware installed. So both packages were added in stages with restarts. I could then successfully list the vsphere vms that were not in folders.

However when I try to add a host, when I choose "Deploy on" <my vsphere compute resource> I can see the following in the /var/log/foreman/production.log which creates the error in the Virtual Machine tab:

Started POST "/hosts/compute_resource_selected" for 10.64.6.1 at Sat Jul 27 18:22:51 +0100 2013
Processing by HostsController#compute_resource_selected as */*
Parameters: {"authenticity_token"=>"xU5dsTILrNDlHnu5w2MASuWjqpvPXLWCN/OF04Jtlb8=", "utf8"=>"✓", "host"=>{"is_owned_by"=>"", "domain_id"=>"", "overwrite"=>"false", "puppet_ca_proxy_id"=>"", "progress_report_id"=>"[FILTERED]", "interfaces_attributes"=>{"new_interfaces"=>{"domain_id"=>"", "_destroy"=>"false", "type"=>"Nic::Managed", "ip"=>"", "mac"=>"", "name"=>"", "provider"=>"IPMI"}}, "puppet_proxy_id"=>"", "managed"=>"true", "comment"=>"", "build"=>"1", "hostgroup_id"=>"", "disk"=>"", "compute_resource_id"=>"1", "type"=>"Host::Managed", "ip"=>"", "architecture_id"=>"", "mac"=>"", "root_pass"=>"[FILTERED]", "model_id"=>"", "environment_id"=>"", "name"=>"foreman-vm03", "enabled"=>"1", "provision_method"=>"build"}}
Rendered compute_resources_vms/form/_vmware.html.erb (420.2ms)
Rendered hosts/_compute.html.erb (984.0ms)
Operation FAILED: uninitialized constant Fog::Compute::Vsphere::Real::Regex
Rendered common/500.html.erb (4.7ms)
Completed 500 Internal Server Error in 1003ms (Views: 5.8ms | ActiveRecord: 0.4ms)

Apologies if this was the wrong place to put this info. Let me know if you need anything else.

Cheers,
J

Actions #5

Updated by Dominic Cleal over 10 years ago

Sorry for the confusion Jamie, my response was only relating to the RPMs we provide. The Debian packages take the latest versions and so picked up this bug in Fog.

I'd suggest manually applying the tiny patch (https://github.com/fog/fog/pull/1908/files) to your install until 1.2.1 is released, which should contain a fixed version. The file in the patch will be under ~foreman somewhere (maybe ~foreman/vendor?), try using `find` to locate it.

Actions

Also available in: Atom PDF