| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 2.6.x:
(#5304) Use internal_name rather than real_name for maillist provider
Updated CHANGELOG and version for 2.6.4
Revert "(#5304) Use internal_name rather than real_name for maillist provider"
Disable remote ralsh by default
(#5424) Ship auth.conf as part of installing from source
(#5304) Use internal_name rather than real_name for maillist provider
Renamed Reductive to Puppet
Manually Resolved Conflicts:
lib/puppet/provider/maillist/mailman.rb
|
| |
| |
| |
| | |
I swear I've done this before. *confused*
|
|\ \
| | |
| | |
| | |
| | | |
Manually resolved conflicts:
spec/unit/configurer_spec.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Once a configuration run is done, puppetd will save on the node a
yaml summary report roughly akin to:
---
time:
notify: 0.001025
last_run: 1289561427
schedule: 0.00071
config_retrieval: 0.039518
filebucket: 0.000126
resources:
changed: 1
total: 8
out_of_sync: 1
events:
total: 1
success: 1
changes:
total: 1
This is almost an hash version of the current --summarize output, with
the notable exception that the time section includes the last run unix
timestamp.
The whole idea is to be able to monitor locally if a puppetd does its job.
For instance this could be used in a nagios check or to send an SNMP trap.
The last_run information might help detect staleness, and this summary
can also be used for performance monitoring (ie time section).
The resource section can also show the number of failed resources.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
If the hash containing log destinations gets corrupted, Log.close_all
could fail silently. This change adds an exception to make these
failures easier to debug should they ever happen again.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
destination.
Using an Array as a log destination is unreliable because Puppet's log
mechanism stores log destinations in a hash whose key is the
destination itself. Since arrays can change their hash when they are
modified, this was causing the log destination hash to become
corrupted, producing sporadic spec test failures.
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | | |
Resolved conflicts manually:
spec/integration/indirector/bucket_file/rest_spec.rb
spec/integration/indirector/certificate_revocation_list/rest_spec.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There was a section of code that didn't take the legacy RRD library into
account. This caused a unit test failure, but only if you have the RRD
legacy library installed, which I did.
Paired-with: Jesse Wolfe <jesse@puppetlabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
We already had an internal implementation of which hiding under an assumed
name (Puppet::Util.binary); this commit calls it out of hiding and uses it
consisantly.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The Puppet::Util.sync method was not thread safe and also leaked memory. I'm
not certain, but I believe the first is ironic and the second is merely a bug.
This patch addresses the problem by 1) refactoring so the sync objects
are never returned (and thus no one can cache a reference to one) 2) adding
reference counting 3) deleting them when they are no longer needed 4) doing
the thread safty dance.
It wasn't the first (or even second) solution considered, but it's the one
that I was able to make work in a way that I'm convinced is correct. Its
main advantage is that it puts all the tricky bits in one place.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Using File.open(file, "w") calls open(2) with O_CREAT|O_TRUNC which
means when the file exists it is immediately truncated.
But the file is not locked yet, so another process can either write or
read to the file, leading to file corruption.
The fix is to truncate only when the file is exclusively locked. This can
be done on some operating system with O_EXLOCK open(2) flag.
I chose the more portable option of:
* open
* flock
* truncate
* write
* close
It might also be good to flush and fsync the file after writing it,
otherwise in case of crash an incomplete file can stay on disk.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This should allow to run puppetdoc on ruby 1.8.5.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
RDoc has some standard parsers for .c,.cc or fortran files (don't ask why).
Unfortunately our html generator doesn't support the data structures
generated by those parsers and we were bombing on unknown methods.
This patch makes sure we generate html only for our own top level objects.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The internal format of parameters was changed between 0.25.x and 2.6.x, making
them incompatible when serialized. This was fixed for PSON under ticket #3656
(by modifying the data as it was serialized) in:
commit f66095d35bc5f9645eb19bbb8cefa342c0181d2d
and
commit 2edf7fe968ac3d8af9865f65100940747c1fa894
but nothing was done about the other serialization formats. This commit adds
a callback to zaml property serialization and uses it to route data through the
fixup method added in the commits above, thus fixing the problem "the same way"
as it was fixed for PSON under #3656.
It does nothing about marshal, mostly because I have not totaly gone over to
the dark side (yet).
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | | |
Conflicts:
lib/puppet/util/monkey_patches.rb
-- two unrelated additions had been made, kept them both.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rewrote SimpleGraph to use a more efficient internal representation.
To preserve compatibility with older clients, graphs are still
serialized to YAML using the format used by Puppet 2.6. However, a
newer, more compact format can be enabled by setting
"use_new_yaml_format" to true. Deserialization from YAML accepts
either the old 2.6 format or the newer format. In a later release,
once we no longer need to be compatible with 2.6, we will be able to
switch to the new format.
To make deserialization accept multiple formats, it was necessary to
use the yaml_initialize method. This method is not supported in
versions of Ruby prior to 1.8.3, so a monkey patch is included to add
support for it to Ruby 1.8.1 and 1.8.2.
Thanks to Markus Roberts for the SimpleGraph rewrite. Thanks to Jesse
Wolfe for figuring out how to write the yaml_initialize monkey patch.
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | | |
Manually resolved conflicts:
lib/puppet/parser/ast/resource.rb
spec/unit/parser/ast/resource_spec.rb
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ActiveSupport provides a "daemonize" method on all objects that causes
the ruby process to fork to the background. This is extremely surprising
and dangerous, and some of our spec tests could trigger this
accidentally.
This patch adds a "daemonize" method to Object which shadows the
ActiveSupport version, preventing it from ever being called.
|
|\| | |
|
| | |
| | |
| | |
| | | |
/usr/lib/ruby/site_ruby/1.8/puppet/util/metric.rb:62: warning: parenthesize argument(s) for future version
|
|\| | |
|
| | |
| | |
| | |
| | |
| | | |
A newline that was part of a diagnostic was left in, and this caused problems
with the serialization of strings in "preserve newlines" mode.
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The API for AST objects has changed, making the initialization of this
spec somewhat more complicated.
Also, git seems to have been confused by whitespace changes.
Manually Resolved Conflicts:
lib/puppet/parser/ast/resource.rb
|
| | | |
|
|\| |
| | |
| | |
| | |
| | | |
This commit merges in d057b90 with the addition of commit 6dd1930 to fix
some tests that are confined to machines where rrd is installed.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The rrd project has been shipping ruby bindings since 1.3.0, and the old
rrdtool ruby library is no longer being maintained.
This patch is based upon Davor Ocelic's submitted code, with the
addition that I've added conditionals so it can still call the old
rrdtool library if a modern rrd is not installed.
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This conflict was a little too complicated for diff to figure out, but
the resolution is actually fairly mechanical.
Some unit tests changed because they were mocking unnecessarily.
Manually Resolved Conflicts:
lib/puppet/util/rdoc/parser.rb
spec/unit/util/rdoc/parser_spec.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When running puppet doc, if the directory containing the user's
specified manifest file overlaps with the modules directory (i.e. they
are the same directory or one contains the other), Puppet doc would
try to parse the overlapping files twice, triggering an exception
which made the documentation run fail.
Fixed the bug by adding a check to the RDoc::Parser#scan method to
prevent re-parsing of files that have already been parsed. Also added
a spec test to verify that this works.
|
|\| |
| | |
| | |
| | | |
There are merge conflicts with commits following this one.
|
| | | |
|
| | | |
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The ZAML class was using class variables to keep track of labels and
backreferences while serializing object to YAML. This made it
possible to get ill-formed or incorrect YAML output if two threads
tried to serialize objects at the same time.
Changed to use instance variables of the ZAML class, so there is no
race condition.
Also added some more spec tests to verify that labels are generated
properly.
|
|\ \
| |/
|/|
| | |
a.k.a. "make_taller_trees"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
definitions (classes, definitions, and nodes).
Previously, type definitions were not represented directly in the AST.
Instead, the parser would instantiate types and insert them into
known_resource_types as soon as they were parsed. This made it
difficult to distinguish which types had come from the file that was
just parsed and which types had been loaded previously, which led to
bug 4496.
A side-effect of this change is that the user is no longer allowed to
define types inside of conditional constructs (such as if/else). This
was allowed before but had unexpected semantics (bugs 4521 and 4522).
It is still possible, however, to place an "include" statement inside
a conditional construct, and have that "include" statement trigger the
autoloading of a file that instantiates types.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Updated defaults.rb to Markdown
Migrated report documentation to Markdown
Migrated Naginator doco to Markdown
Updated provider documentation to Markdown
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Some recent versions of rails have started calling yaml with the internal
(and IIRC depricated) signature; this does nothing special in yaml but it
breaks with zaml, so we add an ignored parameter to simulate the non-behavior.
*sigh* I love rails.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
During a profiling of a 2.6.1rc1 puppet master, I found that we
spend a lot of time and efforts in Puppet::Util::Autoload#module_directories.
Since this method is doing a bunch of filesystem access, this process is
slow.
In fact each time we were evaluating a resource or trying to find if a given
resource was a builtin type we ended up scanning the whole module directories
for the given environment.
This patch attempts to fix this performance issue by caching the module_directories
output for the either the time of the compilation or an agent configurer
run (since this stuff looks like to be shared for both compilation and
catalog evaluation).
With this patch, my compilation time for 2k resources went from 5.91s to
3.71s (second run each time to allievate parsing time)..
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Edited to fix a typo [#4434]
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
The underlying hash is not protected and thus two threads accessing
the cached value at the same time and one expiring the value can result
in a race condition.
This patch synchronizes the access to the value_cache underlying hash.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
| |
So let's not call it :)
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
| |
The refactoring of using environment instances instead of strings
for initializing the parser, rdoc wasn't updated, thus was unable
to initialize the parser.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
| |
< and > might be invalid or borderline chars to use for a file name
or an url.
This patch changes those characters to __.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem is that the environment list gets cleared
when Settings#set_value is called, and it was being
called every time Settings#use was called, which is
more often than obvious but especially if reporting
is enabled.
Previously we ignored noop when running inside of Settings,
and this essentially adds that back in, so we can remove
the special noop behaviour in Settings itself.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
|
| |
|