summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* (#2128) Whitespace only reflow commitJeff McCune2011-06-081-19/+17
| | | | | | | | | | | | The output of puppet --genconfig was showing a blank line between the description of the option and the default value line. This is because of the here document being used in the first commit. This change replaces the HERE document with a normal string that does not contain a final newline. In addition, the indentation of one of the default options was using 4 spaces instead of 2 and this has been corrected.
* (#2128) In-line docs for node_name_{fact,value}Jeff McCune2011-06-081-2/+14
| | | | | | | | | | | | This change augments the in-line documentation for the node_name_fact and node_name_value configuration settings. These settings will not work effectively without additional changes elsewhere in the system, e.g. to auth.conf. In order to help the end user land softly if they choose to change these settings, a short link URL we control and can redirect has been added to each setting. These currently point to the community Wiki but may be redirected to docs.puppetlabs.com in the future.
* (#650) Allow symlinks for configuration directoriesNick Lewis2011-06-071-0/+1
| | | | | | | | | | | | | | | Previously, pointing a setting like 'confdir' at a symlink to a directory would replace the symlink with a directory. This was because files created by settings implicitly managed links, rather than following them. This behavior is now changed so that file settings will follow links. The behavior of these symlinks is the same as any other file resource. That is, if the target of the symlink doesn't exist, Puppet will consider this an error. Similarly, if the target of the symlink is a file, then the symlink will still be replaced with a directory, rather than replacing its target. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com> Reviewed-By: Dominic Maraglia <dominic@puppetlabs.com>
* Merge branch 'ticket/2.6.x/2128' into 2.6.xNick Lewis2011-06-065-19/+37
|\
| * (#2128) Add support for setting node name based on a factNick Lewis2011-06-063-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the node_name_fact setting, which specifies a fact to use to determine the node name. This allows dynamically determining the node name without having to modify puppet.conf or command line options. Using this setting requires modifying auth.conf to allow nodes to request catalogs not matching their certnames. For example, this would allow any authenticated node to retrieve any catalog: # $confdir/auth.conf path ~ /catalog/.+ allow * The node_name_fact and node_name_value options are mutually exclusive, because it is ambiguous which setting should take precedence. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
| * (#2128) Get facts before retrieving catalogNick Lewis2011-06-061-11/+10
| | | | | | | | | | | | | | | | | | | | Retrieving a catalog and getting the facts to submit with the catalog request are distinct operations, and should be done separately. This is also to prepare for adding the ability to determine the node name based on a fact, in which case the node name needs to be determined before it is used for either the catalog or the report. Paired-With: Jacob Helwig <jacob@puppetlabs.com>
| * (#2128) Add the ability to specify a node nameNick Lewis2011-06-065-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | The setting node_name_value may now be used for 'puppet apply' or 'puppet agent' to specify the name for the node. This will not affect the certificate used by the node, and the node will still be authenticated based on its certname. The default value for node_name_value is the certname. This is useful for eg. EC2 nodes whose random hostnames cannot be easily used to classify them. Paired-With: Jacob Helwig
* | Merge branch ↵Ben Hughes2011-06-031-1/+1
|\ \ | |/ |/| | | 'ticket/2.6.x/6885-puppet-agent-fingerprint-requires---verbose-to-return-a-value' into 2.6.x
| * (#6885) puppet agent fingerprint requires --verbose to return a value.Ben Hughes2011-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Always output the fingerprint to STDOUT, no matter what loglevel is used, as that's the whole purpose of the comment. Having to specify --verbose in addition to --fingerprint to get the finger is nonsensical. Update the spec test to stub @puppet puts, instead of the Puppet.logging facilities. Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
* | (#5318) Always notice changes to manifests when compiling.Daniel Pittman2011-05-271-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we are asked to compile a catalog we need to update the set of known resource types, along with the node declaration, from the pool of manifests on disk. This is, obviously, a per-environment pool of resource types. To reduce the scope of the race where an update to those manifest files on disk can be updated during a compilation, we tried to cache the set of known resources in the current thread at the start of compilation, then flush it after compile finished and used the cache unconditionally if it was set. Theoretically, this would assure us that we would parse the set of manifests once, use them for the entire compile, flush the cache, and then carry on. Practically, this was enforced as described: flush *after* the compile, assume this would mean that it was clear at the start of the next compile. That presumably worked more or less right until a change was made to push extra data into the catalog at the start of the 2.6 series; that made serialization of the catalog depend on the pool of known resource types. When that happened we would reload the cache (and reparse the manifests) during serialization, but after compilation ... and leave that in the thread cache, so the precondition for the compiler was no longer true. It would see the cache as of the end of the previous compile run, not the start of the next compile run. This, in turn, was what made Puppet wait for multiple runs of the agent before showing you a change in your manifests under Passenger, but *not* under Webrick: Passenger would reuse the same thread for the next request, cache in place, while Webrick would create a new thread and (by side-effect) "flush" the cache as the compiler expected. To minimally fix this, with as little change of side-effect as possible, we move the cache flush from after compile runs to before compile runs. This might have minimal memory cost until another compile request runs in the same thread, because we cache the data longer, but most models won't cause that to be too much trouble. Reviewed-By: Matt Robinson <matt@puppetlabs.com>
* | (#3836) External nodes should only capture stdoutOliver Hookins2011-05-131-3/+3
| | | | | | | | This patch prevents stdout and stderr from being combined by Puppet::Util.execute, when used by Puppet::Indirector::Exec for external nodes.
* | (#7139) Accept '/' as a valid path in filesetsNick Lewis2011-05-031-1/+1
| | | | | | | | | | | | | | | | This was unconditionally removing the trailing file separator ('/'), which is only valid when the file separator isn't the entire path. This fixes 'puppet resource file <path>'. Paired-With: Jacob Helwig
* | case seems needless here as there is only two opts, also the rest of the ↵ben hengst2011-04-281-2/+1
| | | | | | | | file seems to use if so this should make things more consistant
* | (#6845) Mount writes incorrect vfstab entriesStefan Schulte2011-04-281-1/+1
| | | | | | | | | | Facter[:operatingsystem] will not retrieve the operatingsystem as a string so puppet will always write fstab entries.
* | (#6442) Be able to start agents --listen without namespaceauth.confMatt Robinson2011-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | The namespaceauth.conf isn't being used since we switched from XMLRPC to Rest. There's still a lot of cleanup of the code that deals with authorization from the namespaceauth.conf and XMLRPC in general, but that can be address later. For now just being able to start puppet agent in listen mode without a useless file will be a big win. You still need the auth.conf file though since that is used. Reviewed-by: Max Martin <max@puppetlabs.com>
* | Merge branch 'tickets/2.6.next/3420' into 2.6.nextJosh Cooper2011-04-261-1/+9
|\ \
| * | (#3420) Nagios "name" attribute does not output correctlyJim Pirzyk2011-04-261-1/+9
| | |
* | | Merge branch 'tickets/2.6.next/4487' into 2.6.nextJosh Cooper2011-04-261-0/+7
|\ \ \
| * | | (#4487) When setting environment on a host, ensure it is a string.Josh Cooper2011-04-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change when environment strings were read out of the storeconfigs database, they were eventually converted up to Puppet::Node::Environment objects. When these objects are returned to the storeconfigs database, ActiveRecord dumps them as YAML, which begins the death-spiral of YAML. This change makes it so the host will always store the environment as a string, preventing the Puppet::Node::Environment object from being YAMLized, and stored as such in the database. This change was based on one by Richard Crowley. Paired-with: Jacob Helwig <jacob@puppetlabs.com> Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com> Signed-off-by: Richard Crowley <r@rcrowley.org>
* | | | (#6487) Directoryservice provider will fail in future OS releasesGary Larizza2011-04-221-8/+11
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | This commit removes a case statement in the get_exec_pramble and single_report methods. In its place is an if statement that will cause Puppet to fail if its being run on an OS X system with a version < 10.4. This if-statement will also allow Puppet to run in 10.7. Signed-off-by: Gary Larizza <ccshots@gmail.com>
* | | Maint: Fix a #4655 introduced log inconsistencyJesse Wolfe2011-04-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we moved code from the compiler to parser/resource, we lost a conditional that prevented defined resources from gaining containment edges to stages. Adding a stage to a defined resource was usually harmless, but it violated the invariant of "resources should only have exactly one container as their direct parent", producing a 50% chance of a malformed containment path in log messages. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
* | | Fixed #7166 - Replaced deprecated stomp "send" method with "publish"James Turnbull2011-04-203-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "send" method in the stomp gem has been deprecated since: http://gitorious.org/stomp/mainline/commit/d542a976028cb4c5badcbb69e3383e746721e44c It's been replaced with the "publish" method. Also renamed the send_message method to publish_message more in keeping with language used in queuing.
* | | Merge branch 'tickets/2.6.x/4655-parameterized-classes-default-stages' into ↵Jacob Helwig2011-04-194-15/+27
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2.6.next * tickets/2.6.x/4655-parameterized-classes-default-stages: (#4655) Allow stage to be set using a default class parameter Updated CHANGELOG for 2.6.8rc1
| * | | (#4655) Allow stage to be set using a default class parameterJacob Helwig2011-04-193-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example: stage{ pre: before => Stage[main] } class someclass ($stage=pre ) { ... } class { someclass: } This transplants adding the edge from the resource to the stage from the compiler into when the resource is evaluated. This moves adding the stage edges to after when the defaults are copied into the resources, making them available. Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
| * | | Updated CHANGELOG for 2.6.8rc1Max Martin2011-04-131-1/+1
| | | |
* | | | Merge remote branch 'james/tickets/2.6.x/6681' into 2.6.nextJames Turnbull2011-04-141-0/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | * james/tickets/2.6.x/6681: Fixed #6681 - Remove --force-yes option from aptitude is used
| * | | Fixed #6681 - Remove --force-yes option from aptitude is usedJames Turnbull2011-03-121-0/+1
| |/ /
* | | Merge branch 'ticket/2.6.x/7082' into 2.6.nextNick Lewis2011-04-132-1/+14
|\ \ \
| * | | Fixed #7082 - Added system support for groupsJames Turnbull2011-04-142-1/+14
| | | |
* | | | Merge branch 'tickets/2.6.x/2331-macports-provider' into 2.6.nextNigel Kersten2011-04-132-86/+106
|\ \ \ \
| * | | | (#2331) Remove darwinports pkg provider, replace with rewritten macports ↵Nigel Kersten2011-04-132-86/+106
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | provider * Employs port -q installed, much faster than port list installed * Handles upgrades correctly now * Makes use of internal port revision for ensure => latest upgrades * Versionable, now works with ensure => specified_version * Does not handle port variants at all yet. * Does not allow manual specification of revision, only version * Test coverage expanded using newer syntax Paired-With: Daniel Pittman
* | | | (#7018) Give more context on the service type's assumptions. Wording tweaks.nfagerlund2011-04-111-14/+19
| | | | | | | | | | | | | | | | Refactoring the @doc string for clarity.
* | | | (#7018) explain internals better in service provider documentationBen Hughes2011-04-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add explicit reasoning for hasstatus in the documentation with certain "virtual" services. Just to clear up why notify => Service["something_virtual"] requires hasstatus defining for it to function.
* | | | (#6818) Stop from getting Rails 3 named_scope deprecation warningMatt Robinson2011-04-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want our Rails models in Puppet to work under Rails 2 or 3, but we don't want the deprecation warnings since we can't control what version of Rails the client is running. DEPRECATION WARNING: Base.named_scope has been deprecated, please use Base.scope instead Reviewed-by: Nick Lewis <nick@puppetlabs.com>
* | | | (#6856) Copy dangling symlinks with 'links => manage' File resource.Max Martin2011-04-081-0/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | When copying symlinks with 'links => manage', there is no need to examine the content of the link target, since the link is supposed to be copied as-is. Skip copying this value to the resource from the metadata (source), since the content will be nil in the dangling symlink case. Paired-with: Jacob Helwig
* | | Merge branch '2.6.next' into 2.6.xMax Martin2011-04-0713-22/+90
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.6.next: Fix #4339 - Locally save the last report to $lastrunreport Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yaml Fixed #3127 - removed legacy debug code Fixed #3127 - Fixed gem selection regex (#5437) Invalidate cached TypeCollection when there was an error parsing (#6937) Adjust formatting of recurse's desc (#6937) Document the recurse parameter of File type. (#6893) Document the cron type in the case of specials. (#5670) Don't trigger refresh from a failed resource Fixed #6554 - Missing $haveftool if/else conditional in install.rb breaking Ruby 1.9
| * \ \ Merge commit '647a640fcac281e3a8cda05b92b51c44c93f1d19' into 2.6.nextNick Lewis2011-04-071-1/+3
| |\ \ \
| | * | | (#6893) Document the cron type in the case of specials.Ben Hughes2011-03-311-1/+3
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | Add in a better desc block for "specials" in cron provider, and outline it's limitations. The previous text was purely a placeholder.
| * | | Fix #4339 - Locally save the last report to $lastrunreportBrice Figureau2011-04-054-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the cache terminus system, when --report is on, we are now caching the last report as a yaml file in the $lastrunreport file (which by default is $statedir/last_run_report.yaml). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | | Fix #4339 - Save a last run report summary to $statedir/last_run_summary.yamlBrice Figureau2011-04-054-16/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once a configuration run is done, puppetd will save on the node a yaml summary report roughly akin to: --- time: notify: 0.001025 last_run: 1289561427 schedule: 0.00071 config_retrieval: 0.039518 filebucket: 0.000126 resources: changed: 1 total: 8 out_of_sync: 1 events: total: 1 success: 1 changes: total: 1 This is almost an hash version of the current --summarize output, with the notable exception that the time section includes the last run unix timestamp. The whole idea is to be able to monitor locally if a puppetd does its job. For instance this could be used in a nagios check or to send an SNMP trap. The last_run information might help detect staleness, and this summary can also be used for performance monitoring (ie time section). The resource section can also show the number of failed resources. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * | | Merge branch 'tickets/2.6.x/3127' into 2.6.nextJames Turnbull2011-04-051-1/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * tickets/2.6.x/3127: Fixed #3127 - removed legacy debug code
| | * | | Fixed #3127 - removed legacy debug codeJames Turnbull2011-04-051-1/+0
| | | | |
| * | | | Merge branch 'tickets/2.6.x/3127' into 2.6.nextJames Turnbull2011-04-041-2/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | * tickets/2.6.x/3127: Fixed #3127 - Fixed gem selection regex
| | * | | Fixed #3127 - Fixed gem selection regexJames Turnbull2011-04-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously if the gem json_pure was installed and you requested the gem json then the regex matched too soon and falshly indicated that the json gem was already installed. Also updated to add the --no-ri and no-rdoc options and fix tests.
| * | | | Merge branch 'ticket/2.6.x/5437-report-manifest-errors-on-agent' into 2.6.nextJacob Helwig2011-04-012-1/+7
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * ticket/2.6.x/5437-report-manifest-errors-on-agent: (#5437) Invalidate cached TypeCollection when there was an error parsing
| | * | | | (#5437) Invalidate cached TypeCollection when there was an error parsingJacob Helwig2011-04-012-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The caching of the TypeCollection in Puppet::Node::Environment would cause parse errors to occur (and be reported) only once and never again, until the file had changed on disk. This would also cause empty catalogs to be sent down to the agents further hiding the problem. Now, when a file fails to parse, it will be re-parsed every time on every following compilation, causing the parse error to be reported every time, and preventing sending down empty catalogs to agents. Paired-with: Nick Lewis <nick@puppetlabs.com>
| * | | | | (#6937) Adjust formatting of recurse's descnfagerlund2011-04-011-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevous formatting would result in broken Markdown after the docs were generated, as Markdown does not recognize a two-space tab as a syntactical element. This patch also changes the list of values to a bulleted list instead of a code block.
| * | | | | (#6937) Document the recurse parameter of File type.Ben Hughes2011-04-011-1/+11
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the desc block with information gleaned from #1469 and the code about recurse => remote and other types of recursion. The auto generated documentation was sparse and this is an area that often comes up on the mailing list/IRC.
| * / / / (#5670) Don't trigger refresh from a failed resourceNick Lewis2011-03-301-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resources were triggering their subscribing/notified resources when they failed, which is incorrect. Now, events are only queued if the resource was successful. Paired-With: Max Martin
* | | | (maint) Indentation fixesMarkus Roberts2011-04-062-15/+13
| | | |