| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | |
|
|/ / / / / |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The file content property had a weird garbage string in its doc variable
which appeared to be part of our older reference generator code. Since
the code to strip these odd links out no longer appears to exist, the
nonsense would propagate to the generated types reference.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This patch allows us to make C-style "assertions" in Puppet code,
e.g.:
assert_that { condition }
assert_that(message) { condition }
These methods will raise an exception if the environment variable
PUPPET_ENABLE_ASSERTIONS is set to a non-empty value, and the the
condition evaluates to false. If the environment variable
PUPPET_ENABLE_ASSERTIONS is not set, then the condition is not even
checked.
Switching the assertions on with PUPPET_ENABLE_ASSERTIONS carries
three advantages:
1. It makes it possible to put potentially expensive checks in
assertions without degrading the performance of the code in production
environments.
2. It allows strict assertions to catch Puppet bugs early in
development, without increasing the risk of a crash in production
environments.
3. It allows a simple command-line mechanism to run any Puppet command
with assertions enabled.
|
|\ \ \ \ \ \ |
|
| | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We had a combination of bad logic, and bad testing, and a nasty behaviour of
Mocha <= 0.9.10 that would result in a false pass for one of our tests.
This not only falsely passed, but hid an infinite loop retrying decompression
on an invalid data stream; it could be triggered by anything that sent an HTTP
request with an invalid compressed body, resulting in a livelock.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously, when the command line was empty we would try and invoke an empty
method; this was less helpful than telling people what they could actually do,
so we adapt our code to do precisely that.
Paired-With: Jesse Wolfe <jesse@puppetlabs.com>
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We now have a regular, testable mechanism for handling the legacy '--' version
of subcommands, as well as a modern bareword subcommand pattern. This makes
it sensible to test command handling and avoid regressions.
We identified a few quirks in the command line as part of this process.
Pair-With: Jesse Wolfe <jesse@puppetlabs.com>
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
|
|\| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* 2.6.x:
Updated CHANGELOG for 2.6.5rc5
(#6337) Fix Ruby warning on 1.8.6 about "future compatibility"
(#6353) Restore the ability to store paths in the filebucket
(#6126) Puppet inspect now reports status after run completes.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Ruby 1.8.6 (but not later versions) warn about requiring parenthesis on some
function calls; having one of those in our network rights checking means that
we emit ... quite a few of these, and annoy anything that tracks our logs.
By using the more standard form of raise we can avoid the warning entirely,
and keep consistent code style across the file.
Reviewed-By: Paul Berry <paul@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Commit 2274d5104f6e413a2b8899a3c3111a17bbb2f4d7 optimized network
usage for the case where a file is already in the filebucket.
However, it took away the ability to store paths.
This change restores the ability to store paths while maintaining
optimal network usage for the case where the file is already in the
filebucket with the given path. This is expected to be the most
common case.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We now emit timing and output a status message at the end of a successful
inspect run.
Paired-With: Nick Lewis <nick@puppetlabs.com>
Signed-Off-By: Daniel Pittman <daniel@puppetlabs.com>
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* tickets/2.6.x/6309-check-what-is-mounted:
Remove pending tests from parsed mount provider
(#6309) Ensure the correct device is mounted when managing mounts
Clean up whitespace, and commented out code in parsed mount provider
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Previously the mount type would only check if anything was mounted at the
desired point, when 'ensure => mounted' was specified. Now we check not
only whether something is mounted at the desired point, but also that it
is the thing we wish to be mounted there.
There is also a chance that the mount point directory could be
"automagically" removed for us, when unmounting incorrect devices, so we
attempt to re-create the directory after unmounting to give the mount of
the correct device a better chance at succeeding.
Paired-with: Matt Robinson <matt@puppetlabs.com>
Paired-with: Nick Lewis <nick@puppetlabs.com>
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | | |
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
|\| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* tickets/2.6.x/6364-fix-mount-provider-on-aix:
(#6364) Adjust mis-translated regex in mount provider for AIX
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The commit to simplify the regex used to parse the output from the mount
command on AIX (50c12e55b6f8462f6904ae061e661d1d10c7590a) mis-translated
it.
The original regex was grabbing the 3rd space-separated element, not the
2nd. This mis-translation caused the provider to grab the device
information instead of the mount point, and compare that to the desired
mount point. This would cause Puppet to think that the mount was never
actually mounted under normal circumstances.
The code from 50c12e5 was passing the tests because the fixture data did
not include the mandatory leading whitespace that the original regex was
looking for. The updated fixture data is pulled from the mount manpage
from AIX v6r1.
Reviewed-by: Paul Berry <paul@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Added support for adding "_search" to the end of any indirection to
'pluralize' it, and added tests to check this functionality and to test
hidden side effect of plurality method unpluralizing indirections.
Paired-With:Paul Berry <paul@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Ruby 1.8.6 (but not later versions) warn about requiring parenthesis on some
function calls; having one of those in our network rights checking means that
we emit ... quite a few of these, and annoy anything that tracks our logs.
By using the more standard form of raise we can avoid the warning entirely,
and keep consistent code style across the file.
Reviewed-By: Paul Berry <paul@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Puppet masters can now set the inventory_server and inventory_port
option to point to another puppet master that will function as the
central inventory service. When agents connect to the
puppet master, this will send fact data from the puppet master over REST
to the inventory service.
The puppet master itself will still store the client fact data in the
local yaml dir by setting the cache class to yaml.
Getting puppet masters to talk to each other using certs is difficult.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It is now possible to specify queries in the form “meta.timestamp.xx”
where xx is eq,ne,gt,lt,ge,le when searching the inventory service.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | | | | | |
|
| |_|_|_|/
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This REST interface returns a list of nodes that match a fact query.
Fact queries can use (in)equality testing as a string comparison, and >,
<, >=, <= numerical comparisons. Multiple tests can be done as AND
comparisons, not OR.
The fact queries need to be prefixed by facts, and the comparisons other
than equality are specified with a .comparison_type after the fact name.
This will be better explained in the REST documentation on the website.
Searches that don't match anything now return empty array instead of a
404 error.
Conflicts:
spec/spec_helper.rb
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
function(-1) was failing because the grammar wasn't allowing negated values in
function calls. This fix makes the negation of any value which was previously
legal as a function argument also now legal as a function argument.
Paired-With: Max Martin
Paired-With: Markus Roberts
|
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Once you stub signal traps in tests, you can hit ctrl+c in the middle of
a spec run and it will stop the run instead of puppet catching the
SIGINT.
I had trouble easily tracking down all the places to stub traps when the
trap was being called as a private method on applications and daemons,
but calling trap on Signal is equivalent since Kernel calls Signal.trap
and Object mixes in Kernel to provide trap as a private method on all
objects.
A bigger solution would be to refactor everywhere we call trap into a
method that's called consistently since right now we sprinkle SIGINT and
SIGTERM trap handling over applications and daemons in inconsistent
ways, returning different error codes and using different messages.
I've captured this info in ticket #6345.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* 2.6.x:
Updated CHANGELOG for 2.6.5rc4
(#3646) Fix the documentation fix for `puppet apply --apply`
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
--apply is actually off of `puppet apply`, not off of `puppet agent` (nor
`puppet master`), so move the documentation accordingly.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* 2.6.x:
Updated CHANGELOG for 2.6.5rc3
Updated fix for #3646 - apply / compile documentation
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
parser.rb manually rebuilt to resolve global grammer chances.
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The following manifest was failing:
$hash = { 'a' => { 'b' => { 'c' => 'it works' } } }
$out = $hash['a']['b']['c']
because of a typo in the grammar.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
The automatically generated parser.rb needed to be rebuilt to make the syntax
changes functional; this commits only that rebuild.
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
bug/2.6.next/5516-hashes-can't-be-used-in-selectors
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The following manifest was producing a parse error:
$int = { 'eth0' => 'bla' }
$foo = $int['eth0'] ? {
'bla' => 'foo',
default => 'bleh'
}
because selectors didn't support hash access.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
bug/2.6.next/5720-puppetdoc-fails-on-parameterized-class
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It appears that the fix for #5252 wasn't complete, and class, nodes and
definition were still using the current lexer line number instead of
the line number of the class/define/node token.
This combined with some missing comments stack pushing/pop on parenthesis
prevented puppetdoc to correctly get the documentation of some class (including
parametrized ones).
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It can happen that when parsing a file puppet parses other manifests
if they get imported (this is at least true for site.pp, even in
ignoreimport=true). Thus those files are now "watched".
But puppetdoc needs to analyze all files, and since 99c101 we are now
checking if the file was already parsed to not reparse it again.
If that was the case, though, we weren't analyzing the produced code.
Thus it was possible to not produce documentation for the site.pp content.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The following manifest was crashing puppetdoc:
class test {
include "test::$operatingsystem"
}
Because the quoted string is "rendered" as a concat AST, which in turn
ended being an array when entering RDoc.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Repaired a 2-indent/4-indent issue that kept a code block from being recognized
* Wrapped literal strings in backticks to format as code and protect from Markdown
* Added note about backslashes for escaping metacharacters.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Fixed ULs being interpreted as code blocks
* Changed an example for variety.
* Turned set of paragraphs inside a LI into a nested list.
|
| |/ /
|/| |
| | |
| | | |
Individual metaparameters under the main H2 on the page should be H3s, not H4s.
|