Compute Resource Provider pull down is empty

Hello folk, I’m having a problem with a new installation of Foreman 1.15

I’m just trying to add a libvirt compute resource, and the providers pulldown is blank. It just says “Choose a provider”.

It already had foreman-libvirt 1.15.6 Release: 1.el7

However, I saw a post out there saying you needed the foreman-compute package installed. So I installed foreman-compute 1.15.6 Release: 1.el7 - no changes though even after restarting the foreman front end.

The following is the debug in my production.log:

2018-02-13 20:03:09 0665a59c [app] [I] Current user: admin (administrator)
2018-02-13 20:03:09 0665a59c [app] [I]   Rendered hosts/welcome.html.erb within layouts/application (2.4ms)
2018-02-13 20:03:09 0665a59c [app] [I]   Rendered layouts/_application_content.html.erb (0.3ms)
2018-02-13 20:03:09 0665a59c [app] [I]   Rendered home/_user_dropdown.html.erb (3.0ms)
2018-02-13 20:03:09 0665a59c [app] [I] Read fragment views/tabs_and_title_records-3 (0.2ms)
2018-02-13 20:03:09 0665a59c [app] [I]   Rendered home/_location_dropdown.html.erb (11.9ms)
2018-02-13 20:03:09 0665a59c [app] [I]   Rendered home/_org_switcher.html.erb (12.2ms)
2018-02-13 20:03:09 0665a59c [app] [I]   Rendered home/_submenu.html.erb (2.9ms)
2018-02-13 20:03:09 0665a59c [app] [I]   Rendered home/_submenu.html.erb (2.3ms)
2018-02-13 20:03:09 0665a59c [app] [I]   Rendered home/_submenu.html.erb (2.0ms)
2018-02-13 20:03:09 0665a59c [app] [I]   Rendered home/_submenu.html.erb (1.5ms)
2018-02-13 20:03:09 0665a59c [app] [I]   Rendered home/_submenu.html.erb (2.1ms)
2018-02-13 20:03:09 0665a59c [app] [I] Write fragment views/tabs_and_title_records-3 (1.0ms)
2018-02-13 20:03:09 0665a59c [app] [I]   Rendered home/_topbar.html.erb (34.2ms)
2018-02-13 20:03:09 0665a59c [app] [I]   Rendered layouts/base.html.erb (36.4ms)
2018-02-13 20:03:09 0665a59c [app] [I] Filter chain halted as :welcome rendered or redirected
2018-02-13 20:03:09 0665a59c [app] [I] Completed 200 OK in 52ms (Views: 40.6ms | ActiveRecord: 1.7ms)
2018-02-13 20:03:09 22d427f2 [app] [I] Started GET "/notification_recipients" for 10.200.87.144 at 2018-02-13 20:03:09 +0000
2018-02-13 20:03:09 22d427f2 [app] [I] Processing by NotificationRecipientsController#index as JSON
2018-02-13 20:03:09 22d427f2 [app] [I] Current user: admin (administrator)
2018-02-13 20:03:09 22d427f2 [app] [I] Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 0.7ms)
2018-02-13 20:03:11 535aa889 [app] [I] Started GET "/compute_resources" for 10.200.87.144 at 2018-02-13 20:03:11 +0000
2018-02-13 20:03:11 535aa889 [app] [I] Processing by ComputeResourcesController#index as HTML
2018-02-13 20:03:11 535aa889 [app] [I] Current user: admin (administrator)
2018-02-13 20:03:11 535aa889 [app] [I]   Rendered compute_resources/welcome.html.erb within layouts/application (2.0ms)
2018-02-13 20:03:11 535aa889 [app] [I]   Rendered layouts/_application_content.html.erb (0.2ms)
2018-02-13 20:03:11 535aa889 [app] [I]   Rendered home/_user_dropdown.html.erb (4.6ms)
2018-02-13 20:03:11 535aa889 [app] [I] Read fragment views/tabs_and_title_records-3 (0.2ms)
2018-02-13 20:03:11 535aa889 [app] [I]   Rendered home/_topbar.html.erb (9.4ms)
2018-02-13 20:03:11 535aa889 [app] [I]   Rendered layouts/base.html.erb (11.4ms)
2018-02-13 20:03:11 535aa889 [app] [I] Filter chain halted as :welcome rendered or redirected
2018-02-13 20:03:11 535aa889 [app] [I] Completed 200 OK in 25ms (Views: 15.0ms | ActiveRecord: 1.1ms)
2018-02-13 20:03:11 489cb7a1 [app] [I] Started GET "/notification_recipients" for 10.200.87.144 at 2018-02-13 20:03:11 +0000
2018-02-13 20:03:11 489cb7a1 [app] [I] Processing by NotificationRecipientsController#index as JSON
2018-02-13 20:03:11 489cb7a1 [app] [I] Current user: admin (administrator)
2018-02-13 20:03:11 489cb7a1 [app] [I] Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.5ms)
2018-02-13 20:03:12  [app] [I] Current user: foreman_admin (administrator)
2018-02-13 20:03:12  [app] [D] Setting current user thread-local variable to foreman_admin
2018-02-13 20:03:12  [app] [D] Setting current user thread-local variable to nil
2018-02-13 20:03:12  [app] [I] Current user: foreman_admin (administrator)
2018-02-13 20:03:12  [app] [D] Setting current user thread-local variable to foreman_admin
2018-02-13 20:03:12  [app] [D] Setting current user thread-local variable to nil
2018-02-13 20:03:12 245f20a2 [app] [I] Started GET "/compute_resources/new" for 10.200.87.144 at 2018-02-13 20:03:12 +0000
2018-02-13 20:03:12 245f20a2 [app] [I] Processing by ComputeResourcesController#new as HTML
2018-02-13 20:03:12 245f20a2 [app] [I] Current user: admin (administrator)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered taxonomies/_loc_org_tabs.html.erb (5.6ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered compute_resources/_form.html.erb (11.4ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered compute_resources/new.html.erb within layouts/application (11.8ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered layouts/_application_content.html.erb (0.2ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered home/_user_dropdown.html.erb (2.6ms)
2018-02-13 20:03:12 245f20a2 [app] [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered home/_location_dropdown.html.erb (11.6ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered home/_org_switcher.html.erb (11.9ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered home/_submenu.html.erb (2.8ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered home/_submenu.html.erb (2.3ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered home/_submenu.html.erb (1.9ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered home/_submenu.html.erb (1.5ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered home/_submenu.html.erb (2.1ms)
2018-02-13 20:03:12 245f20a2 [app] [I] Write fragment views/tabs_and_title_records-3 (0.8ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered home/_topbar.html.erb (32.9ms)
2018-02-13 20:03:12 245f20a2 [app] [I]   Rendered layouts/base.html.erb (34.9ms)
2018-02-13 20:03:12 245f20a2 [app] [I] Completed 200 OK in 62ms (Views: 47.7ms | ActiveRecord: 1.6ms)
2018-02-13 20:03:12 06ff2c35 [app] [I] Started GET "/compute_resources/new" for 10.200.87.144 at 2018-02-13 20:03:12 +0000
2018-02-13 20:03:12 06ff2c35 [app] [I] Processing by ComputeResourcesController#new as HTML
2018-02-13 20:03:12 06ff2c35 [app] [I] Current user: admin (administrator)
2018-02-13 20:03:12 06ff2c35 [app] [I]   Rendered taxonomies/_loc_org_tabs.html.erb (5.2ms)
2018-02-13 20:03:12 06ff2c35 [app] [I]   Rendered compute_resources/_form.html.erb (11.1ms)
2018-02-13 20:03:12 06ff2c35 [app] [I]   Rendered compute_resources/new.html.erb within layouts/application (11.5ms)
2018-02-13 20:03:12 06ff2c35 [app] [I]   Rendered layouts/_application_content.html.erb (0.3ms)
2018-02-13 20:03:12 06ff2c35 [app] [I]   Rendered home/_user_dropdown.html.erb (3.2ms)
2018-02-13 20:03:12 06ff2c35 [app] [I] Read fragment views/tabs_and_title_records-3 (0.2ms)
2018-02-13 20:03:12 06ff2c35 [app] [I]   Rendered home/_topbar.html.erb (8.0ms)
2018-02-13 20:03:12 06ff2c35 [app] [I]   Rendered layouts/base.html.erb (10.4ms)
2018-02-13 20:03:12 06ff2c35 [app] [I] Completed 200 OK in 33ms (Views: 23.0ms | ActiveRecord: 1.5ms)
2018-02-13 20:03:13 7cd0ace4 [app] [I] Started GET "/notification_recipients" for 10.200.87.144 at 2018-02-13 20:03:13 +0000
2018-02-13 20:03:13 7cd0ace4 [app] [I] Processing by NotificationRecipientsController#index as JSON
2018-02-13 20:03:13 7cd0ace4 [app] [I] Current user: admin (administrator)
2018-02-13 20:03:13 7cd0ace4 [app] [I] Completed 200 OK in 6ms (Views: 0.3ms | ActiveRecord: 0.4ms)
2018-02-13 20:03:23 24052b75 [app] [I] Started GET "/notification_recipients" for 10.200.87.144 at 2018-02-13 20:03:23 +0000
2018-02-13 20:03:23 24052b75 [app] [I] Processing by NotificationRecipientsController#index as JSON
2018-02-13 20:03:23 24052b75 [app] [I] Current user: admin (administrator)
2018-02-13 20:03:23 24052b75 [app] [I] Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 0.7ms)
2018-02-13 20:03:33 fc8615b3 [app] [I] Started GET "/notification_recipients" for 10.200.87.144 at 2018-02-13 20:03:33 +0000
2018-02-13 20:03:33 fc8615b3 [app] [I] Processing by NotificationRecipientsController#index as JSON
2018-02-13 20:03:33 fc8615b3 [app] [I] Current user: admin (administrator)
2018-02-13 20:03:33 fc8615b3 [app] [I] Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 0.8ms)

Additionally deleted cookies / usual, to troubleshoot. Still same results.

What is shown if you go to Administer > About and look at the Compute Providers tab?

Think you’d need the foreman-libvirt package installed? If you already have that and have restarted the daemon I guess you could enable debug logging to see if there are errors about it not working?

Saying that, even with all debug logging enabled:

:logging:
  :level: debug

:loggers:
  :ldap:
    :enabled: false
  :app:
    :enabled: true
  :sql:
    :enabled: true
  :permissions:
    :enabled: true

The only relevant query I notice is:
2018-02-14T11:11:33 db9609c1 [sql] [D] ComputeResource Load (0.7ms) SELECT "compute_resources".* FROM "compute_resources" WHERE "compute_resources"."type" IN ('Foreman::Model::EC2', 'Foreman::Model::GCE', 'Foreman::Model::Libvirt', 'Foreman::Model::Ovirt', 'Foreman::Model::Openstack', 'Foreman::Model::Vmware', 'Foreman::Model::Rackspace') ORDER BY compute_resources.name LIMIT 20 OFFSET 0

I would be inclined to reinstall foreman-libvirt and restart the daemons again? Failing that, I don’t know what else to suggest…

I open Administer > About, Compute Resources tab, and all it says is: No compute resource to show

Well, I had originally tried yum reinstall foreman-libvirt and restarted daemon, but that didn’t work.

This time I did:

yum uninstall foreman-compute foreman-libvirt
yum install foreman-compute foreman-libvirt
/etc/init.d/foreman restart

Now at least libvirt and vmware show up as compute resources providers, so we’re good!

Maybe just had to do a full reinstall, strange I’d need to do this out of the box, though.

Thanks for the help, everyone!

1 Like

Note that for a default install, you’ll want to restart httpd since Foreman is a webapp. The service in the package is only for the standalone Webrick server (on port 3000), which doesn’t scale at all - so the installer configures Apache instead.

1 Like

Thank you. This worked for me.
service httpd restart