Граф коммитов

1584 Коммитов

Автор SHA1 Сообщение Дата
Paul Lathrop 9d30b26033 Fixes #1148 - replaces #!/usr/bin/ruby with #!/usr/bin/env ruby. 2008-03-28 17:43:16 -05:00
Luke Kanies a8592f1009 Merge branch '0.24.x'
Conflicts:

	install.rb
	lib/puppet/defaults.rb
	man/man8/puppet.8
2008-03-25 18:18:34 -05:00
Luke Kanies 6a535195a9 Fixing #571 -- provider suitability is now checked at resource
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.
2008-03-24 17:10:00 -05:00
Luke Kanies 528bbf1cae Fixing a couple of tests. 2008-03-24 16:37:56 -05:00
Luke Kanies 18320b8e32 Found all instances of methods where split() is used without
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.
2008-03-21 00:39:26 -05:00
Luke Kanies f6325dceb3 Found an array that leaked pretty quickly between reparsing
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).
2008-03-21 00:26:08 -05:00
Sam Quigley 54bedb2bba tweak the (already applied) patch in 388cf7c3df to resolve #1137; also, add tests which detect the problem. 2008-03-20 23:22:14 -05:00
Luke Kanies e190779842 Merge branch '0.24.x' 2008-03-20 11:55:42 -05:00
Luke Kanies 2795ba47cc fixing another failing test 2008-03-19 10:56:22 -05:00
Luke Kanies a40e9b7dc5 Fixing some tests that only failed under certain
circumstances (mostly, when loaded with other files, or
when loaded from rake or autotest rather than separately).
2008-03-18 18:16:03 -05:00
John Ferlito 388cf7c3df Regression in :node_name functionality
When :node_name="cert" is specified the 'hostname' fact should be set to the SSL certificate common name instead of the results from facter. I've extended this to also set 'domain' and 'fqdn' since that makes a lot of sense to me. This fixes a regression introduced in SVN#1673
2008-03-14 13:58:24 +11:00
Luke Kanies 495632345d Fixing #1132 -- host names can now have dashes anywhere.
(Patch by freiheit.)
2008-03-13 13:55:08 -05:00
Luke Kanies ecb873d3a6 Fixing #1118 -- downloading plugins and facts now ignores noop.
Note that this changes the behaviour a bit -- the resource's
noop setting always beats the global setting (previously,
whichever was true would win).
2008-03-13 12:36:21 -05:00
Luke Kanies 9f8bb7e42a Merge branch '0.24.x' 2008-03-07 12:28:58 -06:00
Luke Kanies 647f5b458e Always duplicating resource defaults in the parser, so that
stacked metaparameter values do not result in all resources
that receive a given default also getting those stacked
values.
2008-03-06 13:07:11 -06:00
Luke Kanies c2b33acd5c Merge branch '0.24.x' 2008-03-05 12:30:45 -06:00
Luke Kanies a7339ec5f6 Fixing a few tests 2008-02-29 13:22:55 -06:00
Luke Kanies 857814ac80 Fixing tests that did not work with Rails 2. 2008-02-29 11:51:15 -06:00
Luke Kanies 7ca0ad64f4 Fixing a test that changed the environment for all later tests,
thus breaking some of them.
2008-02-29 11:50:17 -06:00
Luke Kanies 43aea83eb1 renaming ral/types to ral/type in the tests 2008-02-28 17:53:46 -06:00
Luke Kanies bb8051bc40 Removed the loglevels from the valid values for 'logoutput'
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.
2008-02-27 15:43:09 -05:00
Luke Kanies 9d2f45df3d Merge branch '0.24.x' 2008-02-25 18:28:26 -05:00
Luke Kanies 0323986acd Merge commit 'turnbull/0.24.x' into 0.24.x 2008-02-23 19:09:29 -05:00
Luke Kanies ff97059145 Somewhat refactored fileserving so that it no longer caches
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.
2008-02-23 19:06:29 -05:00
James Turnbull 5d35bc5904 Fixes #1078 and includes new test 2008-02-23 08:41:24 +11:00
Luke Kanies b06767ee2d Quashed commit of my fixes for #1010. 2008-02-21 23:18:40 -05:00
Luke Kanies a53106cf08 Merge branch '0.24.x'
Conflicts:

	CHANGELOG
	man/man8/puppet.8
2008-02-18 09:38:32 -06:00
Luke Kanies c4f7c51800 Fixing comment -- ticket #1027 instead of #1064 2008-02-13 17:30:18 -06:00
Luke Kanies 892055709a Fixing #1064 -- providers et al are now autoloaded
from modules even when Autoload#loadall is used.
2008-02-13 17:29:23 -06:00
Luke Kanies f8afe13169 Fixed #1043 -- autoloading now searches the plugins directory
in each module, in addition to the lib directory.  The 'lib'
directory is also deprecated, but supported for now to give
people a chance to convert.
2008-02-13 16:52:26 -06:00
Luke Kanies 0cfa1d2b7a Fixed #968 again, this time with tests -- parseonly works,
including not compiling the configurations, and also storeconfigs
is no longer required during parse-testing.
2008-02-13 16:27:35 -06:00
Luke Kanies 8367fdfab2 Renaming the 'pfile' and 'pfilebucket' files to plain
'file' and 'filebucket'.  This should have been done
years ago.
2008-02-13 15:49:51 -06:00
Luke Kanies be58bb5c4b Merge branch '0.24.x' 2008-02-12 23:00:52 -06:00
Luke Kanies 98dbfa2865 Loading the mocha gem from the puppettest.rb file. 2008-02-12 23:00:40 -06:00
Luke Kanies 1b90f7f8b5 Trying to upgrade rspec, but not having much luck. 2008-02-12 22:11:30 -06:00
Luke Kanies da78d96cb1 Merge branch '0.24.x'
Conflicts:

	CHANGELOG
2008-02-12 17:37:51 -06:00
Luke Kanies 7e45553448 Fixed #997 -- virtual defined types are no longer evaluated.
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.
2008-02-12 14:57:24 -06:00
Luke Kanies c8da318a2a Moving the ast node tests to rspec (which I could have
*sworn* I did this weekend).  In the process, I fixed
a couple of bugs related to differentiating between
nodes and classes, and then cleaned up quite a few
error messages.
2008-02-12 14:19:19 -06:00
Luke Kanies 8b2fae019b Removing the last remaining vestiges of GRATR --
removing the bangs from 'add_vertex!' and 'add_edge!'.
2008-02-11 18:27:49 -06:00
Luke Kanies fd0c5cbdde Changing the name of the Compile class to Compiler,
since it's stupid to have a class named after
a verb.
2008-02-11 17:59:34 -06:00
Luke Kanies e247b56d99 Changing some methods in the Compile class to
be more internally consistent (switched store_resource
to add_resource, and store_override to add_override).
2008-02-11 17:33:12 -06:00
Luke Kanies 6a4cf6c978 Fixed #1030 - class and definition evaluation has been significantly
refactored, fixing this problem and making the whole interplay
between the classes, definitions, and nodes, and the Compile class much
cleaner.
2008-02-11 17:24:02 -06:00
Luke Kanies 3b740ff7a6 Converting the Compile class to use a Node::Catalog instance
as its resource container, instead of having its own behaviour
around resource uniqueness.
2008-02-11 13:59:25 -08:00
Luke Kanies 194e7309c9 Moving all of the tests for Puppet::Parser::Compile to
rspec, so I can refactor the class to more heavily rely
on a Node::Catalog instead of doing its own resource
container management.
2008-02-11 12:37:00 -08:00
Luke Kanies fb4bdc0b02 More AST refactoring -- each of the code wrapping classes
just returns a resource from its evaluate() method, and
all of the work is done in the evaluate_code method.  This
makes the code cleaner, because it means 1) evaluate() has
the same prototype as all of the other AST classes,
2) evaluate() is no longer called indirectly through
the Parser Resource class, and 3) the classes themselves
are responsible for creating the resources, rather than
it being done in the Compile class.
2008-02-08 13:54:53 -08:00
Luke Kanies 5a0e34b4f8 Refactoring the AST classes just a bit. I realized that
all of the evaluate() methods only ever accepted a scope,
and sometimes one other option, so I switched them all to
use named arguments instead of a hash.
2008-02-08 14:25:52 -06:00
Luke Kanies 7c500dac31 Stubbing Facter during the snippet tests, so they are faster and work with no network 2008-02-08 11:41:22 -06:00
Paul Lathrop 8f0d87d498 Added :env parameter for backwards-compatibility, with warning about deprecation. :env parameter sets new :environment parameter. Changed instances of :env to :environment for consistency with other types. Added tests for new parameters. This cimmit fixes ticket 1007. 2008-02-05 14:05:14 -08:00
Luke Kanies 1b1164d5d6 Merge branch '0.24.x' of git://wormwood.lovedthanlost.net/puppet into 0.24.x 2008-02-05 09:00:03 -06:00
James Turnbull 28a8577f82 Added hostname test for hosts type 2008-02-06 00:55:36 +11:00
Luke Kanies e96c5f8423 Merge commit 'turnbull/0.24.x' into 0.24.x 2008-02-04 23:56:35 -06:00
James Turnbull 16df87c419 Updated fix for ticket #151 and added a test 2008-02-05 13:52:12 +11:00
Luke Kanies ed0c745c0f Fixing #1017 -- environment-specific modulepath is no
longer ignored.  (Cherry-picked from master.)
2008-02-04 19:32:36 -06:00
Luke Kanies 6ff9423c7e Significantly refactoring the lexer, including adding Token and TokenList
classes for managing how the tokens work.

I also moved they tests to RSpec, but I didn't rewrite all of them.
2008-01-30 23:28:07 +11:00
Luke Kanies 7a4935f7b3 Fixing a couple of tests, one related to recent tagging changes
and one that somehow slipped through when I removed the GRATR
code.
2008-01-28 15:07:02 +11:00
Luke Kanies b225e86b12 Fixing #1017 -- environment-specific modulepath is no
longer ignored.
2008-01-20 22:00:05 -08:00
Luke Kanies 0a7b028a9a Merge branch '0.24.x' 2008-01-19 11:30:04 -08:00
James Turnbull c751058722 Removed remaining elements of old_parse - closing Ticket #990 2008-01-19 04:17:33 +11:00
Luke Kanies 4165edaeb7 More fixes to the testing. 2008-01-15 19:41:38 -08:00
Luke Kanies cfda651f88 Another round of test-fixes toward eliminating global resource
references.  This should have gotten rid of all of them,
and now it's just a question of fixing a few hopefully unrelated
failing tests.
2008-01-14 13:34:06 -08:00
Luke Kanies 488c43771a Fixing automatic relationships. I was previously looking them
up in the relationship graph, which only stores the vertices, not
the resource table.
2008-01-14 09:30:30 -08:00
Luke Kanies 5bef4a55b3 Another round of fixes toward making global resources work.
The only remaining failures are more complicated ones (which I'll
need to not be on a plane to debug, for battery reasons) or those
related to the broken directory_service providers.
2008-01-09 13:03:15 -08:00
Luke Kanies 3cc3e0f5b2 Lots o' bug-fixes toward getting rid of global resources.
We still have about 60 failing tests, but some of them are
the failing directory service tests (probably 20 or so),
and most are simple fixes to the tests themselves.
2008-01-08 09:23:34 -06:00
Luke Kanies 40addcd192 Fixing #982 -- I have completely removed the GRATR graph library
from the system, and implemented my own topsort method.
2008-01-07 19:24:10 -06:00
Luke Kanies 4e8bc40ad7 Fixing the inability to manage '/' directly. It was a result
of stripping extra and trailing slashes.
2007-12-27 21:35:42 -06:00
Luke Kanies c59ff622a3 Further fixes toward #965. Turned out that the previous fix
caused other problems.

This whole thing will hopefully get *drastically* easier once we
get rid of global resources.
2007-12-21 17:52:06 -06:00
Luke Kanies 927cb24c0a Fixing #967 -- default resources no longer conflict with
managed resources.
2007-12-19 13:43:22 -06:00
Luke Kanies 553b2ad8ad Entirely refactoring http keep-alive. There's now
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.
2007-12-19 11:42:22 -06:00
Luke Kanies 92b0ebc7b7 Fixing #967 -- relationships now work when running 0.23.x clients
against 0.24.0 servers.
2007-12-18 16:47:36 -06:00
Luke Kanies 1ada24d4d4 Fixing some tests that were failing with the recent ruby that has
ssl issues.
2007-12-18 16:44:55 -06:00
Luke Kanies e0f5444021 Fixing the webrick test to provide a correct host
name so the stupid ssl checks pass during the test.
2007-12-12 16:58:08 -06:00
Luke Kanies cb0c4eebb0 Renaming 'configuration' to 'catalog', fixing #954. 2007-12-11 15:35:36 -06:00
Luke Kanies 02b64ab3bc Applying patch by josb in #884 to provide pattern
matching in the tidy type.
2007-12-11 00:36:44 -06:00
Luke Kanies f127d04934 Fixing #951 -- external nodes work again, but you have to
set the 'node_terminus' setting to 'exec'.
2007-12-10 21:13:48 -06:00
Luke Kanies ae33e57d1b Fixing #923 (again). The host storage method was not
correctly searching for the host, so it was creating
a new host on each run, which is what was causing the
conflict.
2007-12-10 12:16:08 -06:00
Jeffrey J McCune a012849e9c Updated tests for http_enable_post_connection_check configuration setting. 2007-11-29 17:15:15 -05:00
Jeffrey J McCune 4d4abd36b8 Better test to match the behavior of the code. 2007-11-29 09:48:17 -05:00
Jeffrey J McCune 24cacdbde3 Fixed test case for http_enable_post_connection_check 2007-11-29 09:43:32 -05:00
Luke Kanies 8eecbe54c9 Fixing another failing test I somehow missed in my last big commit 2007-11-28 19:03:32 -06:00
Luke Kanies dedc56a6ae Fixing #527 (rewrote service tests), #766 (services only restart when they
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.
2007-11-28 18:38:48 -06:00
Luke Kanies 11ae473e38 Theoretically, this patch is to fix #917 (which it does), but
there were enough problems fixing it that I decided something
more drastic needed to be done.

This uses the new Puppet::ResourceReference class to canonize
what a resource reference looks like and how to retrieve resources
via their references.  Specifically, it guarantees that resource types
are always capitalized, even when they include '::' in them.

While many files are modified in this commit, the majority of changes are
quite small, and most of the changes are fixing the tests to use
capitalized types.

As we look at consolidating some of our resource types, we could consolidate
the ResourceReference stuff at the same time, but at least the
Puppet::Parser::ResourceReference class subclasses the main Puppet::ResourceReference
class.
2007-11-28 15:20:52 -06:00
Luke Kanies c6d1746199 Fixing the first half of #917 -- the ResourcReference
AST code now correctly finds the resource.  It's getting
lost in the configuration translation, though, so I
need to fix that, too.
2007-11-28 11:47:34 -06:00
Luke Kanies 6c1d8d3bc4 Applying fix to xmlrpc client tests by Matt Palmer 2007-11-27 21:37:59 -06:00
Luke Kanies 4e52ffc680 Fixing #796 -- the fileserver can now start with no
configuration file (it creates both default mount points
if it does) and puppetmasterd no longer requires the
configuration file to exist.
2007-11-27 18:37:46 -06:00
Luke Kanies 168fa5f912 Fixing the asuser method in Puppet::Util::SUIDManager
so that it correctly just yields if you're not root.  It
also no longer tries to set :uid or :gid; just :euid and :egid,
and it once again sets :egid before it sets :euid, which is
important because you usually can't change your group after
you've changed your user id.
2007-11-27 18:35:25 -06:00
Luke Kanies 0ef6b9579d Fixing #931 by keeping track in configurations of
what transportable resources get converted to, so
different names don't throw it off.

I also got rid of the Puppet::Type#merge method, which
has been deprecated for ages but was still in there.  I
had to fix a few tests that weren't cleaning up after themselves
as a result.
2007-11-27 17:24:13 -06:00
Luke Kanies a38b415124 Fixing #927 -- rewriting the test to actually test what it's
supposed to be doing and to skip the whole network connect thing.

FTR, the reason this is happening is because the keepalive patch
causes http instances to start immediately, which wasn't previously
the case. I have been noticing that not all failures that should
result from this happen consistently.
2007-11-27 13:57:05 -06:00
Luke Kanies 7ff8ea5a1a Fixing the persistent and periodic schedule test failures
by rewriting the schedule tests entirely.
2007-11-27 13:49:05 -06:00
Luke Kanies 2cb1199478 Fixing the breakage that I caused when I added the 'declared_feature?'
method to provider features.
2007-11-26 22:57:33 -06:00
Luke Kanies 2d19ee2a04 Fixing #920 -- I have replaced the existing mount test with an
rspec version.  It's not perfect, in that it only tests
the :ensure state, but that's where 90% of the behaviour is.
2007-11-26 22:48:44 -06:00
Luke Kanies c3dde68315 Fixing #919 -- installed packages used for testing are just ignored,
rather than throwing a failure.
2007-11-26 19:51:15 -06:00
Luke Kanies 12ebbe2442 Rewriting the tests for the package resource type, fixing #930. 2007-11-26 19:27:30 -06:00
Luke Kanies fc7f1b4f70 Fixing #921, mostly by just deleting the existing test. I had
already migrated all of the tests into rspec but forgot about these
tests -- they were only in the rails/ subdir because people kept
not running the parser/ tests after modifying the Rails code.
2007-11-26 15:26:05 -06:00
Luke Kanies 4e9c39e6a7 Merge branch 'plugins_mount', fixing #891.
Conflicts:

	CHANGELOG
2007-11-24 23:17:57 -06:00
Luke Kanies b575d15853 Integrating Matt Palmer's patch to provide a 'plugins'
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.
2007-11-24 23:16:47 -06:00
Luke Kanies 676efa77b2 Incorporating patch 20071030034736-6856b-6004090b3968cdbf7d366a03ee1c44e2160a3fe0.patch
from womble, and rewriting and significantly enhancing the
unit tests for the Puppet::Parser::Collector class; it should
have full coverage now.  There are no integration tests for
it, so there's still no guarantee that it works at all, but hey,
we're a lot better off than we were.
2007-11-24 18:03:55 -06:00
Luke Kanies 8de1412d97 Integrating most of Matt Palmer's from
http://theshed.hezmatt.org/mattshacks/puppet/_patches/puppet-0.23.2/.

There are still a few that haven't made it in, notably those related
to the plugins module, which I'm planning on integrating separately.
2007-11-24 14:54:38 -06:00
Luke Kanies a525ab5f1d Fixing a couple of tests that were failing because of the environment changes. 2007-11-23 16:45:28 -06:00
Luke Kanies 3d2e1a535b Adding some unit tests for the interface type before i go messing around with it 2007-11-23 12:27:24 -06:00
Luke Kanies cc88441a61 Removing the manual ssldir setting by David in 59626cb390 2007-11-19 16:34:09 -06:00
Luke Kanies 7e0e6c0dff Merge commit 'davids-bugfixes/tests/fix-test-client-ca' 2007-11-19 16:33:03 -06:00
Luke Kanies 1bf3999ec0 Fixing a failing test from my fix for #446 -- I had changed
the behaviour of Resource#override_parameter unintentionally.
I've corrected the comments so it's clear why the original behaviour
was there.
2007-11-19 16:30:20 -06:00
Luke Kanies 3f0b250f66 Fixing a few test suites that passed when run as
part of the suite, but failed when run individually.  The
problem was that I changed lib/puppettest/support/utils to
have a separate module and I didn't test the individual files.
2007-11-19 16:20:03 -06:00
Luke Kanies 8f82fc4284 Merge commit 'davids-bugfixes/tests/fix-cron-tests' 2007-11-19 10:30:12 -06:00
Luke Kanies 2b14f627ac Reverting the changes I'd made toward removing the global
resources.  These are commits:

    c19835ce9f
    9290cc89a2
    ffb4c2dbc7
2007-11-19 01:36:48 -06:00
Luke Kanies 8838e9bb7c Merge commit 'davids-bugfixes/rest/fix-815-by-using-main-explicitly' 2007-11-18 23:25:04 -06:00
Luke Kanies c19835ce9f Fixed most failing tests, but there are still over thirty failing.
At this point, I'm holding the experiment until after the release,
so I'm committing this for now and will take it back up after 0.24.0
is out.
2007-11-18 11:21:22 -06:00
Luke Kanies b65fb8316e Fixing a parser test -- really, just removing tests
that belong with the AST classes rather than in the parser.

Yeah, these tests need to be rewritten.

Committed on an airplane. :)
2007-11-13 10:34:50 -06:00
Luke Kanies 72510bfaa6 Fixing #800 by refactoring how configurations are retrieved
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.
2007-11-12 22:08:44 -06:00
Luke Kanies dd7caa76e1 Moving some compile tests to the spec/ directory, and
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.
2007-11-12 11:00:54 -06:00
Luke Kanies 47a26054fe Changing the 'main' class to no longer be lazy-evaluated.
It was getting evaluated after node classes, which caused
even stranger ordering issues.
2007-11-12 10:09:05 -06:00
David Schmitt 59626cb390 fix failing CA test, when testing with incomplete setup (no ssldir, no DNS)
3) Failure:
test_webxmlmix(TestBucket)
    [./network/handler/bucket.rb:222:in `test_webxmlmix'
     /home/david/Work/puppet/misspiggy/puppet-luke/test/lib/mocha/test_case_adapter.rb:19:in `__send__'
     /home/david/Work/puppet/misspiggy/puppet-luke/test/lib/mocha/test_case_adapter.rb:19:in `run']:
Exception raised:
Class: <OpenSSL::SSL::SSLError>
Message: <"hostname was not match with the server certificate">
---Backtrace---
/usr/lib/ruby/1.8/openssl/ssl.rb:91:in `post_connection_check'
/usr/lib/ruby/1.8/net/http.rb:588:in `connect'
/usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
/usr/lib/ruby/1.8/net/http.rb:548:in `start'
/home/david/Work/puppet/misspiggy/puppet-luke/lib/puppet/network/xmlrpc/client.rb:141:in `start'
/home/david/Work/puppet/misspiggy/puppet-luke/lib/puppet/network/client.rb:95:in `initialize'
/home/david/Work/puppet/misspiggy/puppet-luke/lib/puppet/network/client/dipper.rb:16:in `initialize'
./network/handler/bucket.rb:223:in `new'
./network/handler/bucket.rb:223:in `test_webxmlmix'
./network/handler/bucket.rb:222:in `test_webxmlmix'
/home/david/Work/puppet/misspiggy/puppet-luke/test/lib/mocha/test_case_adapter.rb:19:in `__send__'
/home/david/Work/puppet/misspiggy/puppet-luke/test/lib/mocha/test_case_adapter.rb:19:in `run'
---------------
2007-11-11 10:16:37 +01:00
David Schmitt d48ee3e0f6 fix crontests depending on ENV[USER] by using Etc.getpwuid(Process.uid) instead 2007-11-11 09:54:18 +01:00
David Schmitt 61ef2893c5 fix #815: add :main to all use() for :reporting and :metrics 2007-11-09 18:29:04 +01:00
Luke Kanies 964aebb964 Merge branch 'master' of ssh://reductivelabs.com/opt/rl/git/puppet 2007-11-08 16:31:03 -06:00
Luke Kanies 8f04446c94 Fixing the 'mount' tests so that they no longer
modify the local system and they run fine as
non-root users.
2007-11-08 16:30:51 -06:00
Luke Kanies ba19989c6e Switching the class resource evaluation to only happen
when using :include, not (for example) when evaluating
node classes.
2007-11-08 15:58:45 -06:00
Luke Kanies cf75168dc2 Classes once again get evaluated immediately when the
'include' function is used, instead of being lazy-evaluated.

Previous work caused resources to get created to model
these classes, but in the process, I removed the fact
that the classes were evaluated immediately.  This meant
that you couldn't guarantee that a class was evaluated
before you went to use its variables.
2007-11-08 15:54:14 -06:00
Luke Kanies dfe774f55e Switching the base class for the Relationship class.
It was previously using the GRATR::Edge class, which
had wonky overrides that dramatically slowed down
sorting (its hash mechanism hashed the source and
target so that edges with the same source/target got
the same hash, which we actually don't want any more).

This shouldn't change any functionality, just performance.

I didn't retain all functionality from the Edge class, but
a lot of that functionality was, um, horrible, like Edge[]
being equivalent to Edge.new.
2007-11-08 12:18:42 -06:00
Luke Kanies 1ffcce079f Splitting the puppetd tests into two tests. It is still not a very good test, but I do not know of a good way to test this, really. 2007-11-08 11:24:46 -06:00
Luke Kanies 065a1d0281 Switching the graph base class from GRATR::Digraph
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.
2007-11-07 17:48:50 -06:00
Luke Kanies d03f68eaed Changing the test/ classes so that they work from the main
test/ dir or from their own working dir, like the specs do.
This was just a question of changing how their libraries
are loaded.
2007-10-26 11:26:57 -05:00
Luke Kanies 694f98b4d9 Fixing failing tests, including making the debian service
provider test work on non-Debian platforms.
2007-10-13 14:14:06 -05:00
Luke Kanies 29feac0cec Translating the report handler to an indirected model.
I've provided backward compatibility with the old
handler.

The only terminus type that currently exists for reports
is the 'code' terminus, which is used to process reports
in the style of the old handler.  At some point, we should
likely switch at least some of these report types (e.g., 'store')
to terminus types.
2007-10-13 14:07:24 -05:00
Luke Kanies 9db7aae242 Merge branch 'master' of git://michaelobrien.info/puppet into michael 2007-10-09 12:02:37 -05:00
Luke Kanies 32753e11d9 Merge branch 'master' of git://michaelobrien.info/puppet into michael 2007-10-09 10:54:21 -05:00
Michael V. O'Brien d4871bf5fb Merge branch 'parser-absent' of http://marcin.owsiany.pl/tmp/puppet into porridge 2007-10-09 10:43:17 -05:00
Luke Kanies 01f132d8b8 Merge branch 'master' of git://michaelobrien.info/puppet 2007-10-09 10:04:01 -05:00
Luke Kanies d24c1ccc56 All tests should now pass again.
This is the first real pass towards using caching.  The `puppet`
executable actually uses the indirection work, instead of
handlers and such (and man! is it cleaner).

Most of this work was a result of trying to get the client-side
story working, with correct yaml caching of configurations, which
means this commit also covers converting configurations to yaml,
which was a much bigger PITA than it needed to be.

I still need to write integration tests, and I also need to cover
the server-side story of a normal configuration retrieval.
2007-10-08 19:12:39 -05:00
Michael V. O'Brien 7ac7872c74 Fixed #822. Applied patch provided by DavidS. 2007-10-08 11:13:50 -05:00
Marcin Owsiany d055cbc8ca Make it apparent that absent fields in a record have a value of :absent, which is different from what appears in a line. 2007-10-06 13:24:01 +01:00
Rick Bradley a7d220b828 Moving the webrick/mongrel "servers" over to HTTPServer module instead of Server. Using Server as the master class for client connections. Server (former RESTServer) will instantiate the appropriate subclass based upon Puppet configurator setting. There are now tests broken in the network section which I can't seem to figure out yet. Not a happy place to be. 2007-10-05 19:51:47 -05:00
Luke Kanies f084d83df1 Another round of test-fixing around the changes I made
to the configuration system.  'puppet' itself still
works, even with -e, but I expect that puppetd and
puppetmasterd are broken, and there are still quite a few
broken tests because the default fact store can't write but
that's the default behaviour for a networked configuration
master.
2007-10-05 14:25:29 -05:00
Luke Kanies 9c58c476c2 Adding a :code setting for specifying code to run
instead of a manifest, and removing all of the ambiguity
around whether an interpreter gets its own file specified
or uses the central setting.

Most of the changes are around fixing existing tests to use this new system.
2007-10-05 11:46:35 -05:00
Luke Kanies 0e336bf62b This commit is focused on getting the 'puppet' executable
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.
2007-10-05 00:07:38 -05:00
Michael V. O'Brien 19ad238f16 Fixed #827. Applied a form of the patch provided by porridge and
wrote a test.
2007-10-04 14:42:45 -05:00
Luke Kanies 9236179fad Attempting to reproduce and fix #829 by applying patch by Paul. I could not
get a test to show the exception, nor could I figure out how the coding bug
could have actually had an impact, but it's an innocent-enough fix, so I'm fine
applying it.
2007-10-04 12:53:09 -05:00
Luke Kanies 35718437c4 Merge branch 'master' of ssh://reductivelabs.com/opt/rl/git/puppet
Conflicts:

	lib/puppet/defaults.rb
	lib/puppet/dsl.rb
2007-10-03 22:29:05 -05:00
Luke Kanies fd11603fe4 Removing the Id tags from all of the files 2007-10-03 21:55:41 -05:00
Luke Kanies bb3b3cedf4 I finally tracked down the problem that was causing providers
to sometimes suddenly disappear and thus tests to fail --
Kernel.require was not loading the normal ruby path (e.g.,
'puppet/type/cron'), so if someone else loaded that then
it would replace the in-memory type with a new one, but that
new one couldn't load its own providers, because the Kernel
would ignore the providers, thinking they were already loaded.

This doesn't fix all of the autoloading problems, but at least
we won't suddenly break a ton of tests.
2007-10-03 19:36:35 -05:00
David Lutterkort f1ec23a0e2 Merge branch 'master' of git://reductivelabs.com/puppet 2007-10-02 15:25:11 -07:00
David Lutterkort 8722e439b7 Use external helper script to talk to yum; should avoid any more trouble with "yum list". Fixes trac #836
Signed-off-by: David Lutterkort <dlutter@redhat.com>
2007-10-02 15:24:08 -07:00
Rick Bradley 1174d99acb Fixed a failing test where we presumed that non-string Fact values would have type preserved across a P::N::Client.master.facts call, which is not true. 2007-10-02 14:49:38 -05:00
Rick Bradley 7fe18e3ffb Fixed a test which was secretly sneaking off and pulling certs from ~ if they were there: Added set_mygroup method, removed duplicate setme method. Included PuppetTest in the XMLRPC servlect test. 2007-10-02 14:41:11 -05:00
Luke Kanies 4679f4dcc1 Merge branch 'indirection' of git://reductivelabs.com/puppet-luke 2007-09-25 00:43:15 -05:00
Luke Kanies 3a18348fdb Renaming the 'Puppet::Util::Config' class to
'Puppet::Util::Settings'.  This is to clear up
confusion caused by the fact that we now have a
'Configuration' class to model host configurations,
or any set of resources as a "configuration".
2007-09-22 17:54:46 -05:00
Luke Kanies d6e91ae786 Merge branch 'configurations' into indirection
Conflicts:

	lib/puppet/defaults.rb
	lib/puppet/indirector/facts/yaml.rb
	spec/unit/indirector/indirection.rb
	spec/unit/indirector/indirector.rb
2007-09-22 15:04:34 -05:00
Luke Kanies 86dde63473 All tests now pass in this configuration branch, which means
it's time to merge it back into the indirection branch.

Considering that this work was what drove me to create the
indirection branch in the first place, i should now be able to
merge both back in the master branch.
2007-09-22 14:25:17 -05:00
Luke Kanies 60cd6a73b2 The structure for handling resource generation is now
in place, which means I'm over the hump in developing
this branch.

I have to fix some design flaws I made in the configurations,
particularly that the 'runner' handler needs to be able to
specify tags and whether to ignore schedules, but otherwise,
I think it's straightforward test- and bug-fixing from here out.
2007-09-22 12:56:32 -05:00
Luke Kanies 46d69068fa An intermediate commit so I can start working on a different
branch.  The file recursion code actually works for the first
time in a painful while, but there are still some quirks and design
issues to resolve, particularly around creating implicit resources
that then fail (i.e., the behaviour of the create_implicit_resource
method in Configuration).
2007-09-20 12:57:57 -05:00
Luke Kanies 9fa2628a84 This is basically another intermediate commit. I feel like
I've gone too far down the rabbit hole to turn back now, but the
code is clearly getting more centralized around the Configuration
class, which is the goal.

Things are currently a bit muddy between recursion, dynamic resource
generation, transactions, and the configuration, and I don't expect
to be able to clear it up much until we rewrite all of the tests
for the Transaction class, since that is when we'll actually be
setting its behaviour.

At this point, Files (which are currently the only resources that
generate other resources) are responsible for adding their edges
to the relationship graph.  This puts them knowing more than I would
like about how the relationship graph works, but it'll have to do for now.

There are still failing tests, but files seem to work again.  Now to
go through the rest of the tests and make them work.
2007-09-17 15:21:44 -07:00
Luke Kanies f17f19dae9 The whole system now uses Configuration objects instead of
ever converting the Transportable objects into a tree of components
and then converting that into a graph.  This is a significant
step, and drastically simplifies the model of how to use a configuration.
The old code might have looked something like this:

    file = Puppet::Type.create :path => "/whatever", ...
    comp = Puppet::Type.create :name => :whatever
    comp.push file
    transaction = comp.evaluate
    transaction.evaluate

The new code looks like this:

    file = Puppet::Type.create :path => "/whatever", ...
    config = Puppet::Node::Configuration.new
    config.add_resource file
    config.apply

I did not really intend to do this much refactoring, but I
found I could not use a Configuration object to do work
without refactoring a lot of the system.  The primary problem
was that the Client::Master and the Config classes determined
how the transactions behaved; when I moved to using a Configuration,
this distinction was lost, which meant that configurations were
often needing to create other configurations, which resulted in
a whole lot of infinite recursion (e.g., Config objects that create
directories for Puppet use Configuration objects -- yes, I'm
s/Config/Settings/g soon -- and these Configuration objects would
need to create directories).

Not everything is fixed, but it's very close.  I am clearly over
the hump, though, so I wanted to get a commit in.
2007-09-15 22:17:20 -06:00
Luke Kanies 43f22a2414 Adding a to_graph method to TransBuckets, so that the buckets can directly generate a graph, rather than having to first convert to RAL types and then have them convert to a graph. This allows us to make it so components do not need a @children array at all. This was all done because I am having the "already a parent of" problem again, and I have gotten far enough that it is relatively easy to just make this problem go away once and for all. 2007-09-12 18:32:26 -05:00
Luke Kanies a6fe70054f Another intermediate commit. The node and fact classes are now functional and are used instead of the network handlers, which have been removed. There are some failing tests as a result, but I want to get this code committed before I massage the rest of the system to make it work again. 2007-09-12 15:32:25 -05:00
Luke Kanies 3b3065bc73 Refactoring the feature support so it loads libraries when a feature is asked about, rather than when it is defined. 2007-09-11 18:48:30 -05:00
Luke Kanies c319fd059d Merge branch 'testing' 2007-09-11 16:34:07 -05:00
Luke Kanies 65c1501504 The Node handler is now obsolete. Node searching is handled through the indirector. I have not yet added the tests for the node handlers themselves, which is next. 2007-09-11 16:19:03 -05:00
Luke Kanies 5aa4440b6f Doing an intermediate commit so rick can look at the work I have done so far. 2007-09-11 12:38:56 -05:00
Luke Kanies bb69a1f08a Renaming the instance loader method to "instance_load". It was previously autoload, which could class with Kernel.autoload. 2007-09-10 17:58:23 -05:00
Michael V. O'Brien 19a748bb9e Removed TYPE token, replacing it with CLASSREF token, in the grammar and lexer. Updated CLASSREF token regex in the lexer. 2007-09-10 14:28:02 -05:00
Michael V. O'Brien 041393d146 Fixed #774, which fixed fully qualified collection statements 2007-09-10 12:33:26 -05:00
Luke Kanies 6700adcacd *Finally* fixing the tests that were failing around users and groups. The problem was that the autoload tests were somehow clearing all loaded classes, including the providers. This is fixed now. 2007-09-07 15:38:24 -05:00
Luke Kanies 9af79f1172 Fixing some failed tests. Mostly cleanup. Next is to make all of the user tests pass again, dammit. 2007-09-07 12:10:59 -05:00
Luke Kanies 50874b2f18 Fixing a path test. I have now made the path stuff a lot cleaner, but it apparently broke this test. 2007-09-07 11:00:13 -05:00
Luke Kanies ca57c793d4 Fixing #801 -- resources that have changes when running in noop mode do not record that they were checked, so that they will be scheduled on the next run. This is a somewhat murky solution, but considering that no one had submitted this bug before, I expect it will not hit many people. 2007-09-07 10:58:07 -05:00
Luke Kanies caad11a9d1 Fixing some broken tests in the master client, and adding a test for #800 but it is unfortunately disabled because we cannot realistically fix it using the current design. It will be easy after the REST refactor, though. 2007-09-06 20:50:26 -05:00
Luke Kanies 7abc78ad25 Fixing #795 -- configuration elements now make sure all file paths are fully qualified by prepending the wd to unqualified path names. 2007-09-06 20:12:30 -05:00
Luke Kanies 4212f9c225 Fixing #802 -- tags are now applied before parent classes are evaluated, so parent classes can use tagged() to test if a node is a member of a subclass. 2007-09-06 20:00:24 -05:00
Luke Kanies b7f42441b9 Renaming some ast resource classes and files so they make a lot more sense. 2007-09-06 18:53:00 -05:00
Luke Kanies 653c1514b6 Fixing #806. Resources correctly look up their fully qualified definition type, just like resource references do, which causes the resource and reference to again agree on the full name of a given defined type. 2007-09-06 18:45:41 -05:00
Luke Kanies b0a947589e Flipped the switch so that compiles now return a Configuration instance instead of pre-extracting the configuration. 2007-09-04 16:59:30 -05:00
Luke Kanies 11b127bd67 Successfully modified all tests and code so that all language tests pass again. This is the majority of the work necessary to make the separate "configuration" object work. 2007-09-04 15:14:39 -05:00
Luke Kanies 3b2efd2a4b We now have a real configuration object, as a subclass of GRATR::Digraph, that has a resource graph including resources for the container objects like classes and nodes. It is apparently functional, but I have not gone through all of the other tests to fix them yet. That is next. 2007-09-04 12:09:48 -05:00
Luke Kanies 0faf76ee18 More refactoring. I have removed a few more extraneous methods from Scope, mostly just pointing directly to the compile, and I have begun (but commented out) the move to having resources to model each of the classes and nodes, in addition to the definitions. This will, again, enable a real Configuration object, and it will enable class versioning and similar features. 2007-09-03 19:38:15 -05:00
Luke Kanies 9d70b9746c Removing the Scope#setresource method, since it was essentially redundant. The work is done in either AST::ResourceDef#evaluate or Compile#store_resource. 2007-09-03 18:20:04 -05:00
Luke Kanies b021587e30 Doing a small amount of refactoring, toward being able to use Parser resources to evaluate classes and nodes, not just definitions. This will hopefully simplify some of the parsing work, and it will enable the use of a Configuration object that more completely models a configuration. 2007-09-03 18:01:00 -05:00
Luke Kanies 25f6d7c521 Deleting old documentation that somehow made it back into the tree in the switch to git, and refactoring the evaluate_classes method on the compile object so I can use resources as intermediaries, thus making classes do late-binding evaluation. 2007-09-01 09:51:03 -05:00
Luke Kanies 6832a4b08e Fixing some failing unit tests. 2007-08-28 16:15:05 -05:00
Luke Kanies 2625eb1db7 Making a couple of small bugfixes in the configuration subsystem 2007-08-27 17:38:39 -05:00
Luke Kanies 1de5ae0da0 Adding support for providing a diff when files are being changed. Currently uses a local diff binary, but could easily be changed to use the ruby diff/lcs library. Modified puppet and puppetd to automatically show file diffs when in noop mode, but can otherwise be enabled using --show_diff. This only works when running interactively, because the diffs are printed on stdout. 2007-08-27 14:26:49 -05:00
Luke Kanies 11081ce886 Multiple environment support now works, and I have even tested it in real life. This commit is mostly a bug-fix commit, resulting from the difference between real-life testing and unit testing. 2007-08-26 21:54:17 -05:00
Luke Kanies 9ea8e6cc87 The fileserver now uses an environment-specific module path. I also made various bug fixes around the network tree. 2007-08-26 19:03:25 -05:00
Luke Kanies a8f2a33c7e Moving the node tests to rspec, and cleaning up the spec of the node, especially WRT the environment. 2007-08-26 12:53:36 -05:00
Luke Kanies 9df4fd1f21 And we have multiple environment support in the parser. The only remaining piece to make this complete is to add multiple environment support to the fileserver. I also renamed Configuration.rb to Compile.rb (that is, I fixed all the classes that used to know it as a configuration). 2007-08-25 17:14:13 -05:00
Luke Kanies 37f0eed965 Renaming the "configuration" object to "compile", because it is only a transitional object and I want the real "configuration" object to be the thing that I pass from the server to the client; it will be a subclass of GRATR::Digraph. 2007-08-25 15:54:06 -05:00
Luke Kanies 3030d3eb3f Modules are now tested with spec, and they now can handle environment-specific module paths. 2007-08-25 15:47:49 -05:00
Luke Kanies c6e201cdd4 I have added basic support for a search path, altho not yet with any ability to manipulate it. All config tests pass in both the old tests and the new ones, so it is time to add the hooks for manipulating the search path. 2007-08-24 18:31:00 -05:00
Luke Kanies 520aaafbb8 Adding some rspec tests for Config.rb, because I am planning on significantly changing its internals and the current tests, I think, will be harder to migrate than just writing rspec tests from scratch. 2007-08-23 19:09:45 -05:00
Luke Kanies 724fef1269 Everything up to the parser (and the Modules) is ready to support multiple environments, including the parser having an environment setting. I have also created my first spec-based tests, for the interpreter (and deleted the old test/unit tests). 2007-08-23 13:25:40 -05:00
Luke Kanies 58494cc856 Building a stand-alone spec directory for creating the new spec-based tests. 2007-08-23 11:52:31 -05:00
Luke Kanies d59315a07a Adding the second half of the rspec upgrade -- apparently the "git add" thing I used did not remove the old files, only add the new ones. 2007-08-23 01:17:33 -05:00
Luke Kanies 5601ecf75d Upgrading rspec to version 1.0.8. This only includes the contents of the lib directory, and even then only the spec-related stuff, not the autotest stuff. 2007-08-23 00:56:42 -05:00
Luke Kanies 7c4d39ec09 Adding environment information to the client fact list. The environment is retrieved from the normal Puppet configuration, so it is set via puppet.conf or the cli, rather than being a normal fact. 2007-08-22 22:13:23 -05:00
Luke Kanies b599862fc8 Fixing the integration test between interpreter and configuration -- the interpreter was not passing on that the config should use ast nodes 2007-08-22 21:39:21 -05:00
Luke Kanies eeedb9200f Merge branch 'master' of ssh://reductivelabs.com/home/michael/git/puppet 2007-08-22 19:00:48 -05:00
Luke Kanies b9f529a063 Merging the multi_env branch with master. There are not actually any conflicts, so this commit might only be necessary because I did not pull sufficiently often. 2007-08-22 18:07:52 -05:00
Luke Kanies 8b3361afae The last commits before I actually start on the multi-environment support. There are still failing tests, but apparently only those that are also failing in trunk. 2007-08-22 17:57:28 -05:00
Luke Kanies f1727f18ab Adding the topscope metadata to the configuration being returned to the client, just like it expects, and fixing how the resource handler calls the master type. 2007-08-22 16:14:39 -05:00
Michael V. O'Brien efcd1e88f7 Fixed CA race condition (#693) 2007-08-22 11:31:25 -05:00
Luke Kanies 4eb87ed7c8 A round of bugfixing. Many more tests now pass -- I think we are largely down to tests that (yay!) fail in trunk. 2007-08-20 22:25:00 -05:00
Luke Kanies 2a4e1011db All language tests now pass. I expect there are other failures elsewhere, but I want to commit this before delving into them. My method for fixing the tests was to do as little as possible, keeping the tests as bad or as good as they were before I started. Mostly this was about changing references to the interpreter into references to the parser (since that is where the new* methods are now for ast containers) and then dealing with the new config object and its relationship to scopes. 2007-08-20 19:09:26 -05:00
Luke Kanies 6467c21e15 The first pass where at least all of the snippet tests pass. I have unfortunately had to stop being so assiduous in my rewriting of tests, but I am in too much of a time crunch to do this "right". The basic structure is definitely in place, though, and from here it is a question of making the rest of the tests work and hopefully writing some sufficient new tests, rather than making the code itself work. 2007-08-20 13:28:40 -05:00
Luke Kanies a846ea900f The new parser configuration object works now,
but the rest of the compiling process is hosed
(although the parser itself should still be fine).

The configuration object is unifying a lot of work
that was scattered around either the interpreter or
the scopes, and it simplifies the whole system.

However, its new simplicity has made the complexity
of the rest of the system that much more apparent,
and I am resolved to fixing the system rather than
hacking it sufficiently to just make it work.
2007-08-16 21:21:40 -05:00
Luke Kanies 282ec893ef Fixing the spec library so it correctly can see its version 2007-08-16 00:00:28 -05:00
Luke Kanies 1527f4a615 Adding node caching, so that node sources are not spammed during file serving and such 2007-08-15 17:18:43 -05:00
Luke Kanies a9539548d9 Keeping the node names in the node object, so that they are available to the interpreter 2007-08-15 17:05:49 -05:00
Luke Kanies 297dabb637 Refactoring a small part of the interface between the configuration handler and the interpreter. 2007-08-15 16:56:05 -05:00
Luke Kanies 901ae687eb Requiring mocha in all cases in the test tree 2007-08-15 16:32:06 -05:00
Luke Kanies 70dffdde70 The new configuration handler looks to be ready for usage. Now I just need to convert the interpreter to use SimpleNode objects, then continue with the Configuration object. 2007-08-15 16:31:44 -05:00
Luke Kanies aabad8e1e2 Adding the necessary name/ip fields to the node methods 2007-08-15 14:21:59 -05:00
Luke Kanies 65559af75e Adding a "none" node source, which will be the default node source and will just return an empty node. 2007-08-15 13:55:55 -05:00
Michael V. O'Brien 2ff15c015b Added shortname support to config.rb and refactored addargs 2007-08-14 18:35:32 -05:00
Luke Kanies 90a9d09cd0 Finalizing the node handler. It now correctly uses the different node sources
and knows how to retrieve data from those sources.  Now I just need to fix
the language stuff to use this handler instead of the existing node stuff.
2007-08-14 18:25:08 -05:00
Luke Kanies aab419b8c1 An intermediate commit in the work towards adding multi-environment support.
This has required splitting the interpreter up considerably, which is much
cleaner but is a large project.  There is now a 'nodes' handler, but it is
currently non-functional, although all the support structure is there.  It just
needs to have the individual methods fleshed out, and it needs to be connected
to the 'facts' handler.
2007-08-14 00:09:49 -05:00
Luke Kanies ab42534ae2 Applying patch by Adam Jacob to make external node tools able to handle command-line arguments 2007-08-13 14:50:22 -05:00
christian 6ab30eb649 Fix for setting global exit code ($?) in SUIDManager tests
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2767 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-10 03:01:55 +00:00
(no author) 0195893a75 Broaden assert_absent so that it thinks that :purged is equivalent to :absent
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2766 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-09 22:44:21 +00:00
(no author) 6a78648fc9 Change the service name so that it is less likely to trip on a common word and spuriously fail
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2765 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-09 21:43:42 +00:00
(no author) d2f2bc0ee4 Trivial mock cleanups
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2763 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-09 09:41:25 +00:00
(no author) 13f358d92e Highlight what I think is a problem in the test suite that I just can't solve
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2760 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-09 08:49:49 +00:00
christian 3de4829cf0 Refactor SUIDManager tests to run without root, change SUIDManager's behavior to not silently fail when it's not root and fix all other tests that broke as a result.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2759 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-09 08:45:50 +00:00
(no author) 5a25701723 Upgrade mocha to 0.5.1, which gives much better error messages
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2758 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-09 08:41:54 +00:00
luke b84015af89 The last set of bug-fixes before the next release. This commit just fixes a couple of problems that resulted when I changed the Provider#initialize method to not duplicate its argument, which was necessary for ParsedFile.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2753 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-07 02:38:45 +00:00
luke aaf5959fe3 Adding test support for the other mongrel configuration header
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2752 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-06 20:05:28 +00:00
luke 5e419cf750 Fixing #749 -- environment settings no longer accumulate. Significantly adding to the cron tests at the same time, such that hopefully we will no longer have these recurring bugs. I now do every combinatorial of multi-line cron jobs, including doing them all in one file. There are, unfortunately, still edge cases, but maybe we will have some peace in cron space for a while, anyway.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2750 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-06 17:59:37 +00:00
luke 22e7b39087 Fixing #751 -- the interface providers now have basic tests, at least to verify that prefetching and listing works. I think these resource types need to be largely rewritten, though, and they currently have no relationship to ifconfig, which seems strange.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2747 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-05 19:01:39 +00:00
luke 7bda32e9fb Fixing #731 - we are now correctly only collecting exported resources
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2746 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-05 17:57:31 +00:00
luke 3d629bb2b2 Fixing #730 -- mounts now call flush() before trying to mount
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2745 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-05 17:49:23 +00:00
luke 40e4d6fa02 Fixing #735 -- gen_config now uses a single heading, matching the name of the process
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2743 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-04 00:36:47 +00:00
luke 97cd057177 Fixing #314 and #729; here's the changelog:
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
2007-08-03 23:49:53 +00:00
luke 08d89455aa Fixing #734. The problem was that when I switched how the configs were parsed, I managed to lose the ability to keep values set on the cli from being overridden by values set in config files.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2738 980ebf18-57e1-0310-9a29-db15c13687c0
2007-08-03 20:18:30 +00:00
luke 1e11a1a418 Removing test that ended up being redundant
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2730 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-31 02:34:07 +00:00
luke 2229dc1621 Fixing #726 -- mounts can now correctly handle mounted but absent filesystems.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2723 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-20 16:46:54 +00:00
luke 47b705883b Adding some code in an attempt to fix #728, but it is all commented out since I could not get it fixed in time for beaker
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2722 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-20 16:27:44 +00:00
luke 3f1c865eab Fixing #725. I was apparently not deleting the alias I was creating to the components.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2718 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-19 22:12:51 +00:00
luke eacb06c2e8 Converting mount test to use mount everywhere instead of df
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2716 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-19 20:01:47 +00:00
luke 501e8c8586 Adding the ability to specify relationships to classes, using Class[name] resource references.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2715 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-19 19:23:56 +00:00
luke b9dd7ee7e2 The first round of bug-fixes in preparation for beaker
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2714 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-19 18:12:20 +00:00
luke 5d7c5c9cad Adding documentation to the "test" script
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2713 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-19 18:11:49 +00:00
luke 90c8b8c1ba Fixing #716 -- the package type was considering anything that was not "absent" to be installed, but that included "purged", thus the problem
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2709 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-19 00:14:15 +00:00
luke f59ce4ee06 Fixing #695 -- resource references will correctly serialize and unserialize in the db
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2706 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-18 19:47:09 +00:00
luke 53a469c000 Fixing #703, mostly. You still cannot do multi-condition queries, but you can at least query against any parameter, and matching any value is sufficient for a match, so the tags work fine.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2705 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-18 17:32:46 +00:00
luke 60ef578150 Fixing the rest of #705, except for the env stuff, which I was not able to reproduce.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2697 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-14 21:13:04 +00:00
luke 6ddbec3c7c Fixing the interpreter autoloading so that it correctly loads classes even when being loaded from a namespace
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2686 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-12 19:49:41 +00:00
luke f217fbf331 Fixing the instances method. It now works when there are already managed resources.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2685 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-12 17:52:34 +00:00
luke edb1be2d75 Fixing the :check metaparam so it does not try to check unsupported parameters
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2684 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-12 16:39:47 +00:00
luke f1462cb0d2 removing the test for a method I removed yesterday
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2683 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-12 16:04:34 +00:00
luke a4b94cf128 Fixing the first half of #705 -- matching no longer fails. I think this also fixes #648.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2680 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-12 04:27:04 +00:00
luke d104d4b32b Having FileType instances automatically back their contents up to a filebucket, so it is much harder to lose content. This does not yet back up crontab contents, though.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2679 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-11 20:23:49 +00:00
luke 17a830d542 Fixing transactions so that they do not flush resources that are in noop
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2678 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-11 19:30:42 +00:00
luke 2d3c920e0f Adding support for a "mailalias" type, with /etc/aliases support initially. I have not yet figured out how to best rebuild the aliases file when necessary.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2676 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-10 23:24:34 +00:00
luke 9f685e6da1 Adding support in Property for declarating whether a given property type will match all @should values or just the first.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2674 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-10 19:30:39 +00:00
luke 7a71db875d Adding patch by Valentin Vidic to add the "+>" syntax for adding values to parameters
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2670 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-10 15:31:19 +00:00
luke e662c869bf Fixing #621 -- plugins are now downloaded directly into the $libdir, and autoload looks for them there. You can now easily download any reloadable file to your clients.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2669 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-10 04:17:07 +00:00
luke 7befe1bc5a Changing some of the internals of autoloading so that there is a class-level method to query whether a given file has been loaded.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2668 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-10 04:00:28 +00:00
(no author) 773f1876ae Ignore the pkg directory if it exists, and fix up a couple of tests that were erroring out, which also will help the confinement of package types a bit more.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2663 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-09 06:00:42 +00:00
luke 1bcca31952 Fixing #687.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2662 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-09 00:06:13 +00:00
luke 4080077639 The parser now throws an error when a resource reference is created for an unknown type. Also, resource references look up defined types and translate their type accordingly.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2660 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-08 23:52:58 +00:00
luke 07f05195da Making sure that #686 is fixed -- I specifically included the Daemon module in the Puppet mongrel server, and I call daemonize on the Puppet class, rather than the Mongrel http server
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2659 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-08 23:02:06 +00:00
luke e8217abac6 Hopefully fixing #685 -- I added a wrapper around the call to getconfig(), so any timeouts will just throw an error and skip the run, rather than failing and killing the daemon. This is not the best approach, since really, each method should be wrapped, but it is sufficient.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2658 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-08 22:48:08 +00:00
luke 60e5e10ef5 Applying further tests to double-quoted hostnames by Valentin Vidic
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2657 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-08 17:13:19 +00:00
luke 266d37d388 Applying patch by DavidS from #697 to allow host names to be double quoted
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2656 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-08 16:26:51 +00:00
luke aa741354a7 Fixing #596 -- classes in modules now autoload
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2655 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-06 22:22:10 +00:00
luke 50b8f96f76 Fixing #704 -- Puppet was not failing correctly when schedules were missing, I think
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2648 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-04 22:52:06 +00:00
luke c762c1960c Removing the long-obsolete Element base class. The Parameter and Type classes no longer have the same base class.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2647 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-04 22:25:23 +00:00
luke 0ff7827d4d Fixing #620 - class names and node names now throw an error when they conflict
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2646 980ebf18-57e1-0310-9a29-db15c13687c0
2007-07-04 21:06:26 +00:00
luke d79a7888d1 Modified the fileserver to cache file information, so that
each file isn't being read on every connection.  Also,
added londo's patch from #678 to avoid reading entire files
into memory.


git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2629 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-19 22:18:55 +00:00
luke 5043adefd3 Updating error message during test failure.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2625 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-19 01:51:48 +00:00
luke e5a9e24e83 More test fixes. I seem to be getting very close.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2624 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-19 01:49:19 +00:00
luke 01420acae6 Adding tracing to prefetch failures, and Fixing the environment support in the cron type (#669).
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2621 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-18 21:56:11 +00:00
luke 099bf6c582 Fixing some failing tests.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2616 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-18 21:03:18 +00:00
luke 2d07334c9b Modifying the CA server so that it will not send back a cert whose public key does not match the csr. We have been getting a lot of instances of this, so this should cut down that problem.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2612 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-18 19:51:17 +00:00
luke 6e16d9feb1 Fixing #578 -- Invalid certs are no longer written to disk.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2611 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-18 19:33:15 +00:00
luke 30ebbc90d3 Applying the patch by wyvern from #662. This should hopefully kill the client hanging problems.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2604 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-18 18:09:22 +00:00
luke f842cef3ed Fixing #643 -- replacing the get_posix_field method with a more degenerate version that works even on broken systems
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2598 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-17 23:11:14 +00:00
luke 46252b5bb8 All rails and language tests now pass again. All of the rails tests should now be in the rails/ directory, and I have modified resource translation so that it always converts single-member arrays to singe values, which means the rails collection does not need to worry about it.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2597 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-17 21:41:50 +00:00
luke 6084e1a0ef Fixing #673, but I have not written a test case for it. I moved all rails-related unit tests into the rails/ dir, because they keep getting missed.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2596 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-17 01:02:31 +00:00
luke e8c6cd96f5 Fixing the yum provider, and fixing the unit tests so the failures people were experiencing will result in failed tests. This fixes #672.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2595 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-17 00:06:46 +00:00
luke 6be8b21146 Modifying the check metaparam so that it just silently ignores metaparams and parameters, since they're uncheckable, and only tries to check properties
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2591 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-15 19:49:26 +00:00
luke f84ac7d270 Significantly reworking both external_nodes and ldapnodes support (see changelog).
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2587 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-15 02:40:20 +00:00
luke 8003320eaa Applying metrics patch from #659 by thijs
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2579 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-14 06:07:31 +00:00
luke 399c37bf45 Fixing #655 -- Solaris zones are again fully functional, from what I can tell
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2576 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-14 03:39:00 +00:00
luke 3a2f3d517a Fixing mongrel test so it does not try to load the mongrel server class on machines without mongrel
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2570 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-13 16:14:52 +00:00
ballman 3003aad5f6 Added the teardown of the database back to the tests.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2567 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-12 00:38:03 +00:00
ballman 68e37a99d5 Major rework of the rails feature. Changed the relationship between
host and facts (now many-to-many with fact_name through fact_values).  
Also changed the relationship between resource and params (similarly 
many-to-many with param_names through param_values).

Added the resource_tags and puppet_tags.  The latter has the tag names 
and the former is the man-to-many link with resources. 

There is a little clean up left but the schema is in order.  Also a test 
for the tags stuff is required.



git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2565 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-12 00:31:16 +00:00
luke c26f678178 Fixing #550 -- I had to list pass and dump as optional fields.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2564 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-11 22:49:06 +00:00
luke f0b5090f65 Fixing #112 - mounts now default to 0 for dump and pass
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2563 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-11 22:30:00 +00:00
luke d396fd5262 Fixing #637 -- defined resources can now correctly be virtual or exported
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2562 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-11 21:54:37 +00:00
luke c826be96f3 Adding a simple unit test for mongrel, and adding the ability to select the header used to store the client SSL dn.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2558 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-11 18:07:34 +00:00
luke 73502a7cac Finishing off the type/provider interface work, including adding package prefetch for all packages. The only not-done one is yum -- prefetch is set up for rpm, but not yum. We need to modify prefetching so that it also prefetches latest information, to avoid having to run yum so many times.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2555 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-08 17:20:00 +00:00
luke 1867d0eba5 Fixing the few test failures that resulted from the changes to provider listing
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2552 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-05 01:17:00 +00:00
luke c35d07b418 Significantly reworked the type => provider interface with respect to
listing existing provider instances.  The class method on both
    class heirarchies has been renamed to 'instances', to start.  Providers
    are now expected to return provider instances, instead of creating
    resources, and the resource's 'instances' method is expected to
    find the matching resource, if any, and set the resource's
    provider appropriately.  This *significantly* reduces the reliance on
    effectively global state (resource references in the resource classes).
    This global state will go away soon.

    Along with this change, the 'prefetch' class method on providers now
    accepts the list of resources for prefetching.  This again reduces
    reliance on global state, and makes the execution path much easier
    to follow.



git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2551 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-04 20:37:14 +00:00
luke a7b057de31 Adding a "source" attribute to providers, so eventually types will be able to avoid duplication during listing by only listing one provider for each source (e.g., dpkg and aptitude should not both be listed).
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2550 980ebf18-57e1-0310-9a29-db15c13687c0
2007-06-04 02:21:04 +00:00
luke d467e18bc6 Fixing #532 -- reparsing config files no longer throws an exception. The problem only occurred when reparsing a configuration file that was also being managed (which was common) and only whent the manifest was up to date (the combination was uncommon). Reparsing would find the existing file object and use it to check permissions and such, then it would remove all of the internal data in the object, for cleanup; the problem is, the client still had a reference to the object, so when it went to run its configuration, this broken reference was used.
The solution I chose was to remove all objects from memory after every run.  It is negligible to reload them from the cache, and it saves ram for the 99% of the time that the client is just sitting there.  And it makes this problem go away. :)

git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2545 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-31 22:47:01 +00:00
mpalmer 37a221c32e Add a grammatically correct 'has_feature' alias, and switch to using it where appropriate in existing code
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2542 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-30 20:36:29 +00:00
mpalmer a9ea3c898f Correct a problem with the dpkg provider's handling of the :purged state, and expand the package type's understanding of what purged actually means. Fixes #644
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2537 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-25 22:24:49 +00:00
luke 62a4d4c91d Adding better error reporting on unmatched brackets -- you will now get notification of what was expected in most cases
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2531 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-25 00:31:28 +00:00
luke 4aef0ba7cf Fixing #323 -- puppetd and puppetmasterd are now in sbin; packages still need to be fixed
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2529 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-20 16:35:14 +00:00
luke 6f83d4daab Fixing #501 -- there is now a splay option, disabled by default and when running under --test
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2528 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-18 23:45:30 +00:00
luke e8d560ea82 Fixing #566 -- definitions, tags, and classes can now be single characters
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2523 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-17 21:51:36 +00:00
luke eed85f41ff Adding #629 -- an undef keyword now exists
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2522 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-17 21:43:51 +00:00
luke 8410c4dc5b Fixing #507 (behaviour in cycles) by changing the topsort algorithm.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2521 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-17 20:57:24 +00:00
luke e95734b8bb Redoing autoload a bit in preparation for adding a plugindir
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2518 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-16 00:00:47 +00:00
luke dbedcd7b98 A round of fixes so unit tests pass; most of the failures were from the merging of the transaction-refactor branch
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2517 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-15 19:22:36 +00:00
luke 28f7d6c7eb Fixing #569 - I have added a dynamic facts option to choose which facts will be ignored.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2516 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-15 00:11:01 +00:00
luke 85fef63889 fixing some problems with the config timeout -- I am not sure it ever actually worked
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2512 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-14 16:04:12 +00:00
luke 27cabf25fc Fixing a weird bug that occurred because I was changing @parentclass in the AST stuff the first time it was called, from a string to a the actual instance of the parent. This worked fine as long as the parentclass was only called when parsing was complete, such as during evaluation, but if anything resulted in it being called earlier (e.g., attempting to add to the class during parsing), then things behaved, um, badly. This commit fixes the method so that the variable is not modified; there is now @parentclass and @parentobj.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2511 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-14 15:19:48 +00:00
luke 1d23013abf Fixing #605 -- providers now refer to @resource or @resource_type.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2501 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-09 23:08:42 +00:00
luke de212261e7 Fixing #607 -- parameters and properties now refer to a @resource rather than a @parent. The @parent parameter is still set for now, for backward compatibility.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2500 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-09 22:05:32 +00:00
luke 3e7d44e628 Fixing #606 -- now only components mention @children.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2499 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-09 21:30:44 +00:00
luke 7f8a9036f1 Getting rid of the last vestiges of the logger tests
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2497 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-09 16:21:56 +00:00
luke 2fa529ecb6 Fixing the ability to fail correctly in the fileserver -- a constant was not defined correctly for it
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2494 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-09 14:43:06 +00:00
ballman c1643600e1 Merging of refactor-transacton to the trunk. This work removes the :is attribute from properties and relies on the provider to cache or return the current value of the property.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2487 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-09 01:51:20 +00:00
luke 69cb72120c Removing the obsolete logger network interface
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2478 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-07 22:25:33 +00:00
luke f42a755cc2 Adding a module to abstract using Autoload to load and manage instances
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2476 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-07 18:59:40 +00:00
luke 494675b1db Fixing #206 and #422. Executables will still look for the deprecated config files and load them using the old parse method, but they now prefer a single configuration file, and files can set parameters (owner, mode, group) in brackets on the same line.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2464 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-06 05:42:53 +00:00
luke 1f8de9d0c2 Consolidating all of the configuration parameter declarations into configuration, at least partially just because then the docs for each parameter have to be a bit better. Also, I have gotten rid of the "puppet" section, replacing it with "main", and changed, added, or removed a couple of other sections. In general, we should now prefer more sections, rather than fewer.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2463 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-04 23:09:34 +00:00
luke 28254b55cc Adding a --summarize option, to get a transaction summary
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2459 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-04 05:04:29 +00:00
luke 0c07125397 Fixing #615 (subclasses with similar names) by getting rid of the class "type" and "fqname", and instead using "classname" everywhere. You should no longer see unqualified class/definition names anywhere. Also, rewriting how snippet tests work, to avoid creating all of the files, since the point was the parsing tests, not functional tests.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2458 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-03 20:45:25 +00:00
luke 8d7ec14836 Adding a fact handler, along with an abstract interface for fact stores and a simple yaml fact store, towards the Node Classification work.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2457 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-03 05:24:13 +00:00
mpalmer 79dcd33aeb Set LANG/LC_ALL/LC_MESSAGES/LANGUAGE to 'C' whenever we execute things, so that the output that comes back is more easily parsed, without needing to understand all sorts of foreign languages
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2456 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-03 04:38:51 +00:00
luke 3e895b5461 Changing the remount stuff back to not repeating the mount options.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2445 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-01 03:45:09 +00:00
luke 64382700d8 Adding a "supports_parameter?" method to test whether a given provider supports the features required by a given parameter. This is used during attribute instance creation, but its creation was necessicated by test code.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2444 980ebf18-57e1-0310-9a29-db15c13687c0
2007-05-01 03:14:09 +00:00
luke c9de332e8a Fixing the fileserver naming tests after the change to allow "-" in fileserver module names.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2443 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-30 21:08:06 +00:00
luke 80ec4943a9 Fixing #430 (I hope) -- execs now autorequire the specified user
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2442 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-30 19:42:58 +00:00
luke f69dcdab8e Working a little bit on rails failures, with no real progress
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2439 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-30 19:21:59 +00:00
luke e05392e264 Fixing a bug in the tests introduced a while back when I switched to using "generate_report"
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2438 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-30 18:15:01 +00:00
luke 3aafd81fa4 Fixing #594 -- Files on the local machine but not remote machine now purge. Note that this introduces a difference in behaviour between recursing locally and recursing remotely.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2436 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-30 17:29:02 +00:00
luke 7e971436c9 Allowing "-" in fileserver module names, #617
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2434 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-30 15:57:57 +00:00
luke dad93738dd Fixing the tests for the aptrpm provider.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2430 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-30 15:19:23 +00:00
luke 4296e4e3e3 I managed to put those provider tests in the wrong file -- the file meant to test the resource type interactions with providers, rather than the provider file. Fixing that, and the failed test resulting from that silly mistake.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2428 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-28 01:18:23 +00:00
luke 21eab22997 Okay, one last try -- the Util#binary command was not returning a path in all true cases, and the provider tests were poorly written and missed it.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2427 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-27 23:25:59 +00:00
luke 94bd3b2828 Apparently I messed up providers a bit; binaries were not having their full paths returned, which made most providers suddenly unsuitable. This fixes that, and adds tests to verify behaviour.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2426 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-27 23:20:25 +00:00
luke 96eed993c3 Closing #585 -- providers can now have optional commands, which only differ from normal commands in that they do not affect a provider's suitability
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2425 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-27 18:41:03 +00:00
luke 0a46bb2c49 Fixing #603 -- I had to add a special case for escaped carriage returns. I am not entirely sure this is the right solution, but so be it.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2418 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-26 19:09:24 +00:00
luke 0aeda97481 Adding the ability to manage passwords with the useradd provider
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2414 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-25 20:59:00 +00:00
luke 7fbd3ffe88 Adding the ability for parameters to declare that they require a given feature, and resources will not instantiate that parameter if required features are missing. This is mostly useful for properties.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2413 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-25 20:04:59 +00:00
luke 8d3673d5df Adding a :block_eval option to FileRecords in FileParsing, so ParsedFile providers can have records just define a bunch of methods at once, rather than using lots of hooks. This is cleaner when custom parse and generate methods are used.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2407 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-23 18:01:36 +00:00
luke 5afa587dfe Fixing #588 - the parser correctly ignores directories in globbing now
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2404 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-20 16:40:47 +00:00
luke 37ffb636f1 Removing the stubs for nodevar; I did not mean to commit them
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2401 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-20 15:59:09 +00:00
luke 7cc3a2f114 adding note about the class variables in the change log
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2400 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-20 14:33:50 +00:00
luke be68411ac5 Adding support for aptrpm from #227 as added by Ian Burrell
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2397 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-19 19:54:20 +00:00
luke f8a0e99380 Adding the functionality requested in http://mail.madstop.com/pipermail/puppet-users/2007-April/002398.html .
You can now retrieve qualified variables by specifying the full class path.



git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2393 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-19 18:34:03 +00:00
luke da4d252b3d Changing the test package for debian
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2390 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-06 15:49:38 +00:00
mccune b8b14d3527 Forgot to change Puppet::Util::SUIDManager#run_and_capture arguments to execute
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2387 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-04 21:35:00 +00:00
mccune efe9a833c4 Fix for #565: Final merge of changes from source:branches/execute-refactor into source:trunk
Generated with
svn merge -r 2378:HEAD https://reductivelabs.com/svn/puppet/branches/execute-refactor trunk

CHANGES:
 - Puppet::Util#execute now takes hash key/value pairs as arguments after the command array.
 - Processes executed from the base service provider are now silenced.  That is, their
   standard input, output, and error pipes are all directed to /dev/null.


git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2385 980ebf18-57e1-0310-9a29-db15c13687c0
2007-04-03 15:51:18 +00:00
luke 8ab272265d Hah! Finally fixing the problem where mount tests would fail when run as part of the whole suite. The real problem was that I was changing the filetype of the provider without setting it to change back after the test, but the key change that made it straightforward to fix this problem was that my test loader was not exiting with a non-zero code when there was a failure, which mean that the ./test script never thought anything failed. I fixed the former, then fixed the test script to work fine with -n method_name stuff, and quickly found the problem. *whew*
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2377 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-31 06:35:23 +00:00
luke 4615e3a70c Fixing Client.read_cert so that it automatically adds the certificate information to the driver when the certificate is correctly read. This makes sure the Net::Http instance has the cert all set up.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2375 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-30 23:17:40 +00:00
luke 295b3571bb Renaming some methods so that we can generate a report on a transaction and then retrieve it later
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2372 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-30 00:47:03 +00:00
luke 1e8e7ee55a Fixing #567. I overrode the propertychanges method to only return changes if the file exists or if the file has a property that could create the file.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2371 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-30 00:46:38 +00:00
luke 33f4a66a4e Renaming pbucket to filebucket
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2349 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-24 21:17:37 +00:00
luke 52df47e489 Finalizing the filebucket client, with test code.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2348 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-24 21:16:20 +00:00
luke 5ad9bf4929 Fixing #553; -M is no longer added when home directories are managed
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2341 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-21 20:45:14 +00:00
luke 474b86c921 Hopefully the last batch of commits before I release 0.22.2. Mostly just get tests to pass.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2334 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 23:04:32 +00:00
luke 60ea7d2a9d Fixing #432 - you can now manage home dirs with users. You cannot yet purge home directories, because there is still controversy over how that should be done. Also, allowdupe is now handled like a feature, which is, um, better.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2328 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 21:29:08 +00:00
luke 3d17685f99 Adding a "has_feature" method, so a provider can just declare that it has a given feature
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2327 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 20:24:08 +00:00
luke 290ad14f50 Finally fixing #504, I think; I even have tests to prove it. It was a little thing, in the end.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2326 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 19:39:26 +00:00
luke 9b5833a63c Clarifying the errors a bit when nodes come from external sources.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2324 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 19:16:10 +00:00
luke e2c5dbb2cc Another round of bug-fixes, prompted by test logs from David Schmitt
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2316 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 16:42:41 +00:00
luke 5b2ffbcb5d Adding provider features. Woot!
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2313 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 08:15:36 +00:00
luke 4dc72337ac Fixing #487. I know use "apt-cache policy", instead of apt-cache showpkg, because it clearly shows which version will be installed. This is basically impossible to test well, so I just added a test that verifies we always get a value back, although I cannot really test that it is the "right" value. Also, I modified the logging of packages so if there is a latest version, you will get the new version number, along with the old, in the log.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2310 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 05:21:44 +00:00
luke 184266d622 Fixing #447 - filebuckets now use deeply nested paths
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2306 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 04:18:06 +00:00
luke b43600284c Oops. Fixing the other tests to now past the facts to "fresh?", as required by the fact checking.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2305 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 03:34:16 +00:00
luke 61b3490655 Fixing the fact caching so that facts are only downloaded and retrieved once, rather than once during fresh checking and once during config compile.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2304 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 01:44:44 +00:00
luke 5f7ae353a0 Fixing #519. The facts are now cached in the state file and changes to them force a recompile.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2303 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 01:42:10 +00:00
luke a2a9d93fd3 Fixing #544 -- there is now an --ignoreimport option for commit hooks.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2302 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 01:19:09 +00:00
luke a212ea748f Adding #539. Definitions can now have titles, and both $title and $name are guaranteed to be set within any definition.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2301 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-19 00:46:25 +00:00
luke 90bdc33e44 Adding test to make sure ensure does not conflict with any of the creating types.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2300 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-18 23:47:54 +00:00
luke e952029322 Adding #541. There is now a "generate" function.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2299 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-18 23:39:12 +00:00
luke 66546610ce Fixing #538. There is now a simple file() function to read in file contents.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2298 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-18 23:08:32 +00:00
luke 6b85962b0c The first round of fixes for failing tests.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2296 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-18 22:48:57 +00:00
luke 8eddd4bcd2 More work on #542 -- services in noop now produce noop events so that they can themselves trigger further changes
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2295 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-18 19:25:15 +00:00
luke 40eeadbde0 Adding example cron tab from #492 and making the read/write tests ignore whitespace. This cron now parses successfully, as I thought it would with the move to providers.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2291 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-18 18:18:34 +00:00
luke 2a3f56cc91 Fixing #529 -- specified targets keep their values. The problem was that I was using model[:target] instead of model.should(:target) and model.is(:target). The real problem was that my tests were using a parameter for tests but all of the real code uses properties.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2290 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-18 18:00:26 +00:00
luke 5257837ecb Fixing #491 -- the client correctly realizes when the cache file is missing and only considers the config to be in sync if that is not the case.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2288 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-18 16:56:20 +00:00
luke 4a6d705bc0 Fixing #542. Transactions now cause services to warn when they would have gotten restarted by a noop resource. Also fixing #549 -- transactions now only refuse to delete required resources if they are being purged. All other resources can be deleted just fine.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2286 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-17 23:16:37 +00:00
luke 8387d48a42 Fixing #540. I modified Puppet::Network::Client::Master so that it disables noop during its run, so that facts and plugins will always be downloaded.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2285 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-17 23:11:45 +00:00
luke 86c63ce2d9 Fixing cron support (I hope). It now uses providers, and seems to work, at least on my os x box.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2284 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-17 02:50:48 +00:00
luke ba23a5ac27 Adding spec libs, so we can use them some day
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2283 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-17 02:48:41 +00:00
luke df4595e98f Significantly reworking the internals of the fileparsing code. It now
passes around an instance of a FileRecord, rather than just a hash, which I
think makes it much easier to understand.

Moved the sshkey parsed provider test to its own directory and made it better.

This work is all being done so I can move cron jobs to using providers
instead of the current unmaintainable state of affairs.



git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2281 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-14 17:49:19 +00:00
lutter 0fa3c434b6 Search manifests first within modules, and if no module is found, search in
the directory the current manifest is in. 

Glob patterns can be used for the path, but the path only matches a module
if the first part of the path is not a glob.


git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2279 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-09 00:52:47 +00:00
lutter 38975de420 Introduces a new implicit 'modules' fileserver module, whose allow/deny can
be set from the fileserver.conf, but whose path is ignored and can
therefore not be used directly in puppet:// URL's.

When the fileserver looks for a file/directory, it first checks if the
first part of the URL references an existing module. If one is found, a new
temporary mount for that module is generated with the same permissions as
the 'modules' module. If no matching puppet module is found, the fileserver
behaves as it always has.


git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2278 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-09 00:49:35 +00:00
lutter ebcb6b6df7 The template function now tries to first find a template within a module
(if the template path looks like it belongs to a module) and only when that
fails looks for it in templatedir


git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2277 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-09 00:48:28 +00:00
lutter ba6257c02e The basic plumbing for modules: a modulepath config parameter, and a new
class Puppet::Module that will contain the module-related
functionality. The modulepath can be extended by setting the environment
variable PUPPETLIB



git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2276 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-09 00:47:27 +00:00
luke 10d68915c5 Adding support for a prefetch hook on individual providers, rather than only supporting it for the whole class.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2275 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-08 21:18:43 +00:00
luke 6ad8998a7e Adding a bit more testing to the config stuff
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2273 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-08 17:35:18 +00:00
luke 3489bd8566 One last try at getting the config and mode stuff working. The tests were passing because "mode" is a valid config option in the tests, but not in the real configuration. So, now the Config class correctly only tries to set the meta params if they are valid options, otherwise they get skipped.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2272 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-08 17:07:35 +00:00
luke 6b92c04548 Oops, forgot a file in the commit
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2270 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-08 07:37:43 +00:00
luke f59cadec5c Fixing a bug related to link recursion that caused link directories
to always be considered out of sync.


git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2269 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-08 07:36:46 +00:00
luke b6df3369bc Looks like [2265] was not a complete solution -- it resulted in failures when the config set modes via integers. Everything is working now, and tested more completely.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2268 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-08 07:09:42 +00:00
luke 0925fb0cd9 Adding some more testing on the @should values for :groups on users, and fixing a bug that often made :groups think it was out of sync.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2267 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-08 06:03:36 +00:00
luke fa253b58c1 Fixing #489. I was unnecessarily converting to octal in config.rb
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2265 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-08 01:23:22 +00:00
luke 205bbb90af Flushing out the ability to have a stand-alone CA server, specified using ca_server and ca_port. This is just a final unit test, since the code was done and lutter fixed the rest in [2261].
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2263 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-08 00:21:38 +00:00
luke 185a003d39 Fixing #531 and #414. This includes pretty much a complete redesign
of the AuthStore class, with (hopefully) all of the edge cases removed,
the code is now much cleaner, the tests are (I think) complete, and
everything is just generally better.



git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2262 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-08 00:16:53 +00:00
lutter fde8b28558 Fix typo in default config and add simple test to check default config sanity
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2261 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-07 22:20:51 +00:00
luke 46d344b9da Merging the webserver_portability branch from version 2182 to version 2258.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2259 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-06 19:03:05 +00:00
luke 1808c50ea1 Apparently the include function was not failing when it could not find asked-for classes. Now it does.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2250 980ebf18-57e1-0310-9a29-db15c13687c0
2007-03-01 17:41:00 +00:00
luke ebc4dd231e Fixing #464 and #515.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2244 980ebf18-57e1-0310-9a29-db15c13687c0
2007-02-28 07:20:25 +00:00
luke cc260268a8 Fixing #467. It is a hackish solution, because I just reordered the definition of the params, but it works for now, anyway.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2242 980ebf18-57e1-0310-9a29-db15c13687c0
2007-02-28 06:46:43 +00:00
luke 4df0738de2 Applying a modified form of the patch by cstorey from #523. The modifications were mostly around the fact that Strscan does not set $1 and its ilk.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2239 980ebf18-57e1-0310-9a29-db15c13687c0
2007-02-28 01:21:58 +00:00