summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename migration so it's still appliedThom May2008-11-261-0/+0
|
* Slight denormalisation to store a host's environment as a first classThom May2008-11-263-0/+14
| | | | | object in the database Fixes: #1392
* id column is autogenerated by rails as a primary key, there is no needBrice Figureau2008-08-222-8/+17
| | | | | | | to create an additional index on this column. This changeset contains the new schema and a migration. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #1052 - abysmal storeconfig performance - part1Brice Figureau2008-08-171-1/+1
| | | | | | | | | | | | | | Resources whose references are of the form: Main::Sub1::Sub2 are extracted from the database under the form: Main::sub1::sub2 Puppet then fails to match them against compiled resources of same references which are capitalized as they should, and tries to overwrite them on every storeconfig run, leading to tons of cascading DELETE/INSERT, hurting performance. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* Fix #1510 - storeconfig fails with rails 2.1Brice Figureau2008-08-171-5/+5
| | | | | | | | This is a workaround. Since rails seems to have difficulties to map associations to Puppet classes, we explain it carefully what to expect. Changelog
* Replacing all two-space indents with four-spaceLuke Kanies2008-06-131-14/+14
|
* Pushed schema patch for #1193James Turnbull2008-04-172-0/+10
|
* * Tweaks for puppetshow UI cleanupBlake Barnett2008-02-285-3/+17
|
* * Add migration for "created_at" (hobo expects it)Blake Barnett2008-02-287-139/+17
| | | | | * Tweaks for puppetshow interface cleanup * Delete unused tagging lib and puppet_class model
* Fixing #923 (again). The host storage method was notLuke Kanies2007-12-101-3/+1
| | | | | | correctly searching for the host, so it was creating a new host on each run, which is what was causing the conflict.
* Theoretically, this patch is to fix #917 (which it does), butLuke Kanies2007-11-281-3/+1
| | | | | | | | | | | | | | | | | | | 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.
* Removing the Id tags from all of the filesLuke Kanies2007-10-035-5/+0
|
* Fixed #784 by applying patch by vvidic.Michael V. O'Brien2007-09-111-1/+1
|
* A round of bugfixing. Many more tests now pass -- I think we are largely ↵Luke Kanies2007-08-202-14/+8
| | | | down to tests that (yay!) fail in trunk.
* Undo previous commit, which was an errorlutter2007-08-031-24/+5
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2735 980ebf18-57e1-0310-9a29-db15c13687c0
* Do not set any options if they aren't set in /etc/sysconfig/puppetmaster - ↵lutter2007-08-031-5/+24
| | | | | | otherwise we clobber settings from puppet.conf git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2734 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #695 -- resource references will correctly serialize and unserialize ↵luke2007-07-182-2/+20
| | | | | | in the db git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2706 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #703, mostly. You still cannot do multi-condition queries, but you ↵luke2007-07-181-0/+5
| | | | | | 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
* Fixing #689, although I have not added unit tests. The problem was that a ↵luke2007-07-051-1/+2
| | | | | | tag name was being removed, rather than the tag object itself. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2651 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing some failing tests.luke2007-06-181-0/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2616 980ebf18-57e1-0310-9a29-db15c13687c0
* All rails and language tests now pass again. All of the rails tests should ↵luke2007-06-171-6/+9
| | | | | | 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
* Fixing the type/title index for mysqlluke2007-06-151-1/+8
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2590 980ebf18-57e1-0310-9a29-db15c13687c0
* Significantly optimizing the database queries -- I am getting about 40% ↵luke2007-06-143-9/+12
| | | | | | better times now. See http://www.madstop.com/optimizing_the_activerecord_integration.html. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2585 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding indexes for the rails tablesluke2007-06-141-0/+24
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2575 980ebf18-57e1-0310-9a29-db15c13687c0
* Removing the indexes migration, since the indexes are now in the main db schemaluke2007-06-131-38/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2574 980ebf18-57e1-0310-9a29-db15c13687c0
* Changed the host to "eager fetch" all the resources and their associated ballman2007-06-122-4/+4
| | | | | | | | tables. Also removed some unecessary lines from resource.rb that were causng it to re-read information it already loaded from the db. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2568 980ebf18-57e1-0310-9a29-db15c13687c0
* Major rework of the rails feature. Changed the relationship between ballman2007-06-128-69/+127
| | | | | | | | | | | | | | | | 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
* Changing the resource title to be text instead of a string, because some ↵luke2007-05-301-1/+1
| | | | | | title are > 255 chars git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2539 980ebf18-57e1-0310-9a29-db15c13687c0
* Removed acts_as_taggable from the rails stuff. I haven't removed the tables ↵ballman2007-05-113-18/+0
| | | | | | from the schema nor the indexes yet. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2505 980ebf18-57e1-0310-9a29-db15c13687c0
* Refactoring some of the rails code. The speed is now pretty good, but the ↵luke2007-03-242-46/+34
| | | | | | tagging stuff does not seem to be working and is certainly working very ineffficiently. Blake says he is going to take a look at that. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2350 980ebf18-57e1-0310-9a29-db15c13687c0
* Rails is now significantly faster. I refactored all of the queries; they ↵luke2007-03-223-25/+79
| | | | | | are mostly reduced to three queries, each of which is relatively fast, although there are still a ton of file- and tag-related queries that I cannot find the source of. Note that this speedup requires indexes, which will only get added if you start puppetmasterd with --dbmigrate (although you cannot always start with that, as there is an error in the init code). I expect that the indexes will not help unless you forcibly reindex your database, but after that you should see significant speed improvements. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2344 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a migration to create indexesluke2007-03-211-0/+38
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2342 980ebf18-57e1-0310-9a29-db15c13687c0
* Re-add the filesshadoi2007-02-174-0/+45
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2210 980ebf18-57e1-0310-9a29-db15c13687c0
* Undo the param_name param_value mergeshadoi2007-02-175-49/+46
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2209 980ebf18-57e1-0310-9a29-db15c13687c0
* Changing date to datetime in the databaseluke2007-02-161-11/+11
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2205 980ebf18-57e1-0310-9a29-db15c13687c0
* Update relationshipsshadoi2007-02-165-25/+13
| | | | | | | | Remove dynamic class generation for now. Include the fact class git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2201 980ebf18-57e1-0310-9a29-db15c13687c0
* Merge fact_names & fact_values, and param_names & param_values.shadoi2007-02-158-47/+26
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2191 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #431. Collection was always returning an array, even when only a ↵luke2007-01-281-0/+3
| | | | | | single value was passed. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2103 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #391. Keeping track of times of compile and freshness checks.luke2007-01-042-2/+11
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2034 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding extra connection statements and enabling concurrency support in ↵luke2007-01-031-1/+1
| | | | | | rails, hopefully fixing #399. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2027 980ebf18-57e1-0310-9a29-db15c13687c0
* Not saving tags right away. This seems to cause postgres to explode.luke2007-01-031-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2024 980ebf18-57e1-0310-9a29-db15c13687c0
* Using text for parameter values, instead of string, so the fields support ↵luke2007-01-031-2/+2
| | | | | | larger amounts of text git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2020 980ebf18-57e1-0310-9a29-db15c13687c0
* Add updated_at for all tablesshadoi2006-12-292-1/+10
| | | | | | | make sure it's removed from the resource hash that gets returned git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1997 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving the tagging stuff to an "external" directory, instead of "lib".luke2006-12-297-6/+6
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1991 980ebf18-57e1-0310-9a29-db15c13687c0
* Re-add support for tags and file/linesshadoi2006-12-195-4/+36
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1953 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding :replace aliases, as requested in #366.luke2006-12-194-0/+8
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1952 980ebf18-57e1-0310-9a29-db15c13687c0
* All rails *and* language tests now pass, with the exception of a ↵luke2006-12-193-40/+40
| | | | | | language/resource test that passes by itself but fails when run as part of the whole suite. Also, I added deletion where appropriate, so that unspecified resources, parameters, and facts are now deleted, as one would expect. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1951 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing most of the rails stuff. I think everything basically works now, and ↵luke2006-12-197-65/+64
| | | | | | now I am just going through and making sure things get deleted when they are supposed (i.e., you remove a resource and it gets deleted from the host's config). git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1950 980ebf18-57e1-0310-9a29-db15c13687c0
* Getting rid of the db init stdout and reindentingluke2006-12-171-52/+61
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1944 980ebf18-57e1-0310-9a29-db15c13687c0
* Go back to restype and remove STI classes, they were more trouble than they ↵shadoi2006-12-153-23/+6
| | | | | | were worth. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1940 980ebf18-57e1-0310-9a29-db15c13687c0