Hitting build on a host blocked by: "Environment cant be blank"
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
Fixes #13834 - associate puppet proxies only for puppet imports
(cherry picked from commit 6f16c9159dad61641908d88eeb62ab45d22bd396)
#1 Updated by Dominic Cleal almost 4 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.
#3 Updated by Dominic Cleal almost 4 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.
#6 Updated by Marek Hulán almost 4 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.