| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
bin/ralsh
lib/puppet/executables/client/certhandler.rb
lib/puppet/parser/functions/versioncmp.rb
lib/puppet/parser/resource/reference.rb
lib/puppet/provider/augeas/augeas.rb
lib/puppet/provider/nameservice/directoryservice.rb
lib/puppet/provider/ssh_authorized_key/parsed.rb
lib/puppet/type.rb
lib/puppet/type/file/checksum.rb
spec/integration/defaults.rb
spec/integration/transaction/report.rb
spec/unit/executables/client/certhandler.rb
spec/unit/indirector/ssl_rsa/file.rb
spec/unit/node/catalog.rb
spec/unit/provider/augeas/augeas.rb
spec/unit/rails.rb
spec/unit/type/ssh_authorized_key.rb
spec/unit/type/tidy.rb
test/executables/filebucket.rb
test/executables/puppetbin.rb
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This is a trivial fix but seems to crop up more often
than it should.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
This commit depends on 7f291afdacf59f762c3b78481f5420ec8919e46d
(fixing #1629) which was cherry-picked from master.
Signed-off-by: Francois Deppierraz <francois@ctrlaltdel.ch>
|
| |
| |
| |
| |
| | |
A refactoring of ssh_authorized_key parsed provider was needed and tests
were improved. flush method has been split for clarity.
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| | |
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| | |
work with Facter values and adds error check for missing password hash files.
|
| |
| |
| |
| |
| |
| |
| | |
Some invalid numbers were treated as numbers and conversion to Integer
was failing returning 0 (for instance 0.24.7).
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
They were throwing an exception when the 'is' value
was 'absent'.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
|
| | |
|
| |
| |
| |
| | |
twice to reduce the chance that data is lost
|
| | |
|
| |
| |
| |
| | |
underlieing files
|
| |
| |
| |
| | |
test cases as well
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds a more robust and self-healing storedconfig in case
of logically corrupted database as the one in #2010 (where multiple
resources of same references are present in the database for the
same host).
The problem is that the resources are stored in a hash with the resource
ref as the key, so we collapse resource of different id but same
reference. The patch fixed this by using a hash by resource id, and
maintaining a list of old extraneous resource in the db that are removved
after the storeconfig pass.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The ParsedFile types seem to be the main one that suffers from
this, but the transactions were using the resource titles,
not names, so resources were often not getting prefetched
correctly.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
"You can turn off waiting for certificates by specifying a time of 0."
Also add a test to ensure we catch any future regression of this behavior.
Signed-off-by: Paul Lathrop <paul@tertiusfamily.net>
|
| |
| |
| |
| |
| |
| |
| | |
I saw about a 7x speed increase when adding this simple
hash to speed up the file index lookup.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit just replaces the :file and :line accessors
with the use of the new FileCollection Lookup module.
This should mean that we've normalized all file names in
a given process, which *might* have drastic RAM improvements.
For initial simplicity, I've gone with a single global
collection of file names, but it's built so it's easy to use
individual file collections instead.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
It's better to use puppet's logging environment than an own.
Especially if the default is quite verbose and can't be set by
config flag.
|
| |
| |
| |
| |
| |
| |
| | |
It was only used in a method that apparently was not
in use any more.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Resource parameters of the form
[Res[a], Res[a,b]] ends being evaluated as
[Res[a], [ Res[a], Res[b] ]
This last form was not flattened when transfomed into RAL
type, which in turn prevented the sub array to be converted
in regular resource references.
Thus the type was choking when encountering those native
parser references instead of usual resource reference.
The fix consists in flattening array of references before
transformation to trans objects for RAL.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ticket #1469 introduced an incorrect change of behaviour where
recurse = 0 was considered as an infinite recursion, unlike
before.
This patch restores this behavior, and makes some test pass.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This code hasn't been modified since the introduction of the
fileset recurselimit parameter. Tests depending on this code
were failing.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| | |
After the fix for #1469, recurselimit = 0 was considered as
an infinite recursion which is the reverse of what it was before.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using recurse and a source, if the client side has many files
it can take a lot of CPU/memory to checksum the whole client
hierarchy. The idea is that it is not necessary to recurse on the
client side if all we want is to manage the files that are sourced
from the server.
This changeset adds the "remote" recurse value which prevents recursing
on the client side when a source is present. Since it also is necessary
to limit the remote side recursion a new File{} parameter has been
added called "recurselimit".
Moreover, the Filetset API is changing to allow the new recurselimit
parameter, and passing the recursion depth limit in the recurse parameter
as an integer is now deprecated and not supported anymore.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is done for security reasons - if a client is
unauthenticated, we don't want them to be able to
just configure their own authentication information.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit includes multiple, related changes, all
in one commit because the whole thing was necessary to
reach a functional tree again:
* The URI starts with the environment, so:
/production/certificate/foo
/development/file_content/path/to/your/file
* All REST handling is done by a single instance mounted
at / for webrick and Mongrel, rather than having individual
instances mounted at, say, /certificate.
* All REST URI translation is done by an API module. Currently
only the 'v1' module exists with no support for additional modules,
but it's well-separated and will be easy to expand as we need it.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, any option that had a setter was treated
as an attribute, but now we're specifying the list of
attributes settable via options.
We also have a to_hash method that will take all of the
options and all of those attributes and join them
back into a hash. This method is used by the REST Handler
module, since it uses the indirection request internally.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This module is now used by the client and
server side, rather than having a Handler module
that's 90% server functionality but also used by
the client.
While we don't automatically get api choice from this,
it at least provides a pattern for how we'll handle API
development over time.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Things are actually in a broken state here because we've
got a conflict between how the two sides do their work
and some extraction needs to get done. This commit
is just a stopping-point so I can do the necessary
refactoring.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is the first main phase to having a common module for
handling the REST api - this Handler module will be included
by all of the web server REST modules and the Indirector
Request class, so there's a common place that understands
how the URI consists.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| | |
Also adding it to the Indirection Request.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
It required a request instance and didn't use
the REST class it was in, so it makes more sense in
the Request class.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changeset defines a new syntax to override collection
of resources (virtual or not). This feature is not constrained
to the override in inherited context as usual resource
override.
The collection of resource supports a query like regular collection
of virtual or exported resources.
Usage example:
file {
"/tmp/testing": content => "whatever"
}
File<| |> {
mode => 0600
}
It also introduces a different behaviour for collection of catalog
resources. Before this patch, only virtual resources were collected,
now all resources (virtual or no) are collected and can be overriden.
That means it is now possible to do:
File <| |> { mode => 0600 }
And all the Files resources will have mode 0600.
It is then possible to have this puppet pattern:
file { "/tmp/a": content => "a" }
file { "/tmp/b": content => "b" }
File <| title != "/tmp/a" |> {
require => File["/tmp/b"]
}
which means that every File requires a file.
Moreover it is now possible to define resource overriding
without respecting the override on inheritance rule:
class a {
file {
"/tmp/testing": content => "whatever"
}
}
class b {
include a
File<| |> {
mode => 0600
}
}
include b
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|