summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Passenger needs HTTP headers values to be stringBrice Figureau2010-08-051-1/+1
| | | | | | | | | When streaming a file through rack, we set the Content-Length header to be the size of the transmitted file. This size is an int, and recent passenger versions only support string values. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* [#4404] Remove requirement for source on Parser::Resource::ParamNick Lewis2010-08-041-1/+1
| | | | | | | | Stage[main] is created without an associated source, to which Parser::Resource::Param objects. This patch observes that the source attribute of both Parser::Resource and Parser::Resource::Param seem not to be used anywhere, and removes the requirement that it be supplied.
* [#4364] Fix failing spec due to incorrect loglevelJesse Wolfe2010-08-041-1/+1
| | | | | A spec was failing since it wasn't updated when the #4364 change was made.
* Fix #4458 - Do not dump the whole environment when instances can't be foundBrice Figureau2010-08-041-1/+1
| | | | | | | | | | | | | | | When generating the error message when we can't find any instances for a search request, we were "inspect"ing the request which now contains an environment instance which itself contains a lots of things (including all the known resource types). Thus it was generating a very large "reason" (ie the HTTP error string). On some environments (ie proxied mongrel) this was too large and the proxy would produce an error 500. I just changed the error message to just log the indirection name and request key (which should be enough to understand what is wrong). Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix for #4465 -- earlier "feature" patch broke ldapMarkus Roberts2010-08-042-69/+27
| | | | | | | | | The patch for #3904 should not have been accepted; it's buggy and the use case (supporting having nodes in ldap more than once with the same name but distinct records) is ill-conceived. This commit reverts the patch (a7884b47) and the previous attempt to fix it (e6709da4), restoring the old (0.25.x) behaviour.
* Maint -- tests need to respect RFC-952Markus Roberts2010-08-041-1/+2
| | | | | | We had a test that assumed hostnames would only consist of letters; by RFC-952 they are also allowed to contain digits and '-'s. The test failed on such machines.
* [#4467] Make Puppet Master respect facts_terminus settingsRein Henrichs2010-08-044-10/+14
| | | | | | | | | * Remove hard-coded facts terminus in master * Change facts_terminus default to 'yaml' for master and 'facter' for everything else. Paired-with: Matt Robinson <matt@puppetlabs.com> Signed-off-by: Rein Henrichs <rein@puppetlabs.com>
* added md5 support as requested in ↵Alice Kærast2010-08-031-0/+5
| | | | http://serverfault.com/questions/166199/puppet-md5-sum-of-string
* [#4381] extlookup shouldn't trigger reparses of .pp filesJesse Wolfe2010-08-031-3/+0
| | | | | | | extlookup was adding its data files to the list of watched source files. This causes the .pp manifests to be re-parsed whenever the .csv files change, which is no longer necessary, as the .csv files are already reparsed on every function call.
* [#4370] Fixes extlookup precedence getting overwritten between runsMatt Robinson2010-08-035-15/+24
| | | | | | | | | | | | | | | We found the gsub! in extlookup was actually modifying the value for extlookup_precedence, so the next node to call it just got the interpolated value from the first run. We did two things in the code to prevent this: 1. We returned a dup of the ast string object so that modifying it wouldn’t change puppet’s state. We didn’t do this for all possible return values because we depend on using the original ast array object to do array concatenation 2. We fixed extlookup to not do a destructive gsub Reviewed by: Jesse Wolfe
* Fixed #4364 - Reduced audit msg from info to debugJames Turnbull2010-08-031-1/+1
|
* [#4347] run_mode was colliding with --mode for "puppet doc"Jesse Wolfe2010-08-032-2/+2
| | | | | | The run_mode value was incorrectly getting stored to Puppet[:mode], which was confusing the optparser for applications that declare a --mode parameter.
* [#4423] repair parameterized class instantiationJesse Wolfe2010-08-034-17/+32
| | | | | | My earlier #4397 patch was not aware of the parameterized class instantiation syntax, and failed on manifests that instantiate parameterized classes.
* [#4423] class { shouldn't get stored on the namespace stackJesse Wolfe2010-08-032-1/+7
| | | | | | | The new syntax for instantiating parameterized classes was confusing the lexer's notion of namespaces. This is a simple fix to prevent that syntax from polluting the namespaces.
* [#4397]+[#4344] Move type-name resolution out of Puppet::Resource into the ↵Jesse Wolfe2010-08-0317-185/+137
| | | | | | | | | | | | | | | | | | AST resources. Move type-name resolution out of Puppet::Resource into the AST resources. Move find_resource_type out of Puppet::Resource into Scope Thus, never pass unqualified type names to Puppet::Resource objects. Thus, Puppet::Resource objects don't need the namespace property, and Puppet::Resource objects never consult the harddrive to look for .pp files that might contain their type definitions, Thus, performance is improved. Also removes the temporary fix for #4257 that caused #4397 (The code was too eager to look for a class in the topscope) Paired-With: Paul Berry <paul@puppetlabs.com> Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* [#4344] Temporary fix to stop agent from importing modulesNick Lewis2010-08-031-0/+4
| | | | | | | Due to type collection madness, agent tries to import modules to resolve resource types. That is wrong, decreases performance, and causes problems. This patch forces agent to not import any files by setting ignoreimport to true.
* [#4344] Fix for failing templates when module name matches file in local dir.Paul Berry2010-08-035-13/+13
| | | | | | | | | When the name of a module matches the name of a file in the local directory, puppet agent would sometimes try to read that file and interpret it as puppet code. This happened because files.rb was unintentionally permitting puppet files without an extension. Fixed by changing the glob pattern to only permit ".pp" and ".rb" extensions.
* [#4336] "reportdir" was in the wrong sectionJesse Wolfe2010-08-031-10/+10
| | | | | | | Correctly revert damage done by c00285c, which incorrectly reverted in a7e4fe8. The result was that "puppet agent" and others were trying to create a reportdir that they don't actually use.
* Fixed #4311 - Typo in defaults.rbJames Turnbull2010-08-031-1/+1
|
* Fix #4461 - attempt to fix another performance issueBrice Figureau2010-08-033-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | During a profiling of a 2.6.1rc1 puppet master, I found that we spend a lot of time and efforts in Puppet::Util::Autoload#module_directories. Since this method is doing a bunch of filesystem access, this process is slow. In fact each time we were evaluating a resource or trying to find if a given resource was a builtin type we ended up scanning the whole module directories for the given environment. This patch attempts to fix this performance issue by caching the module_directories output for the either the time of the compilation or an agent configurer run (since this stuff looks like to be shared for both compilation and catalog evaluation). With this patch, my compilation time for 2k resources went from 5.91s to 3.71s (second run each time to allievate parsing time).. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com> Edited to fix a typo [#4434] Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Fix for #4300 Solaris svc files need new pid filenamesmarkus2010-08-032-2/+2
| | | | | | The conf/solaris/smf/svc-puppetd and svc-puppetmasterd still used puppetd.pid and puppetmasterd.pid for stopping the services in 2.6.0. These are changed to agent.pid and master.pid for 2.6.1.
* [#4284] Fix failing specs run as root due to missing puppet groupNick Lewis2010-08-0311-0/+11
| | | | | | | These specs 'use' some settings which create directories belonging to the 'service' user/group. If the default service group doesn't exist, these fail. This patch explicitly sets the service group to the gid of the process, which is known to be accessible by the user.
* [#4242] Fixed (removed) a broken unit testNick Lewis2010-08-031-22/+0
| | | | | This test ran into a mocha bug, and was stubbing too much anyway. It's being moved to an acceptance test.
* Removed eventual documentation line ... eventually cameJames Turnbull2010-07-301-2/+0
|
* Fixed #4368 - Updated clean stored configs ext script for new config sectionsJames Turnbull2010-07-281-3/+3
|
* Updated version to 2.6.1James Turnbull2010-07-271-1/+1
|
* Updated CHANGELOG for 2.6.1rc1James Turnbull2010-07-271-0/+33
|
* Update Red Hat spec file for 2.6.0Todd Zullinger2010-07-251-2/+8
|
* Feature: puppet-load - a tool to stress-test master compilationBrice Figureau2010-07-251-0/+357
| | | | | | | | | | | | | | | | | | | | | | | | This commit introduce a new executable (ext/puppet-load) which aims to simulate concurrent clients to stress-test load a puppet master. At the end of a run, it produces some statistics. This tool is very lightweight: * it runs under Event Machine (and thus is event-driven) * it doesn't do anything with the received catalog This tool, to run, needs access to: * a certificate/private_key pair from a node known by the master * a fact file like those persisted on the master * obviously a puppet-master running somewhere Refer to the embedded help for options and run examples. TODO: * fetch different nodes catalog * exercise the file server Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #4245 - default insertion of ACL is not thread safeBrice Figureau2010-07-251-3/+6
| | | | | | This can happen under jruby with native threads. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix race condition in rack autoloading of request/responseBrice Figureau2010-07-251-0/+3
| | | | | | | | Ruby autoloader seems to not be thread-safe. Since rack uses it to lazily load the Rack::Request and Rack::Response classes, on jruby it fails if the first compilation is done with multiple concurrent threads. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #4244 - Cached Attributes is not thread safeBrice Figureau2010-07-251-10/+15
| | | | | | | | | | The underlying hash is not protected and thus two threads accessing the cached value at the same time and one expiring the value can result in a race condition. This patch synchronizes the access to the value_cache underlying hash. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* JRuby doesn't implement Process.maxgroupsBrice Figureau2010-07-251-1/+4
| | | | | | So let's not call it :) Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #4349 - Parsing with ignoreimport=true was always loading site.ppMarkus Roberts2010-07-252-0/+9
| | | | | | | | | With the type collection refactoring, when accessing a fresh collection puppet tries to import the site.pp manifest (perfrom_initial_import). In the case of puppetdoc, we are parsing site.pp by ourselves, so we ended parsing it twice, resulting in an "import loop detected" error. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #4348 - Puppet doc single manifest brokenBrice Figureau2010-07-252-1/+14
| | | | | | | | The refactoring of using environment instances instead of strings for initializing the parser, rdoc wasn't updated, thus was unable to initialize the parser. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* extlookup() is a builtinJesse Wolfe2010-07-252-16/+93
| | | | | | This patch promotes extlookup() to being a builtin function. It also adds test and makes some minor tweaks to the code. The behavior of extlookup has been left unchanged.
* [#4333] old optparse doesn't support default_argv=Jesse Wolfe2010-07-252-14/+3
| | | | | optparse hasn't always had the concept of default_argv. Fortunately, we don't really need it.
* Fixed #4326 - Updated SUSE packagingJames Turnbull2010-07-258-73/+186
|
* Fix #4319 - source file url sent to the master is invalidBrice Figureau2010-07-252-2/+2
| | | | | | | | | | | We were sending an incorrect (containing a //) url for sourced file content since the file streaming patches. Depending on the webserver in front of puppet it could fail (for instance nginx+mongrel). This patch fixes the offending // in each sourced file urls. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* vim: highlight default parameters in definition/classesMarc Fournier2010-07-251-1/+1
|
* vim: match collected resources.Marc Fournier2010-07-251-0/+1
|
* vim: added elsifMarc Fournier2010-07-251-1/+1
|
* Fix for 4314 -- Need to allow '-' in class name for refsMarkus Roberts2010-07-251-1/+1
| | | | | | | I almost changed this to correspond to the lexer pattern ([a-z0-9][-\w]*) but that isn't quite right either (it would reintroduce the '::' problem). Another option I considered was [^\[]+, but that has it's own problems. In the end I just made the minimal change, adding '-' to the acceptable characters.
* Fixed #4304 - Changed logging level for auto import messageJames Turnbull2010-07-251-1/+1
|
* Fix for #4303 -- reverting to old escaping in '-stringsMarkus Roberts2010-07-252-5/+7
| | | | | Single quoted used to allow escape on single quotes and pass all other characters through without comment; now the do again.
* Tweak to fix for #4302--dangling ref to known_resource_typesMarkus Roberts2010-07-251-6/+5
| | | | | | | | | | | | | | | | Since we were clearing the thread variable containing the compiler's reference to it's environment's known resource types at the start of each compile the reference remaining at the end of a compilation could never be used and was thus just garbage that we were arbitrarily retaining. This patch moves the clearing of the thread var to the _end_ of compilation so that it's always nil except in the middle of a compile. This raises an interesting question; should the ref just live on the compiler object and we could dispense with the thread-var? It might require things that now only know about the environment to need a ref to the compiler and introduce other thread issues (e.g. we might just end up needing a :current_compiler thread variable, for no net gain in simplicity).
* Fix #4302 - Compilation speed regression compared to 2.6Brice Figureau2010-07-253-8/+52
| | | | | | | | | | | | | | | | | | | | | Each time the compiler was accessing the loaded types, we were checking if the manifests had changed. This incurred a large performance cost compared to 0.25 and introduced race conditions if manifests changed while a thread was in the middle of a compilation. This tentative fix, based on Brice's, makes sure each thread will get access to the same loaded types collection for the durration of a compilation, even if the manifests change. We now only check for changed files at the start of a compilation or if the environment changes, and we maintain a per environment thread lock so that only one thread at a time can be reloading any particular environment (and the need-check is done inside the synchronize block so that only the first will actually load it). As long as the manifests don't change, the threads will share the same collection, so there is only duplication in memory for a brief window surrounding a change. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com> Second-author: Markus Roberts <markus@puppetlabs.com>
* Minimal fix for #4297, with notes for follow-upMarkus Roberts2010-07-251-1/+18
| | | | | | | | | In retrospect it appears that the fix for #4270 was incomplete and somewhat off target. This patch fixes the one demonstrably incorrect part (the namespace) and adds a comment outlining what remains to be done to clean up the code; these additional changes, while needed for maintanability, are inappropriate for a quick turnaround crucial bug fix release such as 2.6.1, at which this patch is targeted.
* Fix #4286 - rename puppetdoc global module <site> to __site__Brice Figureau2010-07-252-6/+8
| | | | | | | | | < and > might be invalid or borderline chars to use for a file name or an url. This patch changes those characters to __. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixed yumrepo type deprecation wanringJames Turnbull2010-07-251-1/+1
| | | | `