Bug #13834
closedHitting build on a host blocked by: "Environment cant be blank"
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
Updated by Dominic Cleal almost 9 years ago
- 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.
Updated by El Joppa almost 9 years ago
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)
Updated by Dominic Cleal almost 9 years ago
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.
Updated by El Joppa almost 9 years ago
Reset the environment field on the hostgroup and saved.
This did the trick, thanks!
Updated by Dominic Cleal almost 9 years ago
- Status changed from Need more information to Resolved
Thanks for confirming.
Updated by Marek Hulán almost 9 years ago
- 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.
Updated by The Foreman Bot almost 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3220 added
Updated by Anonymous almost 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 6f16c9159dad61641908d88eeb62ab45d22bd396.
Updated by Dominic Cleal almost 9 years ago
- Translation missing: en.field_release set to 145