Feature #3646
no easy way to pass facts to "puppetmasterd --compile"
| Status: | Closed | Start date: | 04/21/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | plumbing | |||
| Target version: | 2.6.5 | |||
| Affected Puppet version: | Branch: | http://github.com/jhelwig/puppet/tree/tickets/2.6.x/3646-fix-documentation-fix-fix | ||
| Keywords: | ||||
Description
When running “puppetmasterd —compile ${client_fqdn}”, it appears that the catalog is compiled as if no facts about the client are available. Even $hostname and $fqdn are undefined. This can very easily lead to failure to compile the catalog, because most people refer to fact variables in their catalogs.
It would be nice if there was a way of passing a file full of facts on the command line, e.g. “puppetmasterd —compile ${client_fqdn} —factsfile ${file_full_of_facts}”.
It might make sense to default to reading facts from a cache where they might have been saved on a previous run, such as /var/puppet/yaml/facts/${client_fqdn}.yaml.
History
#1
Updated by James Turnbull about 3 years ago
- Category set to plumbing
- Status changed from Unreviewed to Needs Decision
- Assignee set to Luke Kanies
Seems reasonable to me … not sure about the implementation though. Luke?
#2
Updated by Luke Kanies about 3 years ago
- Assignee changed from Luke Kanies to James Turnbull
The server currently assumes that there are facts stored in $vardir/yaml/$node.yaml – i.e., it assumes that you’ve compiled that host’s catalog before.
If you haven’t, then just store the facts there, and it should work fine. It should be pretty easy to write a ruby script that accepts a given node’s facts and stores them there.
#3
Updated by Luke Kanies about 3 years ago
Sorry – assigned this back to James to see if he thought that was a reasonable enough path.
If so, please reject the ticket.
#4
Updated by Alan Barrett about 3 years ago
Luke Kanies wrote:
The server currently assumes that there are facts stored in $vardir/yaml/$node.yaml
Yes, if facts are stored there then they do get used (although I failed to notice that earlier). If this were documented in the same place as the “—compile” option, then it would be good enough to satisfy my original requirement, although a way of passing different facts on the command line might sometimes be useful.
#5
Updated by James Turnbull over 2 years ago
- Status changed from Needs Decision to In Topic Branch Pending Review
- Target version set to 2.6.5
- Branch set to http://github.com/jamtur01/puppet/tree/tickets/2.6.x/3646
#6
Updated by Paul Berry over 2 years ago
- Status changed from In Topic Branch Pending Review to Merged - Pending Release
Available in branch ‘2.6.next’ as commit:1a78484a0d687914c146456f79aad857c5d243a0
#7
Updated by Matt Robinson over 2 years ago
- Status changed from Merged - Pending Release to Closed
#8
Updated by Paul Berry over 2 years ago
- Status changed from Closed to Re-opened
- Affected Puppet version changed from 0.25.4 to 2.6.5rc1
Whoops, the documentation change in commit:1a78484a0d687914c146456f79aad857c5d243a0 looks wrong. It adds documentation for both the “—compile” and “—apply” options to the documentation for “puppet master”. This is incorrect. “—compile” is for “puppet master”, but “—apply” is for “puppet apply”.
#9
Updated by Nigel Kersten over 2 years ago
- Target version changed from 2.6.5 to 109
#10
Updated by James Turnbull over 2 years ago
- Target version changed from 109 to 2.6.5
#11
Updated by James Turnbull over 2 years ago
- Status changed from Re-opened to Ready For Checkin
There’s an updated patch at that branch that fixes this.
#12
Updated by Jacob Helwig over 2 years ago
- Status changed from Ready For Checkin to Merged - Pending Release
- Branch changed from http://github.com/jamtur01/puppet/tree/tickets/2.6.x/3646 to http://github.com/jhelwig/puppet/tree/tickets/2.6.x/3646-fix-documentation-fix-fix
The updated fix wasn’t actually correct, either. The documentation was for puppet apply, not puppet agent. Merged an updated fix into 2.6.x. (commit:664ef670da62f9c3dd83d047dc9e575e9ffbb8a2)
#13
Updated by James Turnbull over 2 years ago
- Status changed from Merged - Pending Release to Closed
- Affected Puppet version deleted (
2.6.5rc1)