| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Ensure that resources whose refs are included in the catalog are
skipped to avoid duplication.
* Refactor to avoid early bailout on resources that cannot be ensured
absent.
* Remove check for managed? in generate
Checking if a resource is managed is unnecessary when checking for its
inclusion in the catalog.
* Add test coverage for Puppet::Type::Resources#generate
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The resource reference logic wasn't handling resources with "\n"s
in their namevars gracefully, and detection of this was complicated
by infelicitous exception reporting.
Note that this patch will require a merge when combined with the
patch for #2657.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Errors written to STDERR by Debian's invoke-rc.d are spurious, since
we're only using it to query whether a service can be started.
I'm adding the --quiet flag to suppress those messages.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This problem affects all types that generate sub-resources at
evaluation or pre-transaction time.
Thus it is fixed in the transaction, where we make sure we assign
all parent tags to the generated child resource.
A more correct fix would be to make sure we copy the whole context
(ie file, line, version, tags). This fix is planned for Rowlf.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
class klass {
include a, b, c
}
wasn't producing any rdoc documentation.
We were thinking code was always embedded in an array which is not
the case for mono-instruction code.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch fix this bug by adding more to_s methods to ast member
so that puppetdoc can just to_s the AST to reconstruct the original
puppet code.
Of course this is not perfect, but should work most of the time.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When puppetdoc rdoc dies with an unhandled exception, the error
message produced didn't mention the file and line where the parser
choked.
This patch fixes this by trying to locate on which AST structure
the rdoc system failed.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch fixes a code-path in Puppet::Type::File::Content#insync? that
was failing to show a diff when the content's source came from a
template.
I was only able to reproduce one of the two such failures that Malcolm
Howe reported, but I think it's likely that they were both caused by
this same bug.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since the storeconfig refactoring (ie moving the catalog storeconfig
system under the indirector) in 0.25 we lost the capability to
store the node ip and node environment name.
This patch restores this feature.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since "preferred_serialization_format" was introduced, the older
"catalog_format" setting (yaml|marshal), when provided, has been
silently ignored and the default for "preferred_serialization_format"
used. This re-introduces "catalog_format," logs a deprecation notice,
and passes on any provided value to "preferred_serialization_format."
Signed-off-by: Bruce Williams <bruce@codefluency.com>
|
| | |
| | |
| | |
| | | |
preflight
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The fundemental problem was that, despite what the comment said,
the early bailout for file content management only applied to
directories, not to links. Making links bail out at as well fixed
the problem for most users.
However, it would still occur for users with mixed ruby version
system since there were no to_/from_pson methods for file metadata.
So the second (and far larger) part of this patch adds metadata
pson support.
The testing is unit level only, as there's no pratical way to do
the cross-ruby-version acceptance testing and no benifit to doing
"integration" testing short of that.
Signed-off-by: Markus Roberts <Markus@reductivelabs.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It seems we never finalize the catalog, so the various default
resources are never created including the default schedules.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This was my bad. My patch for #2637 broke some test's assumptions and I
never went back to update them.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
This is just Al's patch with removal of trailing ";"s.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
| | |
| | |
| | |
| | |
| | | |
Adds an ext/regexp_nodes/ directory containing a regexp-based
classifier and some example files for it.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We now only warn when there's an actual change to make,
and we only make one warning per process run.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
been parsed
When fixing #2424, we were adding a global allow (ie allow(*)) to
the plugins/modules mount.
Unfortunately global allow always win against any other rules that
can be defined in fileserver.conf.
This patch makes sure we add those global allow entries only if
we didn't get any rules from fileserver.conf
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
This was deprecated in commit 1cfb0215 and was keeping puppetd from starting in listen mode.
Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If setup code for a process depends on network connectivity
it needs to be protected with a rescue clause as much as the
main body of the process.
Further, Timeout exceptions aren't under StandardError and thus
aren't caught by an un-typed rescue clause. This doesn't matter
if we've morphed the exception, but will cause the program to
fail if we haven't.
There are many places where these concerns _might_ cause a problem
but in most cases they never will in practice; this patch addesses
the two cases where I have been able to confirm that it actually
can cause the client daemon to exit and two more where I suspect
(but can not prove) that it could.
I'd be willing to push this patch as it stands, as it at least
fixes demonstrable problems. A more general solution would be
nice.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch changes Puppet::Parser::Resource to check if it has been
passed two Puppet::Parser::Resource::Param objects with the same name.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change regexp to allow cron environment => "MAILTO="
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patches fixes a bug where setting an invalid option for "--color"
caused the word "nil" to be printed on every line of the log, instead
of printing out log messages.
Invalid color options now just produce uncolored output.
It seems to me that this isn't important enough to issue a warning
about an invalid setting.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use of notify() is an error, so replace it with notice, which is a
function. Alternately, notify { msg => '2.6-1 is > than 2.4.5' } could
be used.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If a puppetd run was started manually and 'service puppet stop' was run
the killproc function used would kill the manually started puppetd. On
Fedora and newer RHEL (>= 5) we now use the -p option to prevent this.
This fixes #2751 (Red Hat initscripts kill an independently started
puppetd/puppetmasterd)
Signed-off-by: Todd Zullinger <tmz@pobox.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This affects several providers:
dpkg, rug, up2date, urpmi
Fixed by escaping the package names with Regexp.escape
Patch by Jesse Wolf
Signed-off-by: Markus Roberts <Markus@reality.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The latter is deprecated and was keeping puppetd from starting.
Also added a test and fixed a typo in another test.
Signed-off-by: John A. Barbuto <jbarbuto@corp.sourceforge.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
tags
f9516d introduced a change in the way the user tags are persisted
to the database: user tags are now treated as regular tags (they are
stored to the tags table).
Thus this commit changed the AR collector request to also look at the
tags tables when collecting.
Unfortunately this added a performance regression since tag request
were still importing the resources parameters tables and AR was
issuing a large request which was returning all the resource parameters
joined with the tags.
This commit fixes the AR request to join to the needed table, instead
of doing an include. Including (ie eager loading) parameter values was
not working for resource parameters anyway since at least 0.24 because
searching by parameter add a constraint to the joins and only the
searched parameter was returned instead of all parameter for a given
exported resource. So on a performance standpoint this new code should
be as fast 0.24 was.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
less often
This is not the right fix, but more a hackish workaround.
Since 0.25, the facts are transmitted as GET parameters when a
node asks for a catalog. Most proxies or webserver have a size limit
which is sometimes reached. In this case the request is denied
and the node can't get its catalog.
The idea is to compress facts (some non-scientific studies show a
57% fact size decrease for an average node) when transmitting
those when asking for a catalog.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | | |
|
|/ /
| |
| |
| | |
Signed-off-by: Markus Roberts <Markus@reality.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit extracts these three classes into a single
ResourceType class in the Parser heirarchy, now completely
independent of the AST heirarchy.
Most of the other changes are just changing the interface
to the new class, which is greatly simplified over the previous
classes.
This opens up the possibility of drastically simplifying a lot
of this other code, too -- in particular, replacing the reference
to the parser with a reference to the (soon to be renamed)
LoadedCode class.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| | |
This is so that you can still use docs without AST
being the parent class.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a first version that does very little -
it has a few fields, and allows speciification of
dependencies with other modules as well as compatibility
with individual Puppet versions.
It's not really sufficient, because it only allows specific
versions, rather than a range of versions, but it's a good
demo of what it takes and what we provide.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Puppetdoc wasn't parsing the realize function.
This patch let puppetdoc find realize and display in RDoc html
mode the list of realized resource per class or node.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a flag "manage_internal_file_permissions" which is enabled by
default. Disabling this flag prevents Puppet from managing the owner,
group, or mode of files created from Puppet::Util::Settings::FileSetting
I think this is a wide enough net to follow Luke's suggestion of
"disable management of everything", and it certainly satisfies the
requests I'm aware of, but if I've missed anything, let me know.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
|
| |
| |
| |
| | |
This sets the ActiveRecords connection pool size, when connecting to remote databases (mysql, postgres). default is 0; the 'pool' argument is only passed to ActiveRecords when the value is 1 or greater.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This allows one to specify the name to use in the
CA certificate. It defaults to the :certname,
but for those stuck using mod_ssl it can be changed.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows a separation between the wrapper class
and its internals, which is (at least) necessary for
the CA cert, which might not be found using the
internal name.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| | |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This option only works when --onetime is specified, as it doesn't make
much sense to worry about exit codes in the context of a long-running
daemon.
This required a refactoring of the existing --detailed-exitcodes code,
as "puppetd" wasn't directly creating a transaction object (like
"puppet" does).
Added Report::exit_status, which did what was previously hard-coded
into the "puppet" executable.
An Agent's "run" method now returns a value (the result of the
individual client class' "run" method)
The "puppetd" agent's "run" method now returns a transaction report, as
that seems like the logical thing to return as the result of applying a
catalog.
Signed-off-by: Deepak Giridharagopal <deepak@brownman.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Wrap Puppet::Settings.use in a block that disables noop mode during the
execution of the block and ensures that noop returns to its original
value afterwards. This allows internal puppet catalog operations like
ssl directory creation to occur even when puppet is run in --noop mode.
This should actually solve a broader class of related bugs.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch fix this bug by adding more to_s methods to ast member
so that puppetdoc can just to_s the AST to reconstruct the original
puppet code.
Of course this is not perfect, but should work most of the time.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|