Project

General

Profile

Actions

Bug #14058

open

vmware provisioning fails with cryptic error when not using propper user_data script

Added by Ivan Necas over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

If the user_data template doesn't return proper cloud-init structure,
the image-based provisioning on vmware fails with NoMethodError: undefined method `key?' for String

 NoMethodError: undefined method `key?' for #<String:0x005629bcee45f8>
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/fog-vsphere-0.6.0/lib/fog/vsphere/requests/compute/cloudinit_to_customspec.rb:16:in `cloudinit_to_customspec'
 | /home/inecas/Projects/ws/foreman-rex/foreman/app/models/compute_resources/foreman/model/vmware.rb:406:in `clone_vm'
 | /home/inecas/Projects/ws/foreman-rex/foreman/app/models/compute_resources/foreman/model/vmware.rb:354:in `create_vm'
 | /home/inecas/Projects/ws/foreman-rex/foreman/app/models/concerns/orchestration/compute.rb:76:in `setCompute'
 | /home/inecas/Projects/ws/foreman-rex/foreman/app/models/concerns/orchestration.rb:162:in `execute'
 | /home/inecas/Projects/ws/foreman-rex/foreman/app/models/concerns/orchestration.rb:107:in `block in process'
 | /home/inecas/Projects/ws/foreman-rex/foreman/app/models/concerns/orchestration.rb:99:in `each'
 | /home/inecas/Projects/ws/foreman-rex/foreman/app/models/concerns/orchestration.rb:99:in `process'
 | /home/inecas/Projects/ws/foreman-rex/foreman/app/models/concerns/orchestration.rb:35:in `on_save'
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:429:in `block in make_lambda'
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:161:in `call'
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:161:in `block in halting'
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:501:in `call'
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:501:in `block in call'
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:501:in `each'
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:501:in `call'
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.14.2/lib/active_support/callbacks.rb:86:in `run_callbacks'
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/callbacks.rb:302:in `create_or_update'
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/persistence.rb:103:in `save'
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/bullet-5.0.0/lib/bullet/active_record41.rb:29:in `save_with_bullet'
 | /home/inecas/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.1.14.2/lib/active_record/validations.rb:51:in `save'

It works, when the user_data has the right format (tested with the default user_data template)


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #11550: Failed to create a compute vmware-hq (VMware) instance es1.initial..dev: undefined method `key?' for #<String:0x0000000ab647e8>Resolved08/25/2015Actions
Actions #1

Updated by Ivan Necas about 7 years ago

  • Related to Bug #11550: Failed to create a compute vmware-hq (VMware) instance es1.initial..dev: undefined method `key?' for #<String:0x0000000ab647e8> added
Actions

Also available in: Atom PDF