| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Adds a --signed option to the --list feature that only displays signed certificates
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
This was a classic semantic merge conflict; one patch adds a new type of
checksum, with a routine to compute it on files; the other adds streams with
routines to compute all the existing checksum types on them. They merge
cleanly but theresult is incorrect.
This patch completes the square by adding a none_stream routine to not-compute
a checksum on a stream.
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Conflicts:
lib/puppet/ssl/host.rb
|
| |
|
|
|
|
|
|
| |
The usage message should show the single-executable variant of commands.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
| |
instead of ARGV
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
| |
Refactor so that the command line options only get parsed once
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
refactor CommandLine to be an object
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
| |
Extract the logic to determine the subcommand name into a method.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
| |
restore the help text for the apply command
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
| |
on ubuntu, --help was failing to find the path to the old executables,
which still contain the rdoc help message
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
| |
Puppet's defaults change depending on which command invokes them.
This patch makes sure that we use the maintain the current behavior.
This is a temporary fix until I implement feature #2935.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
| |
Add "puppet describe" as the new invocation of "pi"
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
| |
Add "puppet kick" as the new invocation of "puppetrun"
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
| |
Add "puppet cert" as the new invocation of "puppetca"
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
| |
Add "puppet master" as the new invocation of "puppetmasterd"
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
| |
and more I get the feeling that FreeBSD's rc system is totally unsuitable for Puppet. What about porting Upstart or SMF to FreeBSD ... ?)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Find and replace to the rescue...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are several issues with changing the real, effective, and saved group
and user ids in different environments (which methods to call, in what order,
etc). While the code being replaced by this patch appeared to work for Linux,
Solaris, and (with a special case test) Darwin; it was failing under AIX and
may have had edge-case problems under the others.
Ruby back to 1.8.1 has supported a higher level interface that deals with the
problem and captures a broader range of OSes; it's a single call for group and
one for user--the details of rid/eid/svid, etc ordering are handled internally.
Switching to that simplifies our code and should improve/unify our support of
various OSes.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
Puppet::Resource::Catalog's spec
This issue causes other specs to fail, because they depend on the
default terminus being unchanged.
|
|
|
|
|
|
| |
The output variable in the inner block wasn't visible in the outer block,
and wasn't needed in any case, since the results are returned naturally
if you just leave everything alone.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a targeted fix to the issue of permissions when writing ssh authorized
key files by 1) requiring that an existing users be specified on the resource
and 2) doing the write as that user. It's based on Michael DeHaan's initial
implementation of Luke's idea, but with a number of simplifications (mostly by
testing necessary conditions as early as possible so the code isn't cluttered
up with a lot of checks).
The tests in this version are modified slightly to remove some additional
implementation couplings that were added in master.
|