Provisioning new host in vmware

Hi dear,

Problem:
My foreman (katello) is integration with vmware (OVH). When create new host this error present:

Failed to create a compute VMWARE (VMware) instance myhost.domain.com: undefined method `attributes’ for #String:0x007fd2e4e9c3c0

My integration with vmware be user root.

Whats the problem ? How to resolution?

Hi,

Do you have a traceback from the production log? Which version of Foreman are you running?

I have also same issue with foreman 1.17.
I got below error

I created user with administrator previliges in vcenter server. I’m using vcsa 6.5

Which version of Vcenter are you running? Do you have a copy of the production log I can see?

foreman 1.17-stable

| /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:in `call'
 | /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.4/lib/action_dispatch/middleware/static.rb:125:in `call'
 | /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/secure_headers-3.4.1/lib/secure_headers/middleware.rb:12:in `call'
 | /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
 | /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `public_send'
 | /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `method_missing'
 | /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/urlmap.rb:68:in `block in call'
 | /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `each'
 | /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `call'
 | /usr/share/passenger/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
 | /usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
 | /usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
 | /usr/share/passenger/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
2018-05-04 10:40:39 d4dda2bd [app] [W] Rolling back due to a problem: [#<Orchestration::Task:0x007f40204653e0 @name="Set up compute instance ol07tst01.sstech.com", @status="failed", @priority=2, @action=[#<Host::Managed id: nil, name: "ol07tst01.sstech.com", last_compile: nil, last_report: nil, updated_at: nil, created_at: nil, root_pass: "$5$08pUFqDz$UcKLPf0DlgqrYIyeYJKbSuiamsITZRmamfklJF...", architecture_id: 1, operatingsystem_id: 2, environment_id: 1, ptable_id: 101, medium_id: 9, build: true, comment: "", disk: "", installed_at: nil, model_id: nil, hostgroup_id: 1, owner_id: 4, owner_type: "User", enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: 2, puppet_proxy_id: 1, certname: nil, image_id: nil, organization_id: nil, location_id: nil, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: "build", grub_pass: "$6$5jGIrNeB$/D7.QdcTHpaZq.TQpv1F4T4kaCYpkcX8kcsu4V...", global_status: 0, lookup_value_matcher: "fqdn=ol07tst01.sstech.com", pxe_loader: "PXELinux BIOS", expired_on: nil>, :setCompute], @timestamp=2018-05-04 14:40:39 UTC>]
2018-05-04 10:40:39 d4dda2bd [app] [I] Processed 1 tasks from queue 'Host::Managed Main', completed 0/7
2018-05-04 10:40:39 d4dda2bd [app] [E] Task 'Set up compute instance ol07tst01.sstech.com' *failed*
2018-05-04 10:40:39 d4dda2bd [app] [E] Task 'Query instance details for ol07tst01.sstech.com' *canceled*
2018-05-04 10:40:39 d4dda2bd [app] [E] Task 'Create DHCP Settings for ol07tst01.sstech.com' *canceled*
2018-05-04 10:40:39 d4dda2bd [app] [E] Task 'Deploy TFTP PXEGrub2 config for ol07tst01.sstech.com' *canceled*
2018-05-04 10:40:39 d4dda2bd [app] [E] Task 'Deploy TFTP PXELinux config for ol07tst01.sstech.com' *canceled*
2018-05-04 10:40:39 d4dda2bd [app] [E] Task 'Deploy TFTP PXEGrub config for ol07tst01.sstech.com' *canceled*
2018-05-04 10:40:39 d4dda2bd [app] [E] Task 'Fetch TFTP boot files for ol07tst01.sstech.com' *canceled*
2018-05-04 10:40:39 d4dda2bd [app] [I] Failed to save: Failed to create a compute vmware (VMware) instance ol07tst01.sstech.com: undefined method `attributes' for #<String:0x007f40205ad450>
 |
2018-05-04 10:40:39 d4dda2bd [app] [I]   Rendering hosts/new.html.erb within layouts/application
2018-05-04 10:40:39 d4dda2bd [app] [I]   Rendered hosts/_progress.html.erb (1.0ms)
2018-05-04 10:40:39 d4dda2bd [app] [I]   Rendered hosts/puppet/_main_tab_fields.html.erb (4.4ms)
2018-05-04 10:40:39 d4dda2bd [app] [I]   Rendered collection of puppetclasses/_selectedClasses.html.erb [0 times] (0.0ms)
2018-05-04 10:40:39 d4dda2bd [app] [I]   Rendered collection of puppetclasses/_classes_in_groups.html.erb [0 times] (0.0ms)
2018-05-04 10:40:39 d4dda2bd [app] [I]   Rendered puppetclasses/_classes.html.erb (5.7ms)
2018-05-04 10:40:39 d4dda2bd [app] [I]   Rendered puppetclasses/_class_selection.html.erb (50.4ms)
2018-05-04 10:40:39 d4dda2bd [app] [I]   Rendered hosts/puppet/_puppet_classes_tab.html.erb (51.0ms

Hi,

Would it be possible to get a foreman-debug from the foreman-instance? You can email it to me at chrobert@redhat.com so your private info does not get posted here.

Thanks. I’ll send you email

Laxman

sent you production log in email

Thank you
Laxman

This is http://projects.theforeman.org/issues/23335 which will be fixed in 1.17.1.

@laxman, I was able to verify the issue that @tbrisker stated, so it should be fixed in 17.1