summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
| | | | `
* Temporary tweak to tests for #4242Markus Roberts2010-07-251-0/+5
| | | | | | | The tests introduced with the fix for #4242 have isolation issues apparently due to the creation of a stage resource which is global and persistent. This patch stubs the creation, marks the one test which is thus invalidated pending, and adds comments noting the problem.
* [#4242] Fixed recursion due to parents including their childrenNick Lewis2010-07-252-2/+51
| | | | | | | | | | | | | | | Resources mark themselves as evaluated to prevent being evaluated again. Unfortunately, they were not marking themselves until after they had finished being completely evaluated. Thus, there was nothing actually stopping recursive evaluations. This patch just makes resources mark themselves as evaluated when they start evaluating, and adds tests. The original setting of evaluated was done in an ensure block, so this doesn't change the behavior of a resource which fails to evaluate. The only places evaluated? is checked aren't affected by this change, as they wouldn't want to evaluate it when it's already being evaluated anyway.
* Fix for #3382 -- Empty classes as graph placeholdersMarkus Roberts2010-07-243-7/+23
| | | | | | | | | | As Brice discovered, the problem was that we simply ignored empty classes in the graph when determining application order. This patch instead replaces them with a resource of a new type which we've frequently noted the (internal) need for: a whit, the smallest possible resource, which has no properties or other semantics apart from its existence and its name. This resource then ensures application order through the normal mechanisms.
* Fixed example config.ruJames Turnbull2010-07-211-3/+2
|
* Fixed network and indirection referenceJames Turnbull2010-07-202-0/+3
|
* Fixed Indirection referenceJames Turnbull2010-07-201-1/+1
|
* Updated CHANGELOG for 2.6.0James Turnbull2010-07-201-0/+11
|
* Fixing #4268 - manifests always importedLuke Kanies2010-07-194-38/+26
| | | | | | | | | | | | | | The problem is that the environment list gets cleared when Settings#set_value is called, and it was being called every time Settings#use was called, which is more often than obvious but especially if reporting is enabled. Previously we ignored noop when running inside of Settings, and this essentially adds that back in, so we can remove the special noop behaviour in Settings itself. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* [#4269] Undef variables interpolate to empty stringNick Lewis2010-07-192-1/+32
| | | | | This fixes double-quoted strings to interpolate undef variables as an empty string. This is the behavior present in 0.25.x.
* [#4270] Force inherited classes to load into the correct environmentJesse Wolfe2010-07-196-13/+43
| | | | | | | | | Parent classes were getting searched for in a way that fails if they were not already loaded into an environment. This patch replaces that codepath with a call that will load them if they are needed. This bug was masked by another bug that loads all classes into "production", whether they are used there or not.
* [#4287] Fix the undefined evaluate_match error when comparing functionsMatt Robinson2010-07-194-71/+84
| | | | | | | | | | | | | | Ticket #4238 introduced a problem that a function couldn't compare to another value until after it was evaluated, and AST::Function didn't have the evaluate_match method. This change moves that method from AST::Leaf to AST. The special casing necessary for doing comparisons between AST objects feels messy and could probably be encapsulated better. I've created ticket #4291 to remind us to refactor this at some point. Paired with: Nick Lewis Signed-off-by: Matt Robinson <matt@puppetlabs.com>
* Tweak to tweak to fix for #4233 -- ":" is valid in type namesMarkus Roberts2010-07-191-1/+1
| | | | | The tweak to the fix for #4233 was too narrow, and precluded the possibility that a type name would contain colons e.g. (MySQL::User)
* Bandaid for #4285 -- :name vs <namevar>Markus Roberts2010-07-191-1/+5
| | | | | | | We sometimes refer to the namevar as its name and sometimes as :name; there is no consistant pattern in the code for when this is done one way or the other. This problem was exposed by the composite namevar refactor; the present patch adjusts the crucial routine to work with either.
* Tweak to fix for #4233 -- only accept word chars in typesMarkus Roberts2010-07-191-1/+1
| | | | | | | With the title carrying semantic information it may contain arbitrary chars; when parsing a ref we only want word chars in the type (up to the first open square bracket) and everything else, enclosed in "[" / "]" to the end of the string, is the title.
* Updated CHANGELOG for 2.6.0RC4James Turnbull2010-07-191-0/+18
|
* [#4233] Ruby regexps are not multiline by default, but Resource titles can ↵Jesse Wolfe2010-07-186-3/+47
| | | | | | | | be multiline Puppet allows resource titles to contain newlines. We recently introduced several regexps that were failing on resources with multiline titles.
* Fix for #4234 -- ruby DSL fails on second resourceMarkus Roberts2010-07-181-1/+1
| | | | | | The loop detection mechanism isn't great (it should, for example, allow nesting if the signatures differ) but the key problem was that the ensure was simply backwards.
* Fix for #4236 -- Only interpolate $ if followed by a variableMarkus Roberts2010-07-182-8/+16
| | | | | | | | | | | | | | | | | | This is a modification of the Nick/Jesse/Matt patch, retaining their tests and the analysis of the problem but reversing the implementation direction of the solution. Rather than trying to make the already somewhat brittle slurpstring smarter, which requires telling it what following strings will be accepted by the caller with a zero-width-lookahead negation of the regular expression used to extract a variable name, this patch keeps that responsibility in the caller where it belongs. The caller (tokenize_interpolated_string) now checks to see if it got a variable name _before_ emitting a variable token; if it got one, it proceeds normally, but if it didn't it simply tries again from that point in the string (accumulating the false match as a prefix). This change actually simplifies the logic of tokenize_interpolated_string somewhat.
* Fix #4238 - if should match undef as ''Brice Figureau2010-07-184-32/+79
| | | | | | | | | | | | | | The comparisons operator (and more particularly == and !=) were not treating the undef value as '', like case and selector did since #2818. This patch makes sure comparison operator uses AST leaf matching. Unfortunately, doing this introduces a behavior change compared to the previous versions: Numbers embedded in strings will now be matched as numbers in case and selector statements instead of string matching. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Minimal fix for #4243 -- import isn't thread safeMarkus Roberts2010-07-183-29/+27
| | | | | | | | The import function was calling type_loader#import directly so that it could pass in the current file name, but by doing so it was thwarting the thread- safety locking level. This patch rearanges things so that all imports go through the same (thread safe) code path while retaining the current_file passing, error handling, etc. from the old structure.
* [#4247] storeconfigs was calling Puppet::Parser::Resource.new with the wrong ↵Jesse Wolfe2010-07-184-3/+28
| | | | | | | | | | | | | arguments When the interface to Puppet::Resource changed, its subclass Puppet::Parser::Resource was also affected. One case of initializing those objects did not get updated when the code changed, causing storeconfigs to break. Also, this patch adds a error message that would have made it easier to catch this problem (as puppet could consume all memory and die trying to print the old error message)
* [#4256] External nodes parameters can now be assigned to nodesMatt Robinson2010-07-182-6/+7
| | | | | | | | | | | | | | | | | | Node parameters were made a reader instead of an accessor in commit b82b4ef04282ca0006931562f60459a1591b6268 Author: Luke Kanies <luke@reductivelabs.com> Date: Wed Jan 6 17:42:42 2010 -0800 All non-transient parser references are gone but external nodes needs to be able to assign to parameters. The fix is just to change that back to an accessor. There may have been concern over nodes replacing the hash object instead of the values could have bad consequences, but that's not a concern since the node object being created in this case is new also. Paired with: Nick Lewis
* Fix for #4257 -- problems resolving ::-prefixed classesMarkus Roberts2010-07-181-5/+1
| | | | | | While find_fully_qualified expects (and gets) fully qualified class names it does not always get absolute names (with the ::-prefix); test in the global scope refers to the same thing as ::test.
* Fix #4262 - Puppetmaster used to log compilation timeBrice Figureau2010-07-182-2/+12
| | | | | | | It looks like a merge went wrong and we were returning abruptely from a benchmark block, thus jumping over a precious log information. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>