Project

General

Profile

Actions

Bug #13834

closed

Hitting build on a host blocked by: "Environment cant be blank"

Added by El Joppa over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Facts
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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
Actions #1

Updated by Dominic Cleal over 8 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.

Actions #2

Updated by El Joppa over 8 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)

Actions #3

Updated by Dominic Cleal over 8 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.

Actions #4

Updated by El Joppa over 8 years ago

Reset the environment field on the hostgroup and saved.
This did the trick, thanks!

Actions #5

Updated by Dominic Cleal over 8 years ago

  • Status changed from Need more information to Resolved

Thanks for confirming.

Actions #6

Updated by Marek Hulán over 8 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.

Actions #7

Updated by The Foreman Bot over 8 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3220 added
Actions #8

Updated by Anonymous over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #9

Updated by Dominic Cleal over 8 years ago

  • Translation missing: en.field_release set to 145
Actions

Also available in: Atom PDF