Project

General

Profile

Bug #8766

Chef reports do not create host in correct environment

Added by Romain Vrignaud almost 6 years ago. Updated over 5 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
foreman_chef
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

It seems that when Foreman get a chef report from unknown host, it creates the host in the default Foreman environment.
It should instead use the chef environment of the host.


Related issues

Related to Chef - Feature #9843: Provide chef client environment as a factClosed2015-03-19
Related to Chef - Feature #9844: Add own fact parser that will parse all attributes except interfacesClosed2015-03-19

History

#1 Updated by Marek Hulán over 5 years ago

So we should probably first try to sync environments from the Chef and then we can map it in Foreman.

#2 Updated by Marek Hulán over 5 years ago

So I did a bit of research and chef_environment is not a part of attributes. So the only way we can get it into Foreman correctly is by asking Chef, which may be a bit time costly with every fact import. Maybe we could ask only if no environment is set. Romain, any other ideas?

EDIT: obviously environment wouldn't be updated on later change in Chef
EDIT2: I'll check if chef-handler-foreman could add this for us

#3 Updated by Marek Hulán over 5 years ago

  • Related to Feature #9843: Provide chef client environment as a fact added

#4 Updated by Marek Hulán over 5 years ago

  • Category set to foreman_chef
  • Status changed from New to Duplicate

Fixed as a part of more generic #9844, thanks for report.

#5 Updated by Marek Hulán over 5 years ago

  • Related to Feature #9844: Add own fact parser that will parse all attributes except interfaces added

Also available in: Atom PDF