| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Add in a better desc block for "specials" in cron provider, and outline
it's limitations.
The previous text was purely a placeholder.
|
|\
| |
| |
| |
| | |
* ticket/2.6.next/5073:
(#5073) Download plugins even if you're filtering on tags
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When we eval a resource in transaction.rb it was being skipped when
filtering on tags and downloading the plugins. There's a lot of
complicated conditions for whether to skip a resource, but this is a
condensed version of the path that was causing plugins not to be
downloaded.
skip?
missing_tags?
!ignore_tags?
!host_config
The Puppet::Configurer::Downloader creates separate catalogs and applies them
to get custom facts and plugins, so should be setting host_config to false.
Puppet::Util::Settings also sets host_config to false when you call use on
settings, while normal catalog application defaults to true.
Thanks to Stefan Schulte <stefan.schulte@taunusstein.net> for suggesting
the implementation fix.
|
| |
| |
| |
| | |
Reviewed-By: Paul Berry <paul@puppetlabs.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
git://github.com/stschulte/puppet into 2.6.next"
This reverts commit 658bdb72bee3ad664627a71793213e6540afd5cb, reversing
changes made to 4c9bd43bc2f5fde9d86196e8689dced929d39aad.
See comment at http://projects.puppetlabs.com/issues/5605#note-9
|
|\ \
| | |
| | |
| | | |
2.6.next
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The uniqueness_key method of a type or resource object should return a
key that can be used to identify this resource. In fact puppet seldomly
uses this method and instead uses resource[:name] as an identifier.
While this is totally fine for resourcetypes with a single
key_attribute (and resource[:name] returning the namevar), it breaks
things as soon as one creates a type with a composite key (prefetching
for example is broken). To ease the process of replacing calls to
resource[:name] to resource.uniqueness_key, the method uniqueness_key now
just returns name_var if there is only one key_attribute (immitating
self[:name]) and only returns an array of all the values of all the
key_attributes if we have more than one key_attribute.
The resourcehash which is passed to providers in their prefetch method
is now build with uniqueness_key as the hashkey. Because of the new
behaviour of uniqueness_key we hopefully wont break existing providers
while allowing new providers for types with composite keys to implement
correct prefetch methods.
|
| |/
|/|
| |
| |
| |
| | |
Ensured that withenv properly restores the environment after it runs a block and added testing for the method.
Reviewed-by: Matt Robinson and Daniel Pittman
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
2.6.next
* ticket/2.6.next/5428-handle-0.25.x-storedconfig-data:
Remove extra trailing whitespace from lib/puppet/resource.rb
(#5428) More fully "stub" Puppet::Resource::Reference for use with storedconfigs
Conflicts:
lib/puppet/resource.rb
|
| | |
| | |
| | |
| | | |
Paired-with: Daniel Pittman <daniel@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The Puppet::Resource::Reference class wasn't stubbing enough of the 0.25.x
behavior to satisfy the needs of storedconfigs. Since P::R::Reference,
and Puppet::Resource were merged as part of 2.6.x, we can pretend that
P::Resource is P::R::Reference for the purposes of loading data from
storedconfigs. This should still satisfy the over-the-wire serialization
needs of 0.25.x.
This also changes internal references to @parameters in
Puppet::Resource(::Reference) to go through a parameters method. This
allows us to "initialize" this instance variable lazily, since loading via
YAML bypasses the normal initialize method.
Paired-with: Daniel Pittman <daniel@puppetlabs.com>
Reviewed-by: Markus Roberts <markus@puppetlabs.com>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This was added while developing in order to benchmark, but wasn't removed
before committing.
Reviewed-By: Jacob Helwig
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
2.6.next
Manually Resolved Conflicts:
spec/unit/provider/mount/parsed_spec.rb
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When one wants to use the parsedfile provider for a type with more than
one key_attribute (e.g. a type for entries in /etc/services with name
and protocol as key_attributes) the provider will not store all
key_attributes in property_hash and not all keyattributes will be
visible in the to_line function.
The create method of parsedfile will only put validproperties into the
propertyhash. As result :name and all the other key_attributes will not
be set.
In the flush method however the :name parameter is put in the
property_hash but the method does not handle other keyattributes.
This patch modifies flush to put all key_attributes into the property
hash
(Note: @resource.name is basically just an alias for @resource[:name])
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
2.6.next
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The methods [] and []= of type.rb are handling :name in a special way.
When someone wants to access resource[:name] puppet tries to replace
:name with the name_var. If the type has more than one key_attribute
name_var is always returning false so we'll get the error
Resource type <resourcetype> does not support parameter false
This patch doesnt try to substitute :name if we dont have a single
namevar, aka. we have more than one key_attribute
|
| |/ /
|/| |
| | |
| | | |
"Where" -> "were." Capitalize "ACL."
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This terminus behaves the same on all supported DB platforms, by performing a
limited portion of its query in SQL, and the rest of the comparison in Ruby.
Its results are consistent with the YAML terminus.
Paired-With: Jesse Wolfe
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
* ticket/2.6.next/5392:
(#5392) Give a better error when realizing a non-existant resource
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
You can reproduce the error with a simple manifest
Bogus_type <| title == 'foo' |>
We used to fail because find_resource_type returned nil and we never
checked if it was nil before calling methods on it.
Reviewed-by: Max Martin <max@puppetlabs.com>
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
On Red Hat, Ubuntu, Debian and deriatives the -r flag
allows creation of "system" users with a UID below that
defined in /etc/login.defs.
This commit adds support for a system parameter and a
system_users feature which can be used like so:
user { "foo":
system => true,
ensure => present,
}
This will create a user with a lower UID.
The system parameter defaults to false.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The patch for #6107 fd73874147a1aaa3a047f904a0bc1ae67780a2e4 introduced
a bug when content was an invalid checksum. Rather than error the
checksum was invalid, it would overwrite the file with empty string,
essentially truncating it.
The problem with #6107 is that when I wrote it, I didn't realize that
the content parameter was munged to be nil when it was a checksum, and
then chunking method special cased nil content to mean you should check
the filebucket. #6107 intended to fix the case where content REALLY WAS
nil, and handle that by returning an empty string.
This patch fixes it so that we check to see if we really passed in a
checksum when chunking, and only then going to the filebucket.
Surprisingly it is possible to have a content checksum should value set
from source, so we have to be careful not to assume the use of the
filebucket whenever there's a checksum. The following manifest produces
this situation:
file { "/tmp/mydir" :
source => '/tmp/sourcedir',
recurse => true,
}
I've said it before, and sure I'll say it again, but long term the file
provider really needs a refactor. I'll write some acceptance tests for
file behavior right after committing this so that the refactoring will
be easier.
Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A vestigial codepath was accidentally made live again when 2.6.0's audit
parameter was added. This patch removes that code.
As it's very difficult to write a meaningful unit test of a negative
case, a test will be added to the acceptance test project to confirm
before & after behavior for this fix.
Reviewed-By: Markus Roberts <markus@puppetlabs.com>
|
|\ \ \ \
| |_|/ /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This is not necessary because fact values are always strings, and it wasn't
doing the unnecessary job it was expected to do anyway.
|
| | | |
| | | |
| | | |
| | | | |
This had been conflating hosts and nodes, when nodes is the most accurate.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There were some warnings and stack traces in the spec output that aren't
necessary.
The only interesting fix is of the message:
lib/puppet/module.rb:79 warning: multiple values for a block parameter (0 for 1)
from lib/puppet/util/logging.rb:30
If you call any form of logging on a module you end calling the file
method on the module just because logging always checks for that method
and calls it if it's defined, but in this case it's not defined in the
way that logging expected so passes the wrong paramters.
The easy solution is just to call logging on Puppet, which makes sense
in this case anyway, and I don't think it's worth a separate ticket to
deal with that logging warning.
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Timestamps are currently the only supported metadata for searching.
Paired-With: Max Martin
Reviewed-By: Jacob Helwig
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Paired-With: Max Martin
Reviewed-By: Jacob Helwig
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
So far this terminus only supports find and save. Search is forthcoming. It
uses two new tables (inventory_host and inventory_facts) so that it won't
interact with storedconfigs.
Paired-With: Jacob Helwig
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
git://github.com/vvitayaudom/puppet into 2.6.next
* 'tickets/2.6.next/5794-create-report-parentdir' of git://github.com/vvitayaudom/puppet:
(#5794) create reports directory when creating host specific directory
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
For example with the following:
test.conf:
[master]
rrddir = /var/lib/puppet/rrd
templatedir = /var/lib/puppet/templates
[env_a]
templatedir = $rrddir/templates
rrddir = /tmp/env_a/
The command:
RUBYLIB=lib bin/puppet master --config ./test.conf --environment env_a --configprint templatedir
originally produced '/var/lib/puppet/rrd/templates' instead of the
expected '/tmp/env_a/templates'
Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
There were two problems:
* In lib/puppet/type/mount.rb, we were calling provider.mounted? to
determine whether we needed to execute "mount" after updating the
in-memory fstab record. This wasn't working properly because
provider.mounted? makes its decision based on the data stored in the
in-memory fstab record. Since the fstab record had just been
updated, provider.mounted? was incorrectly returning true even
though the device wasn't actually mounted. Fixed this by checking
provider.mounted? before updating the in-memory fstab record.
* Calling mount from this point in lib/puppet/type/mount.rb is
actually too early, because even though the in-memory fstab record
has been created, its contents have not been written to `/etc/fstab`
yet. Fixed this by storing a :needs_mount entry in the
property_hash and checking it at the end of the flush() method.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Puppet::Util.execute with an arbitrary code block for ease in spec
testing.
Reviewed-by: Max Martin <max@puppetlabs.com>
|
|/ / /
| | |
| | |
| | | |
This patch appends **Autorequires:** notes to the @doc string of every type whose instances can autorequire other resources. This will put autorequire info right on the types reference where it can do the most good.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, facts could be fetched via the REST API in PSON, but came
back as the to_s representation of a Ruby object, rather than as
proper PSON data. This patch adds to_pson and from_pson to facts, so
they can be properly used with PSON.
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The inventory indirection was just providing the search method for facts.
Because the route is now facts_search instead of inventory, it can just be
implemented as the search method for facts.
Reviewed-By: Daniel Pittman
|
|/ / /
| | |
| | |
| | |
| | | |
Inline documentation in lib/puppet/reference/configuration.rb stated that puppet agent accepted the
--mkusers flag, which is only intended for use with puppet master.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The patch for #6107 fd73874147a1aaa3a047f904a0bc1ae67780a2e4 introduced
a bug when content was an invalid checksum. Rather than error the
checksum was invalid, it would overwrite the file with empty string,
essentially truncating it.
The problem with #6107 is that when I wrote it, I didn't realize that
the content parameter was munged to be nil when it was a checksum, and
then chunking method special cased nil content to mean you should check
the filebucket. #6107 intended to fix the case where content REALLY WAS
nil, and handle that by returning an empty string.
This patch fixes it so that we check to see if we really passed in a
checksum when chunking, and only then going to the filebucket.
Surprisingly it is possible to have a content checksum should value set
from source, so we have to be careful not to assume the use of the
filebucket whenever there's a checksum. The following manifest produces
this situation:
file { "/tmp/mydir" :
source => '/tmp/sourcedir',
recurse => true,
}
I've said it before, and sure I'll say it again, but long term the file
provider really needs a refactor. I'll write some acceptance tests for
file behavior right after committing this so that the refactoring will
be easier.
Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It turns out that the ability to sort symbols comes in the preinit
section of application run when we load Facter and hit the code that
adds the <=> method for symbols in lib/facter/util/plist/generator.rb
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
|
| | | |
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit e3c59df2b246fe5e764272f21b631a5d2f28687f.
This commit is being reverted because the solution is incomplete, and a better
solution is out of scope for this release. A more complete solution will be
implemented in the future.
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We were 'handling' 404's on remote file content retrieval by returning nil
rather than raising an exception. This caused no content to be written to the
temporary file, but still appeared successful, so the destination file was
overwritten, instead of preserved. Now we just handle 404 like any other
error.
Note that the root cause of these 404s seems to have been #4319, which has been
fixed. However, in the event we do happen to get a 404 here, it's better not to
have code to specifically handle it incorrectly.
Paired-With: Max Martin
Reviewed-By: Matt Robinson
|