diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-05-31 22:47:01 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-05-31 22:47:01 +0000 |
commit | d467e18bc66b124dc4950cb4442d0d67ed4c573f (patch) | |
tree | 934a1371439b929065e78541093981538fcf914c /lib | |
parent | e8097a2fc1318829b31b4cb3e4b076db30696ef7 (diff) | |
download | puppet-d467e18bc66b124dc4950cb4442d0d67ed4c573f.tar.gz puppet-d467e18bc66b124dc4950cb4442d0d67ed4c573f.tar.xz puppet-d467e18bc66b124dc4950cb4442d0d67ed4c573f.zip |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/network/client/master.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb index 2b9490539..ae13f8185 100644 --- a/lib/puppet/network/client/master.rb +++ b/lib/puppet/network/client/master.rb @@ -108,7 +108,7 @@ class Puppet::Network::Client::Master < Puppet::Network::Client end def clear - @objects.remove(true) + @objects.remove(true) if @objects Puppet::Type.allclear mkdefault_objects @objects = nil @@ -325,6 +325,7 @@ class Puppet::Network::Client::Master < Puppet::Network::Client ensure # Just make sure we remove the lock file if we set it. lockfile.unlock if got_lock and lockfile.locked? + clear() end def running? |