Bug #13834
closed
Hitting build on a host blocked by: "Environment cant be blank"
Added by El Joppa almost 9 years ago.
Updated over 6 years ago.
Description
Foreman 1.10.1
Debian jessie
Salt master, salv environment set.
(libvirt compute resource provisioning)
2016-02-22T14:23:42 [app] [I] Started PUT "/hosts/test-templates1.X.no/setBuild?auth_object=test-templates1.X.no&permission=build_hosts" for X.X.X.X at 2016-02-22 14:23:42 +0100
2016-02-22T14:23:42 [app] [I] Fetching DHCP reservation for test-templates1.x.no-52:54:00:ab:74:12/195.x.x.x
2016-02-22T14:23:42 [app] [I] Failed to save: Environment can't be blank
- Category set to Puppet integration
- Status changed from New to Need more information
I don't know that this is related to Salt environments, it would probably say that specifically if that was the case.
Please check if the host has a Puppet proxy assigned on the first tab of the host edit, towards the bottom. Else check via the API or database for puppet_proxy_id. If it has a Puppet proxy set, it requires an environment too when you create the host.
in edit:
No Environment
No Puppet CA
No Puppet Master
Salt Master set
Salt Environment set
YAML:
parameters, puppetmaster set to salt master hostname (That smartproxy doesnt have Puppet features in smart_proxies view)
If puppetmaster's showing up in the YAML then it's set, and that's why you're getting the environment requirement. I suspect the Puppet master dropdown field is blank because the feature's missing (#7371) but it is actually set. Saving the host might reset/empty it.
Might be worth editing and resaving any host groups you're using that might have the Puppet master set in case they had it from a time when the Puppet feature was set.
Reset the environment field on the hostgroup and saved.
This did the trick, thanks!
- Status changed from Need more information to Resolved
- Category changed from Puppet integration to Facts
- Status changed from Resolved to Assigned
- Assignee set to Marek Hulán
The issue is that we try to set puppet proxy even if the import is not of puppet type. While clearing the environment fixed the problem, it didn't fix the cause.
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3220 added
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Translation missing: en.field_release set to 145
Also available in: Atom
PDF