summaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fixing 2806 Specifying multiple tags fails to apply any of themJesse Wolfe2009-11-132-0/+20
| | | | | | | | | | | | | | | | | | Fix code that was passing an Array of code to a method that was expecting a single tag. Includes Markus's suggestions Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fix #2681 Incorrectly duplicating resourcesRein Henrichs2009-11-131-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that resources whose refs are included in the catalog are skipped to avoid duplication. * Refactor to avoid early bailout on resources that cannot be ensured absent. * Remove check for managed? in generate Checking if a resource is managed is unnecessary when checking for its inclusion in the catalog. * Add test coverage for Puppet::Type::Resources#generate
| * Fixing #2767 invoke-rc.d warningsJesse Wolfe2009-11-121-1/+1
| | | | | | | | | | | | | | | | Errors written to STDERR by Debian's invoke-rc.d are spurious, since we're only using it to query whether a service can be started. I'm adding the --quiet flag to suppress those messages. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fix #2797 - tags are not inherited by recursed file sub childBrice Figureau2009-11-121-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | This problem affects all types that generate sub-resources at evaluation or pre-transaction time. Thus it is fixed in the transaction, where we make sure we assign all parent tags to the generated child resource. A more correct fix would be to make sure we copy the whole context (ie file, line, version, tags). This fix is planned for Rowlf. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Fix #2796 - Fix puppetdoc rdoc selector parsingBrice Figureau2009-11-122-1/+17
| | | | | | | | | | | | | | | | | | This patch fix this bug by adding more to_s methods to ast member so that puppetdoc can just to_s the AST to reconstruct the original puppet code. Of course this is not perfect, but should work most of the time. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Fixing #2631 show_diff sometimes doesn't happenJesse Wolfe2009-11-101-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a code-path in Puppet::Type::File::Content#insync? that was failing to show a diff when the content's source came from a template. I was only able to reproduce one of the two such failures that Malcolm Howe reported, but I think it's likely that they were both caused by this same bug. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Fix #2787 - Storeconfig doesn't store/update node ip and environment anymoreBrice Figureau2009-11-071-1/+20
| | | | | | | | | | | | | | | | | | Since the storeconfig refactoring (ie moving the catalog storeconfig system under the indirector) in 0.25 we lost the capability to store the node ip and node environment name. This patch restores this feature. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Fix for #2670, Puppet silently ignores catalog_formatBruce Williams2009-11-061-0/+11
| | | | | | | | | | | | | | | | | | | | Since "preferred_serialization_format" was introduced, the older "catalog_format" setting (yaml|marshal), when provided, has been silently ignored and the default for "preferred_serialization_format" used. This re-introduces "catalog_format," logs a deprecation notice, and passes on any provided value to "preferred_serialization_format." Signed-off-by: Bruce Williams <bruce@codefluency.com>
| * Fix #2757 & CSR 92 (symlinks in recursively managed dirs)Markus Roberts2009-11-053-1/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fundemental problem was that, despite what the comment said, the early bailout for file content management only applied to directories, not to links. Making links bail out at as well fixed the problem for most users. However, it would still occur for users with mixed ruby version system since there were no to_/from_pson methods for file metadata. So the second (and far larger) part of this patch adds metadata pson support. The testing is unit level only, as there's no pratical way to do the cross-ruby-version acceptance testing and no benifit to doing "integration" testing short of that. Signed-off-by: Markus Roberts <Markus@reductivelabs.com>
| * Fix #2769 - default schedule are not definedBrice Figureau2009-11-051-0/+6
| | | | | | | | | | | | | | It seems we never finalize the catalog, so the various default resources are never created including the default schedules. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Fix for #2772 (webrick test failures)Markus Roberts2009-11-051-2/+2
| | | | | | | | | | | | | | This was my bad. My patch for #2637 broke some test's assumptions and I never went back to update them. Signed-off-by: Markus Roberts <Markus@reality.com>
| * Fixing #2689 - file owner warnings are reducedLuke Kanies2009-10-271-4/+10
| | | | | | | | | | | | | | We now only warn when there's an actual change to make, and we only make one warning per process run. Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixing #2752 - "require" loads "include"Luke Kanies2009-10-261-0/+6
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fixing some recently broken Scope testsLuke Kanies2009-10-261-1/+1
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
| * Fix #2753 - Do not "global allow" plugins/modules mount if some rules have ↵Brice Figureau2009-10-272-2/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | been parsed When fixing #2424, we were adding a global allow (ie allow(*)) to the plugins/modules mount. Unfortunately global allow always win against any other rules that can be defined in fileserver.conf. This patch makes sure we add those global allow entries only if we didn't get any rules from fileserver.conf Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Re-fixed #2750 - Stop disabling the CRL or checking for a disabled CRLJohn A. Barbuto2009-10-272-20/+0
| | | | | | | | | | | | This was deprecated in commit 1cfb0215 and was keeping puppetd from starting in listen mode. Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
| * Bug #2534 Raise error if property appears twiceJesse Wolfe2009-10-271-1/+14
| | | | | | | | | | | | | | This patch changes Puppet::Parser::Resource to check if it has been passed two Puppet::Parser::Resource::Param objects with the same name. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Bug #1908 cron environment should allow empty valsJesse Wolfe2009-10-271-0/+33
| | | | | | | | | | | | Change regexp to allow cron environment => "MAILTO=" Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Bug #1742 Invalid params to --color outputs 'nil'Jesse Wolfe2009-10-261-0/+36
| | | | | | | | | | | | | | | | | | | | | | This patches fixes a bug where setting an invalid option for "--color" caused the word "nil" to be printed on every line of the log, instead of printing out log messages. Invalid color options now just produce uncolored output. It seems to me that this isn't important enough to issue a warning about an invalid setting. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
| * Ticket #2665: Regexp exception on ++ in package namesMarkus Roberts2009-10-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | This affects several providers: dpkg, rug, up2date, urpmi Fixed by escaping the package names with Regexp.escape Patch by Jesse Wolf Signed-off-by: Markus Roberts <Markus@reality.com>
| * Fixed #2750 - Set :cacrl to nil instead of 'false' in puppetdJohn A. Barbuto2009-10-251-1/+9
| | | | | | | | | | | | | | | | The latter is deprecated and was keeping puppetd from starting. Also added a test and fixed a typo in another test. Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
| * Fix #2691 - Collection AR request should not include params if querying with ↵Brice Figureau2009-10-251-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tags f9516d introduced a change in the way the user tags are persisted to the database: user tags are now treated as regular tags (they are stored to the tags table). Thus this commit changed the AR collector request to also look at the tags tables when collecting. Unfortunately this added a performance regression since tag request were still importing the resources parameters tables and AR was issuing a large request which was returning all the resource parameters joined with the tags. This commit fixes the AR request to join to the needed table, instead of doing an include. Including (ie eager loading) parameter values was not working for resource parameters anyway since at least 0.24 because searching by parameter add a constraint to the joins and only the searched parameter was returned instead of all parameter for a given exported resource. So on a performance standpoint this new code should be as fast 0.24 was. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
| * Workaround #2668 - Compress facts so that the request size limit triggers ↵Brice Figureau2009-10-252-3/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | less often This is not the right fix, but more a hackish workaround. Since 0.25, the facts are transmitted as GET parameters when a node asks for a catalog. Most proxies or webserver have a size limit which is sometimes reached. In this case the request is denied and the node can't get its catalog. The idea is to compress facts (some non-scientific studies show a 57% fact size decrease for an average node) when transmitting those when asking for a catalog. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Fixing #2596 - Node, Class, Definition are not ASTLuke Kanies2009-12-0914-804/+736
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit extracts these three classes into a single ResourceType class in the Parser heirarchy, now completely independent of the AST heirarchy. Most of the other changes are just changing the interface to the new class, which is greatly simplified over the previous classes. This opens up the possibility of drastically simplifying a lot of this other code, too -- in particular, replacing the reference to the parser with a reference to the (soon to be renamed) LoadedCode class. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding a context method to the Errors moduleLuke Kanies2009-12-092-1/+39
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Extracting language doc support into a moduleLuke Kanies2009-12-091-0/+32
| | | | | | | | | | | | | | This is so that you can still use docs without AST being the parent class. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Adding module metadataLuke Kanies2009-12-091-0/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a first version that does very little - it has a few fields, and allows speciification of dependencies with other modules as well as compatibility with individual Puppet versions. It's not really sufficient, because it only allows specific versions, rather than a range of versions, but it's a good demo of what it takes and what we provide. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Upgrading rspec for tests to 1.2.9Luke Kanies2009-12-072-1/+2
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fix 2841 - Puppetdoc/RDoc parses realize functionBrice Figureau2009-12-021-0/+30
| | | | | | | | | | | | | | | | Puppetdoc wasn't parsing the realize function. This patch let puppetdoc find realize and display in RDoc html mode the list of realized resource per class or node. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Feature 2827 Option to disable managing internal filesJesse Wolfe2009-11-261-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | Add a flag "manage_internal_file_permissions" which is enabled by default. Disabling this flag prevents Puppet from managing the owner, group, or mode of files created from Puppet::Util::Settings::FileSetting I think this is a wide enough net to follow Luke's suggestion of "disable management of everything", and it certainly satisfies the requests I'm aware of, but if I've missed anything, let me know. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* | Fixed #2568 - Add database option 'dbconnections'Richard Soderberg2009-11-201-0/+22
| | | | | | | | This sets the ActiveRecords connection pool size, when connecting to remote databases (mysql, postgres). default is 0; the 'pool' argument is only passed to ActiveRecords when the value is 1 or greater.
* | Fixing #1507 - Adding a :ca_name settingLuke Kanies2009-11-202-0/+20
| | | | | | | | | | | | | | | | This allows one to specify the name to use in the CA certificate. It defaults to the :certname, but for those stuck using mod_ssl it can be changed. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fixing #2617 - using the searched-for REST nameLuke Kanies2009-11-203-5/+12
| | | | | | | | | | | | | | | | | | This allows a separation between the wrapper class and its internals, which is (at least) necessary for the CA cert, which might not be found using the internal name. Signed-off-by: Luke Kanies <luke@madstop.com>
* | Always using the CA_name constant instead of "ca"Luke Kanies2009-11-203-7/+7
| | | | | | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* | Fix #1934 - detailed-exitcodes for puppetdDeepak Giridharagopal2009-11-193-28/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option only works when --onetime is specified, as it doesn't make much sense to worry about exit codes in the context of a long-running daemon. This required a refactoring of the existing --detailed-exitcodes code, as "puppetd" wasn't directly creating a transaction object (like "puppet" does). Added Report::exit_status, which did what was previously hard-coded into the "puppet" executable. An Agent's "run" method now returns a value (the result of the individual client class' "run" method) The "puppetd" agent's "run" method now returns a transaction report, as that seems like the logical thing to return as the result of applying a catalog. Signed-off-by: Deepak Giridharagopal <deepak@brownman.org>
* | Fix #2649 Allow ssl dir creation in --noop modeRein Henrichs2009-11-192-0/+40
| | | | | | | | | | | | | | | | Wrap Puppet::Settings.use in a block that disables noop mode during the execution of the block and ensures that noop returns to its original value afterwards. This allows internal puppet catalog operations like ssl directory creation to occur even when puppet is run in --noop mode. This should actually solve a broader class of related bugs.
* | Fix #2796 - Fix puppetdoc rdoc selector parsingBrice Figureau2009-11-123-1/+29
| | | | | | | | | | | | | | | | | | This patch fix this bug by adding more to_s methods to ast member so that puppetdoc can just to_s the AST to reconstruct the original puppet code. Of course this is not perfect, but should work most of the time. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Fix #2795 - puppetdoc rdoc reports a better error messageBrice Figureau2009-11-121-3/+21
| | | | | | | | | | | | | | | | | | | | When puppetdoc rdoc dies with an unhandled exception, the error message produced didn't mention the file and line where the parser choked. This patch fixes this by trying to locate on which AST structure the rdoc system failed. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Fix #2784 - puppetdoc/rdoc didn't parse mono-instruction class contentBrice Figureau2009-11-041-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | class klass { include a, b, c } wasn't producing any rdoc documentation. We were thinking code was always embedded in an array which is not the case for mono-instruction code. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | Covers the RDoc Puppet Parser with specsBrice Figureau2009-10-243-0/+656
| | | | | | | | | | | | | | | | This doesn't cover all the code, only the part that interacts with Puppet internals which is what matters when Puppet changes. This patch also contains an integration test. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* | type augeas: add 'incl' and 'lens' parametersDavid Lutterkort2009-10-241-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These parameters allow loading a file anywhere on the filesystem; using them also greatly speeds up processing the resource. * lib/puppet/type/augeas.rb: add 'incl' and 'lens' parameters; change default for 'context' when 'incl' is given. * lib/puppet/provider/augeas/augeas.rb: when 'lens' and 'incl' are given, only load that file * spec/unit/type/augeas.rb: check that constraints on new parameters are enforced This fixes ticket #2694
* | Patch to address feature #2571 to add Oracle support to PuppetAvi Miller2009-10-241-1/+80
|/ | | | | | Adapter requires specifying database, username and password. Signed-off-by: Avi Miller <avi.miller@gmail.com>
* Fix for #2745 fakedata tests not workingMarkus Roberts2009-10-232-8/+8
| | | | | | | | | The old fakedata test facility was not playing nicely with the spec tests; although it looped through all the files failures in any example file after the first were being ignored because of the way fakedataparse was interacting with the before blocks. Signed-off-by: Markus Roberts <Markus@reality.com>
* Fix for #2736, target doesn't work for ssh_authorized_keysMarkus Roberts2009-10-211-51/+28
| | | | | | | | There were a number of problems here (duplicated code, meaningless tests, etc.) but the core was that the last definition of target ignored the provided value if there was also a user specified. Signed-off-by: Markus Roberts <Markus@reality.com>
* Ticket #2734 PSON/JSON not serializing classes of a catalogMarkus Roberts2009-10-191-4/+8
| | | | | | | Now it does, there are tests to prove it, and the related tests for tags and version have been strengthend. Signed-off-by: Markus Roberts <Markus@reality.com>
* Bug #1900 Parsing of quoted $ in stdinJesse Wolfe2009-10-192-2/+8
| | | | | | | | | | | | | | | When code comes in via STDIN or --code , Puppet::Util::Settings interpolates $values in the code, which is probably never the intended behavior. This is the least destructive fix I could think of: have Puppet::Parser::Interpreter ask for the uninterpolated value. More general fixes could be to: a) Add an escape character to Settings's interpolator, and escape STDIN b) Add a mechanism to Settings to mark some values as uninterpolated Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Fixing #2735 - node classes are immed. added to classlistLuke Kanies2009-10-181-0/+10
| | | | | | | | | This commit adds any external node classes to the classlist at compiler initialization, so that at least those classes will be isolated from any ordering issues encountered when testing the contents of the class list during compilation. Signed-off-by: Luke Kanies <luke@madstop.com>
* Bundling of pure ruby json lib as "pson"Markus Roberts2009-10-1713-261/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bundeling and renaming the pure ruby json library to addresses a number of cross version serliaization bugs (#2615, et al). This patch adds a subset of the files from the json_pure gem to lib/puppet/external/pson (renamed to avoid conflicts with rails) so that we will always have a known-good erialization format available. The pure ruby json gem as distibuted defers to the compiled version if it is installed. This is problematic in some circumstances so the files that have been brought over have been modified to always and only use the bundled version. It's a large patch, so here's a breakdown of the change categories: The majority of the lines are only marginally interesting: * The json lib itself (in lib/puppet/external/pson) make up the bulk of the lines. * Renaming of json to pson make up the second largest group. Somewhat more interesting are the following, which can be located by searching the diffs for the indicated strings: * Adjusting tests to reflect the changes * Changing the encoding/decoding behavior so that nested structures (e.g. resources) don't serialize as escaped strings. This should make it much easier to process the results with external tools, if needed. Search for "to_pson" and "to_pson_data_hash" * Cleaning up the envelope/metadata * Now provides a document_type (as opposed to a ruby class name) by using a symple registration scheme instead of constant lookup (search for "document_type") * Added an api_version (search for "api_version") * Added a hash for document metadata (search for "metadata") * Removing the yaml monkeypatch and instead disabling yaml serialization on ruby 1.8.1 in favor of pson (search for "yaml") * Cleaning up the json/rails feature interaction (they're now totally independent) (search for "feature")
* Proposed alternative solution for #2664 (REGEX / DIV lexing)Markus Roberts2009-10-161-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | This is my proposed attack on the lexing problem, with a few minor cleanups to simplify its integration. The strategy: * Anotate tokens with a method "acceptable?" that determines if they can be generated in a given context. Have this default to true. * Give the lexer the notion of a context; initialize it and update it as needed. The present context records the name of the last significant token generated and a start_of_line flag. * When a token is found to match, check if it is acceptable in the present context before generating it. These changes don't result any any change in behaviour but they enable: * Give the REGEX token an acceptable? rule that only permits a regular expression in specific contexts. The other changes were a fix to the scan bug Brice reported, adjusting a test and clearing up some cluttered conditions in the context collection path. Added tests and subsumed change restricting REGEX to one line.
* Fix #2707 config_version fails more helpfullyRein Henrichs2009-10-151-1/+9
| | | | | | Use Puppet::Util.execute to run the config_version command and reraise its potential Puppet::ExecutionFailure exception as a more useful Pupppet::ParseError