summaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
...
* Feature #2935 settings are in Mode sections instead of executable namesJesse Wolfe2010-02-171-9/+7
| | | | | | | A process's settings are now determined by Puppet::Mode rather than by the executable name. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Feature #2935 Modes: root? predicateJesse Wolfe2010-02-173-4/+4
| | | | | | | Use a predicate method to check if we're running as root, rather than comparing the effective user id Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Feature #2935 Puppet::Mode#master?Jesse Wolfe2010-02-175-20/+20
| | | | | | | Use a predicate function on the Mode object instead of comparing with the executable name everywhere Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* feature #2276 Single Executable: use new names for settings sectionsJesse Wolfe2010-02-173-4/+4
| | | | | | | | The puppet-internal settings sections aren't actually exposed to the user, but to reduce confusion I've renamed them to be consistent with the single-executable application names. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Feature #2935: lazify require graph for applicationsJesse Wolfe2010-02-172-3/+7
| | | | | | | | | Because environments have to declare their mode before puppet tries to load defaults.rb, it reduces the complexity considerably to have application classes to load their lib dependencies at the last possible moment. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* feature #2276 Single Executable: move CommandLine methodsJesse Wolfe2010-02-171-56/+29
| | | | | | | move Util::CommandLine methods into instances instead of on the class, as suggested by Markus Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Fixing #2658 - adding backward compatibility for 0.24Luke Kanies2010-02-173-20/+45
| | | | | | | | | | | | | The way stages were implemented caused backward compatibility to be completely broken for 0.24.x. This commit fixes that, mostly by assuming Stage[main] will be the top node in the graph rather than Class[main]. Other stages are not supported in 0.24.x, and explicitly throw a warning (although not an error). Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Adding #2658 - Adding support for run stagesLuke Kanies2010-02-175-46/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to specify a run stage for either a class or a resource. By default, all classes get directly added to the 'main' stage. You can create new stages as resources: stage { [pre, post]: } To order stages, use standard relationships: stage { pre: before => Stage[main] } Or use the new relationship syntax: stage { pre: } -> Stage[main] -> stage { post: } Then use the new class parameters to specify a stage: class { foo: stage => pre } If you set a stage on an individual resource, it will fail; stages can only be set on class resources. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing #3671 - --compile Catalogs are pretty-printedLuke Kanies2010-02-171-4/+7
| | | | | | | | A simple fix for this one. This doesn't fix the general case, just the --compile case. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing #2655 - Adding default parameter values to resourcesLuke Kanies2010-02-171-0/+8
| | | | | | | | We were previously just adding these values as variables in the local scope, but we now add them to the resources so they get passed to the client in the catalog and are thus inspectable. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Refactoring tests - replacing stubs with instancesLuke Kanies2010-02-171-27/+17
| | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing Catalog conversionLuke Kanies2010-02-171-0/+8
| | | | | | | | | | | Parser resources were not correctly being converted to Puppet::Resource instances, which meant a ton more information was being kept in the catalog. This probably didn't have much affect in real life, because of how we serialized, but it made debugging a lot harder. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing #1903 - metaparam inheritance is much fasterLuke Kanies2010-02-172-58/+90
| | | | | | | | | | | | This doesn't actually fix the specific request in #1903, which said there should be no inheritance at all, but I've changed my mind on that. Static inheritance is good, it should just be faster. This change could result in up to 70% speed improvements in compiling. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixing Parser::Resource param validationLuke Kanies2010-02-171-0/+5
| | | | | | It was previously not allowing false values. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fixes #1999 - Allows the 'apt' provider to downgrade packages.Paul Lathrop2010-02-171-0/+7
| | | | | | | This is accomplished by adding the --force-yes option to the apt-get command line when a package version is specified. Signed-off-by: Paul Lathrop <plathrop@digg.com>
* Fixes #3745 Catch unhandled exception in ssh_authorized_key providerSean Millichamp2010-02-171-0/+12
| | | | | | | | | | | If the target is not specified it is automatically set to the user's home directory. If the user does not exist when the generation of the target path occurs then an ArgumentError exception is raised but not caught. This patch catches the ArgumentError and raises a Puppet::Error instead to more gracefully notify the user and allow any remaining resources to be applied. Signed-off-by: Sean Millichamp <sean@bruenor.org>
* Fixing tests broken by conceptual merge conflictsMarkus Roberts2010-02-172-3/+3
| | | | | A minor api change and an even less significant variable name change in earlier commits broke two test.
* Fixes #3663 - It should be possible to list signed hosts onlyJames Turnbull2010-02-172-0/+15
| | | | Adds a --signed option to the --list feature that only displays signed certificates
* Fixing #448 - relationships have their own syntaxLuke Kanies2010-02-175-1/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can now specify relationships directly in the language: File[/foo] -> Service[bar] Specifies a normal dependency while: File[/foo] ~> Service[bar] Specifies a subscription. You can also do relationship chaining, specifying multiple relationships on a single line: File[/foo] -> Package[baz] -> Service[bar] Note that while it's confusing, you don't have to have all of the arrows be the same direction: File[/foo] -> Service[bar] <~ Package[baz] This can provide some succinctness at the cost of readability. You can also specify full resources, rather than just resource refs: file { "/foo": ensure => present } -> package { bar: ensure => installed } But wait! There's more! You can also specify a subscription on either side of the relationship marker: yumrepo { foo: .... } package { bar: provider => yum, ... } Yumrepo <| |> -> Package <| provider == yum |> This, finally, provides easy many to many relationships in Puppet, but it also opens the door to massive dependency cycles. This last feature is a very powerful stick, and you can considerably hurt yourself with it. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fix #3408 - enable puppetd http compressionBrice Figureau2010-02-175-1/+288
| | | | | | | | | | | | | | | | | | | | | | | This patch adds HTTP response decompression (both gzip and deflate streams). This feature is disabled by default, and enabled with --http_compression. This feature can be activated only if the local ruby version supports the zlib ruby extension. HTTP response decompression is active for all REST communications and file sourcing. To enable http compression on the server side, it is needed to use a reverse proxy like Apache or Nginx with adhoc configuration: Nginx: gzip on; gzip_types text/pson text/json text/marshall text/yaml application/x-raw text/plain; Apache: LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so AddOutputFilterByType DEFLATE text/plain text/pson text/json text/marshall text/yaml application/x-raw Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #3373 - Client side file streamingBrice Figureau2010-02-176-63/+264
| | | | | | | | | | This patch moves file content writing to the content properties and always write (or read) contents by chunks. This reduces drastically puppetd memory consumption when handling large sourced files. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Add master side file content streamingBrice Figureau2010-02-174-3/+101
| | | | | | | | | This patch allows the puppetmaster to serve file chunks by chunks without ever reading the file content in RAM. This allows serving large files directly with the master without impacting the master memory footprint. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fixing tests broken by Luke's CRL flag patch.Markus Roberts2010-02-171-0/+1
|
* WIP - trying to fix #3460Luke Kanies2010-02-171-0/+4
| | | | | | | | Signed-off-by: Luke Kanies <luke@puppetlabs.com> Conflicts: lib/puppet/ssl/host.rb
* Change the main spec to an apply specMarkus Roberts2010-02-171-3/+3
| | | | This appears to have been left out of the preceeding commit sequence.
* feature #2276 Single Executable: optparser should get CommandLine#args ↵Jesse Wolfe2010-02-173-32/+45
| | | | | | instead of ARGV Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Feature #2276 Single Executable: Pass a commandline object to the applicationJesse Wolfe2010-02-175-17/+18
| | | | | | Refactor so that the command line options only get parsed once Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Refactor #3706 Reify eigenclasses of ApplicationsJesse Wolfe2010-02-1711-244/+209
| | | | | | | | | | The Puppet::Application DSL is complicated by the fact that it operates on eigenclasses of instances of Puppet::Application, rather than subclassing it. This patch reifies the eigenclasses as subclasses of Puppet::Application. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* feature #2276 Single Executable: CommandLine can be instantiatedJesse Wolfe2010-02-171-0/+17
| | | | | | refactor CommandLine to be an object Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* feature #2276 Single Executable: subcommand methodJesse Wolfe2010-02-177-68/+57
| | | | | | Extract the logic to determine the subcommand name into a method. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* feature #2276 Single Executable: help for applyJesse Wolfe2010-02-171-0/+8
| | | | | | restore the help text for the apply command Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* feature #2276 Single Executable: "puppet describe"Jesse Wolfe2010-02-171-21/+21
| | | | | | Add "puppet describe" as the new invocation of "pi" Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* feature #2276 Single Executable: "puppet kick"Jesse Wolfe2010-02-171-84/+85
| | | | | | Add "puppet kick" as the new invocation of "puppetrun" Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* feature #2276 Single Executable: "puppet cert"Jesse Wolfe2010-02-171-33/+33
| | | | | | Add "puppet cert" as the new invocation of "puppetca" Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* feature #2276 Single Executable: "puppet master"Jesse Wolfe2010-02-171-80/+80
| | | | | | Add "puppet master" as the new invocation of "puppetmasterd" Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Fix #3552 single executable should display usageJesse Wolfe2010-02-172-85/+86
| | | | | | | | | Added some tests to make the single executable command behavior explicit. Added logic to display the usage message if we're on a tty and no arguments are passed. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Fix for #3690 failing to calculate error codesJesse Wolfe2010-02-173-3/+28
| | | | | | | | | | | | | | | | | | | | | This failure was getting caused by what I believe to be a bug in Puppet::Configurer where it always generated a new Puppet::Transaction::Report, even if one existed in an outer scope. In puppetd --test, a different Report was getting queried to generate the exit status than the one that was passed to the transaction -- this Report had no Metrics and would fail when queried. This obscured a second bug that Metrics could return nil for values if the Transaction had applied an empty Catalog, but Transaction::Report assumes that values will always be integers. It could be argued that an empty Report should be populated with empty Metrics before a Transaction is run, which would have prevented Report#exit_status from raising an exception ... which would have made these bugs much harder to track down. So, I've decided to leave that unchanged. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Fixing #3668 - fixed autoloading classes from modulesLuke Kanies2010-02-174-80/+351
| | | | | | | | | | | This involved essentially moving all of the importing and loading code out of the Parser and into a new 'TypeLoader' class. The parser and the ResourceTypeCollection classes now delegate to that class for all file handling. Most of the code paths are also now much cleaner, and a bit of redundancy was removed. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fix #3656 JSON serialization of dependenciesJesse Wolfe2010-02-171-0/+7
| | | | | | | | | | | | | | | | | | | | The pson serialization of resources was behaving incorrectly on parameters that are references to other resources: 1. Dependency parameters (require, subscribe, notify) were getting serialized as anonymous objects that looked like partially constructed resources 2. During de-serialization the pson parser would inflate them into hashes (rather than into resources) 3. The outer resource would try to coerce the hash into a resource by passing it to Resource.new 4. Resource.new would fail with a cryptic message, since it does not accept a hash as its first parameter (but the error is obfuscated by Resource.new's complicated argument handler) This patch solves the problem by explicitly converting dependency parameters into strings in the pson serialization. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Fixes #3582 - Adds dbport configuration option for specifying database portJames Turnbull2010-02-171-5/+14
|
* Adding indirector support to Resource TypesLuke Kanies2010-02-173-0/+131
| | | | | | | | | | Also adding JSON support. This is so that we can remotely retrieve information about resource types and classes, such as what arguments are required. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fix #3552 single executable should display usageJesse Wolfe2010-02-171-0/+70
| | | | | | | | | Added some tests to make the single executable command behavior explicit. Added logic to display the usage message if we're on a tty and no arguments are passed. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
* Added support for flat packages in the pkgdmg package provider.Roy Nielsen2010-02-171-5/+16
| | | | | | | | | | | | | | Added a test in: ./spec/unit/provider/package/pkgdmg.rb To test flat package support. The case where a package is a .pkg bundle, curl will attempt to download and not work. The "installer" command will then fail, as the source will be "not found" and the resource will fail. The puppet run will continue. Signed-off-by: Roy Nielsen <rsn@lanl.gov>
* Fixing #2864 Added support for AIX System Resource Controller (SRC) - ↵Andrew Forgue2010-02-171-0/+97
| | | | | | | | | | | | | service start stop This provider supports start/stop and restart of AIX services using the native AIX service manager, called the System Resource Controller. Currently it will not stop and start (but only refresh) a service that uses sockets or message queues as its communication method. It will run stopsrc and then startsrc for services that use signals as their communication method. Signed-off-by: Andrew Forgue <andrew.forgue@gmail.com>
* Fixes #2836. Add hold support to dpkg providerNigel Kersten2010-02-171-2/+53
|
* Fixes #1223 Add Zypper support for SuSE machinesRein Henrichs2010-02-171-0/+81
| | | | | | | | | | | | | | | | | | | Zypper is the replacement for `rug' from earlier SuSE releases. Zypper is backward compatible with the rug command (mostly) and supports most of the same commands that rug does. This version fixes a number of bugs in the original: * when installing with a specified version, fix bug where the package name was being doubled ("foo" became "foofoo"). * fix bug where package name and version were separated by a "=" when it should have been a "-". * Update specs to reflect the implementation's use of the "-l" flag as recommended in http://groups.google.com/group/puppet-dev/msg/d86416c079bd3faf Signed-off-by: Rein Henrichs <reinh@reinh.com>
* Fix for #3399 zone type should handle exclusive IP stacksRein Henrichs2010-02-172-11/+67
| | | | | | | | | | * corrected missing status * added cloning and support for default router * RH: Fix spec to return accurate value for @resource[:clone] * RH: Add spec for untested install case when @resource[:clone] returns a (non-falsy) value Signed-off-by: Rein Henrichs <rein@puppetlabs.com>
* Adding #3518 - basic dot format supportLuke Kanies2010-02-171-0/+10
| | | | | | | This allows you to ask for a node's catalog in dot format, for inputting into graphviz et al. Signed-off-by: Luke Kanies <luke@reductivelabs.com>
* Fixing #3533 - Removing all transaction cleanupLuke Kanies2010-02-171-37/+0
| | | | | | | | | | It's really slow and has no actual functionality any more, since we just remove the catalogs from memory anyway. This should be a good speed boost for very little effort. Signed-off-by: Luke Kanies <luke@puppetlabs.com>
* Fix for #2910 -- Tidy/matches is too tricky to useMarkus Roberts2010-02-171-1/+24
| | | | | | | | | | | | | The semantic interaction of tidy/matches and tidy/recurse is tricky to get right; it only makes sense to use matches with recursion (a fixed path will either statically match or it won't, no need for a run-time check) but there was nothing to warn users of this fact. To compound matters, the example in the matches parameter doc string even made this mistake. This patch: 1) fixes the doc string; 2) prohibits the use of match without a value of recurse capable of generating files to match, 3) fixes tests that were passing for the wrong reason and adds tests on the prohibition added in (2).