This reverts commit ac7f59618a.
The reason for this revert is that the problem never really existed;
Ruby's true and false are always used unless you quote them.
I.e., you can't do confine :operatingsystem => %w{a b} and then
confine :operatingsystem => %w{b c}; you'd need to do them in one command.
This now-obsolete behaviour does not seem to be used anywhere.
The fix for #1431 is actually just removing the tests that exposed
this change; the change happened when I refactored how confines work.
Signed-off-by: Luke Kanies <luke@madstop.com>
as far I see there have been a regression while refactoring the redhat service provider to user /sbin/service. This commit fixes this bug (1426) and service restarts are working again on redhat based systems.
There are no tests, as I couldn't figure out how that should be tested. It seems that some restart logic is already tested, however it looks like not every single kind of provider is covered by tests, nor I see at the moment how I could do that.
Added tests for the bit that's changed here (and caught
a couple of bugs in the original patch).
This is all a modification of Sam Quigley's work.
Signed-off-by: Luke Kanies <luke@madstop.com>
Note that this only looks up ldap groups, at this point; if you want to set an
ldap user's primary group to a local group, you have to specify the GID.
Signed-off-by: Luke Kanies <luke@madstop.com>
The Master handler previously provided the support for the :node_name
setting, and that functionality has now been moved into the Node
class. At the same time, the names to search through have been
changed somewhat: Previously, the certificate name and the
hostname were both used for searching, but now, the cert name
is always searched first (unless node_name == facter), but only
the Facter hostname, domain, and fqdn are used otherwise. We no
longer split the cert name, only the hostname/domain/fqdn.
In the general case, this provides no behaviour change, because
people's hostname is the same as their certname. This only
results in a change in behaviour if you specify a certificate
name that is a normal node name, and you want to look that node
up by something other than the full name in the certificate.
Signed-off-by: Luke Kanies <luke@madstop.com>
Previously, we prefetched then generated, which caused generated
resources that needed prefetching not to work. This just reorders
the calls, so generated resources now get prefetched.
This renames the 'facter' confine to 'variable', and it prefers
settings to facts. There shouldn't really be any overlap, so
it shouldn't be a problem.
Instead of deleting the init scripts (with --del) we should simply disable
it with chkconfig service off, and respectfully do the same for enable
=> true;
Updated CHANGELOG
Fix for #1219. Instead of deleting the init scripts (with --del) we should simply disable it with chkconfig service off, and respectfully do the same for enable
=> true;
the [] accessor method (they previously threw an exception when
this method was used with properties). This shouldn't have any
affect functionally; it just makes the method equivalent to 'should'
for properties, but it works for all attribute types now.
compile node configurations, rather than using the Configuration
handler, which was never used directly. I removed the Configuration
handler as a result.
Modified the 'master' handler (responsible for sending configurations
to clients) to always return Time.now as its compile date, so
configurations will always get recompiled.
evaluation time, rather than resource instantiation time. This
means that you don't catch your "errors" as early, but it also
means you should be able to realistically configure a whole host
in one run.
There is now a constant in Puppet::Network::HttpPool that will
disable or enable this feature, but note that we determined
that it can cause corruption, especially in file serving (but
it's client-side corruption).
any local variables and added a local variable -- see
http://snurl.com/21zf8. My own testing showed that this
caused memory growth to level off at a reasonable level.
Note that the link above says the problem is only with class
methods, but my own testing showed that it's any method that
meets these criteria. This is not a functional change, but
should hopefully be the last nail in the coffin of #1131.
files, thanks to work by Adam Jacob and Arjuna Christenson
(the finding, not the leak). I'm going to act like this
fixes#1131, at least for now, but I doubt it does,
since that shows general memory growth over time, whereas
the leak here should go away as soon as files are reparsed
(because the parser is holding the reference to the leaking
array).
(#1036). The problem only cropped up if there was a failure
when trying to manage the system -- this would cause the
setting-based resources not to get cleaned up.
cause ever-larger memory growth), and changing the external node
terminus to use the version of the facts as their version. This
will usually result in the cached node information being used,
instead of always hitting the external node app during file
serving. Note that if the facts aren't changed by the client,
then this will result in the cached node being used, but at this
point, the client always updates its facts. (#1130)
in the Exec resource type -- the log levels are specified
using the 'loglevel' parameter, not 'logoutput'. This never
worked, or at least hasn't for ages, and now the docs are
just correct.
any objects, nor does it use Puppet's RAL resources. In the
process, I fixed#894 (you can now copy links) and refactored
other classes as necessary. Mostly it was fixing tests.
This is a squashed commit of a temporary branch, fwiw,
and it also includes any fixes to the tests that were
necessary to get all tests passing again.
NOTE: This introduces a behaviour change, in that you previously
could realize a resource within a virtual defined resource, and now
you must realize the entire defined resource, rather than just
the contained resource.
I use Naginator to parse and generate the files, with
ParsedFile to handle record management and the like.
Note that each resource type itself is just a call to
a Factory method, since everything is just based on Naginator.
Given that, all of the tests are in a single unit/ral/types/nagios.rb
file, since I used a factory to generate them, too. This is probably
either unnecessary or insufficient, but it's as far as I'm
willing to go in testing them, and it did actually catch a few
bugs.
a central module responsible for managing the http pool
(Puppet::Network::HttpPool), and it also handles
setting certificate information. This gets rid of
what were otherwise long chains of method calls,
and it makes the code paths much clearer.
changelog:
Modifying the behaviour of the certdnsnames setting. It now defaults
to an empty string, and will only be used if it is set to something
else. If it is set, then the host's FQDN will also be added as
an alias. The default behaviour is now to add 'puppet' and
'puppet.$domain' as DNS aliases when the name for the cert being
signed is equal to the signing machine's name, which will only
be the case for CA servers. This should result in servers always
having the alias set up and no one else, but you can still override
the aliases if you want.
are running), and #918 (service tests fail when hddtemp is not installed).
Mostly, I just rewrote the service tests, but I cleaned up the cruft from the
Service class, too.
mount, fixing #891. The patch was ported to the current
code by David Schmitt, I applied the rest of Matt's
patches, and I then fixed all of the code so that the
tests passed.
The primary change I had to make to the patch was reenabling
host expansion in paths -- his patch had disabled it.
in #744 which broke the templates.
In the process, I also added test code for the redhat interface
provider and rewrote how parsing worked to make it more testable.
from the server. The real problem was getting all of the validation
done before any caching, which required a good bit more refactoring
than I expected.
In actuality, this commit is relatively small even though it covers
many files; most of the changes just make the code clearer or shorter.
switching the node scope to no longer be lazy evaluation,
just like I switched 'main'. When I made all of these
classes and nodes lazy evaluated, I should have decoupled
my real goal (using resources to evaluate them) from the idea
of lazy-evaluating them, and this basically does that.
I also changed the scope heirarchy slightly so that scopes will
tend to be below the node scope, altho this was already generally
the case.
to Puppet::SimpleGraph, which should dramatically enhance
performance. It should be largely functionally equivalent,
with the only difference being that edges are no longer deduplicated.
to work. As a result, it involves a lot of integration-level
testing, and a lot of small design changes to make the code
actually work.
In particular, indirections can now have default termini,
so that configurations and facts default to their code terminus
Also, I've removed the ability to manually control whether
ast nodes are used. I might need to add it back in later,
but if so it will be in the form of a global setting,
rather than the previous system of passing it through 10 different
classes. Instead, the parser detects whether there are AST nodes
defined and requires them if so or ignores them if not.
About 75 tests are still failing in the main set of tests,
but it's going to be a long slog to get them working --
there are significant design issues around them, as most of
the failures are a result of tests trying to emulate both the
client and server sides of a connection, which normally would
have different fact termini but in this case must have the same
terminus just because they're in the same process and are global.
The next step, then, is to figure that process out, thus finding a way
to make this all work.
Refactored how the parser and interpreter relate,
so parsing is now effectively an atomic process (thus
fixing #314 and #729). This makes the interpreter less
prone to error and less prone to show the error to the
clients. Note that this means that if a configuration
fails to parse, then the previous, parseable configuration
will be used instead, so the client will not know that
the configuration failed to parse.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2742 980ebf18-57e1-0310-9a29-db15c13687c0