| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| | |
* 2.6.x:
Update CHANGELOG and version for 2.6.6rc1
(#6541) Fix content with checksum truncation bug
(#6418) Recursive files shouldn't be audited
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* ticket/2.6.next/4914:
Revert "(#6309) Ensure the correct device is mounted when managing mounts"
(#4914) Improved stubbing in mount/parsed_spec tests.
(#4914) Improved parsed_spec for mount
(#4914) Remove mount specs
(#4914) Specs for mounted? match new behaviour
(#4914) Add specs for modified mount provider
(#4914) Add specs for modified mount type
(#4914) Update property blocks
(#4914) Query property_hash for mountstate
(#4914) Prefetch mountstate
(#4914) Join lines for better readability
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* ticket/2.6.x/4914:
(#4914) Improved stubbing in mount/parsed_spec tests.
(#4914) Improved parsed_spec for mount
(#4914) Remove mount specs
(#4914) Specs for mounted? match new behaviour
(#4914) Add specs for modified mount provider
(#4914) Add specs for modified mount type
(#4914) Update property blocks
(#4914) Query property_hash for mountstate
(#4914) Prefetch mountstate
(#4914) Join lines for better readability
Conflicts:
lib/puppet/provider/mount.rb
lib/puppet/provider/mount/parsed.rb
spec/unit/provider/mount/parsed_spec.rb
spec/unit/provider/mount_spec.rb
spec/unit/type/mount_spec.rb
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add specs for the new prefetching and the correct parsing of vfstab on
Solaris and fstab on other systems
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The action for a specific ensure state depends on the actual state so we
cannot use the default behaviour. The following transitions are now
supported (with ghost = mounted but not present in fstab):
* 4 Is-states : absent, mounted, unmounted, ghost
* 4 Should-states: absent, mounted, present, unmounted
* from ghost to present -> create
* from absent to present -> create
* from ghost to unmounted -> create, umount
* from mounted to unmounted -> umount
* from absent to unmounted -> create
* from ghost to absent -> umount (may fail on certain OS)
* from mounted to absent -> umount, destroy
* from unmounted to absent -> destroy
* from ghost to mounted -> create
* from absent to mounted -> create, mount
* from unmounted to mounted -> mount
Every other combination is treatet insync
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Change mounted? to query the property_hash so we don't have to run the
mountcommand for every specified mount but rely on the prefetched state
Also update the prefetched property_hash[:ensure] after mount or umount.
This is important if we query mounted? later (most obvious when refresh
is called. We dont want to remount a resource that was umounted before)
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add a method mountinstances that returns a list of currently mounted
filesystems and overwrite prefetch to update the :ensure state of a
mount resource to either
- :absent => not in fstab and not mounted
- :unmounted => in fstab but not mounted
- :mounted => in fstab and mounted
- :ghost => not in fstab but mounted
This is just one step towards 4914. Next will be query the property_hash
when asking mounted? and update the insync? methods to handle the
different states.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit 6cb365a887d47606bdfae0ff540038b0c49b7451, which
fixed bug #6309 but introduced bug #6411. In addition, it conflicts
with a significant patch to the mount provider that addresses #4914.
After merging in the fix for #4914 I will determine whether bug #6309
still exists, and if so work on an improved fix for it.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* ticket/2.6.next/maint-remove_version_control_tags:
(#6338) Remove unused version control tags
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Older version control systems like CVS and SVN used to use these $Id$
tags for version information.
Paired-with: Nick Lewis
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
for computer type
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Don't use ensure => 'path/to/file', because it's hard to read. Use
ensure => link and specify a target =>.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Lists need a leading linebreak.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This one was subtle. If the first paragraph of a Markdown string embedded in a type isn't
multiple lines, a code block immediately following it will not be recognized. So, hard-wrap or die, I guess.
|
| | | | | | |
|
| | | | | | |
|
|/ / / / / |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Puppetdoc was relying on RDoc to provide the puppet entity (class, definition
node, etc...) hyperlinking in comments.
Unfortunately, RDoc was assuming namespaces are capitalized like Ruby
namespaces and that definition would use the # or . separator.
This change adds on top of RDoc puppet namespace format for classes and
definition.
This will make sure the comment hyperlinking will work as intented.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In most cases on a system with SELinux, it is preferred to use
the SELinux matchpathcon call to determine the default context that
a file should have to make sure that files Puppet modifies are
labeled with the correct SELinux security context.
In the event that you wanted to override some or all of the default
context, you can use the SELinux attributes Puppet provides to do
that. If left unspecified the defaults will apply if matchpathcon has
defaults.
This patch adds a new selinux_ignore_defaults parameter which
will cause Puppet to assume no defaults, allowing the file's
SELinux label to be left unmodified, if desired.
Originally-by: Sean Millichamp <sean@bruenor.org>
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The noop option has been suppressing exit statuses. This is
counterintuitive, as per discussion at http://projects.puppetlabs.com/issues/6322
This patch causes noop runs to return the same exit codes as real runs.
Reviewed-By: Daniel Pittman <daniel@puppetlabs.com>
|
|/ / / / /
| | | | |
| | | | |
| | | | | |
lib/puppet/util/command_line.rb had a special case for puppet --help to return generic help instead of the puppet apply help, but it would return puppet apply help when you gave it -h.
|