Unable to choose Compute Resource to deploy to


Trying to upgrade from version 1.15, we are using a fresh install of 1.19 using latest puppet module, and find that when we Create Host, and choose a Host Group, the Deploy On option is greyed out defaulting to Baremetal

Expected outcome:

In 1.15 we were able to select any Compute Resource we wanted for that given location

Foreman and Proxy versions:

v1.19 for both

Foreman and Proxy plugin versions:

foreman_discovery MaaS Discovery Plugin engine for Foreman alongoldboim, Alon Goldboim, amirfefer, Amit Karsale, Amos Benari, Avi Sharvit, Bryan Kearney, bshuster, Daniel Lobato, Daniel Lobato Garcia, Daniel Lobato García, Danny Smit, David Davis, Dominic Cleal, Eric D. Helms, Ewoud Kohl van Wijngaarden, Frank Wall, Greg Sutcliffe, ChairmanTubeAmp, Ido Kanner, imriz, Imri Zvik, Joseph Mitchell Magen, June Zhang, kgaikwad, Lars Berntzon, ldjebran, Lukas Zapletal, Lukáš Zapletal, Marek Hulan, Marek Hulán, Martin Bačovský, Matt Jarvis, Michael Moll, Nick, odovzhenko, Ohad Levy, Ondrej Prazak, Ori Rabin, orrabin, Partha Aji, Petr Chalupa, Phirince Philip, Rahul Bajaj, Robert Antoni Buj Gelonch, Scubafloyd, Sean O’Keeffe, Sebastian Gräßl, Shimon Shtein, Shlomi Zadok, Stephen Benjamin, Swapnil Abnave, Thomas Gelf, Timo Goebel, Tomas Strych, Tom Caspy, Tomer Brisker, and Yann Cézard 13.0.1
foreman_hooks Plugin engine for Foreman that enables running custom hook scripts on Foreman events Dominic Cleal 0.3.14
foreman_snapshot_management Foreman-plugin to manage snapshots in a vSphere environment. ATIX AG 1.5.0
foreman_templates Engine to synchronise provisioning templates from GitHub Greg Sutcliffe 6.0.3
foreman_vmwareannotations This plug-in copies the host comment to VMWare annotations in The Foreman. Timo Goebel 0.0.1

Other relevant data:

Nothing exceptional in the logs showing a problem or error, normal rendering it seems

Are you able to override this by clicking the ‘x’ next to bare metal?

No, I am not, it becomes greyed out / unselectable, and I can’t X out the

I’ve checked everything from locations, to operating systems, template
associations, subnets, you name it - they all check out, I’ve installed
three different instances just to see if the behavior repeats, and it does
indeed all three times no matter how I slice up the hostgroups and compute

One thing I did notice, is there is a new column in the database for
hostgroups called compute_resource_id, which by default is Null, this
doesn’t exist in 1.15 I’m wondering if there’s some tie-in somewhere I’m

Compute resource can be now selected on hostgroup level. Does that work for you in HG form? If you don’t see any CRs there, it might be something with orgs/locs or permissions.

No it works fine if I select a compute resource inside the hostgroup itself.

However, this really messes things up for us, as we need to be able to select different compute resources during deployment like we did before, especially with Foreman hammer-cli - you were able to pick a hostgroup and a target compute resource to deploy to. Now that section is just plain greyed out, whether we select a compute resource inside the hostgroup or not.

Just confirming steps as this is my fourth reproduction:


  • location
  • installation medium
  • operating system
  • set associations for provisioning templates and partition tables
  • domain
  • subnet
  • smart proxy and associations

Add a couple of compute resources
Set up the same compute profile name for these compute resources

Add a new hostgroup root name “mysite”, all blank.

Add another hostgroup named “myhostgroup” and use “mysite” as the parent:

  • Set Compute Profile to the aforementioned one
  • Leave environment and “deploy to” blank - Note: Immediately “deploy to” becomes “Inherited (BareMetal)”
  • Set up Operating System, and everything else

In the UI, click Hosts -> Create Host:

  • Put any name
  • Select location
  • Select hostgroup - Note: “Deploy On” now says “BareMetal” and is greyed out / not selectable or removable.

That’s it…

Also, for the record, we are using the following Puppet modules to build:

mod 'theforeman/foreman', '9.2.0'
mod 'theforeman/foreman_proxy', '8.0.2'
mod 'theforeman/tftp', '4.2.1'

Just a note: Behavior appears the same if you do this with a root hostgroup instead of a child.

Anyone else have any ideas? I’m about to abort QA on this upgrade and just try 1.18 instead.

Looks like this behavior is happening similarly in 1.17.4 and 1.18.2.

For 1.17.4 it says Baremetal in the create host menu, but it’s actually able to be pulled down, except no compute resources get listed.

For 1.18.2 the same behavior as 1.19 above is happening.

I’m starting to suspect the newer packages have this problem, because with 1.17.0 this behaviour was not happening only a handful of months ago with the same exact Puppet Forge module versions.

If that’s the case though, how is it possible no one else complained?

So I don’t think this is Foreman itself, I tried rewinding many packages back to 1.17.1 and it still has the same behavior. I’m suspecting a rubygem or something was updated in the past couple of months and broke things.

Just verifying, comparing an older VM running 1.17.1 from a few months ago, this issue doesn’t exist. If you need me to do some kind of package comparison or something on it let me know.

Tried the following latest Puppet Forge modules, same behavior:

mod ‘theforeman-foreman’, ‘10.0.0’
mod ‘theforeman-foreman_proxy’, ‘9.0.0’
mod ‘theforeman-tftp’, ‘4.3.0’

We used Foreman from 1.17. to 1.19. with VMware Compute Ressources and were able to reproduce this behaviour. Using Foreman 1.17.1 it works, so the change happened between 1.17.1 and 1.17.4 it seems.

This doesn’t sounds like a packaging or (system) config issue but rather in taxonomies. You mentioned location so can you verify all resources for the host allow the location? Is the compute resources also set to the correct location?

Thanks for the help, I think we found a workaround/fix!

First, just to go over the things I checked in the UI:

  • set up of location (taxonomies)
  • compute resources have proper location set
  • compute profile is set up and associated properly with compute resources (nothing to associate by location really)
  • hostgroup root is set with proper location
  • hostgroup child is set with proper root and proper location
  • hostgroup root “deploy on” is default (blank)
  • hostgroup child “deploy on” is default (inherit - baremetal)
  • domain location is set
  • subnet location is set
  • architectures has no location tab
  • installation media has all locations set by default, unable to edit this
  • operating systems:
    • has no location tab
    • partition table set
    • installation media set
    • provisioning template set, and has proper location association

So, like this, for whatever reason the Create Host “Deploy on” is always Baremetal, and something else: I click “Inherit” for “Deploy on” in 1.19 and 1.18 (not there in 1.17) and it can actually be pulled down, but the only choice is “Bare metal”.

The workaround we discovered, if it’s a workaround, is:

  • Click locations on top -> manage locations
  • There’s a button in the top right for “Report Mismatches”, clicking this actually reports problems despite the UI showing locations set properly everywhere
  • There’s another button on the report to “Fix Mismatches” - this solves the problem right away in 1.17.4, all compute resources are available in “Deploy to” under Create Host.
  • For 1.19 and 1.18 we have to click the “Inherit” button first on “Deploy to” for Create Host, before we can actually see and select the Compute Resources.

While this fixes our problem, I’m a little concerned if we add more stuff we have to click this fix mismatched locations every time…