Project

General

Profile

Bug #13834

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

Added by Rolf Larsen over 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Facts
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
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

Associated revisions

Revision 6f16c915 (diff)
Added by Marek Hulán over 3 years ago

Fixes #13834 - associate puppet proxies only for puppet imports

Revision 63ee2160 (diff)
Added by Marek Hulán over 3 years ago

Fixes #13834 - associate puppet proxies only for puppet imports

(cherry picked from commit 6f16c9159dad61641908d88eeb62ab45d22bd396)

Revision 51f0e905 (diff)
Added by Marek Hulán over 3 years ago

Fixes #13834 - associate puppet proxies only for puppet imports

(cherry picked from commit 6f16c9159dad61641908d88eeb62ab45d22bd396)

History

#1 Updated by Dominic Cleal over 3 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.

#2 Updated by Rolf Larsen over 3 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)

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

#4 Updated by Rolf Larsen over 3 years ago

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

#5 Updated by Dominic Cleal over 3 years ago

  • Status changed from Need more information to Resolved

Thanks for confirming.

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

#7 Updated by The Foreman Bot over 3 years ago

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

#8 Updated by Anonymous over 3 years ago

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

#9 Updated by Dominic Cleal over 3 years ago

  • Legacy Backlogs Release (now unused) set to 145

Also available in: Atom PDF