From aad3b76da045d2fd845866fb6e8a7c9866307cd8 Mon Sep 17 00:00:00 2001 From: Brice Figureau Date: Fri, 7 Aug 2009 22:45:12 +0200 Subject: Fix #2507 - Exported resources were not correctly collected. #2507 contains two issues: * a crash when we filters-out an unwanted resource which had edges pointing to it. * resources are losing their virtuality when they are transformed from Puppet::Parser::Resource to Puppet::Resource. This means we weren't able to distinguish anymore between an exported resource collected in the same node as it was exported and an exported resource collected in another node. The net result is that we can't apply exported resources that are collected in the same node because they are filtered out by the catalog filter (see the commits for #2391 for more information). The fix is to keep the virtuality of the resources so that we can differentiate those two types of exported resources. We keep this until the catalog is ready to be sent, where we filter out the virtual resouces only, the other still exported ones needs to be sent to the client. To be real sure, the transaction also skips virtual resources. Signed-off-by: Brice Figureau --- lib/puppet/parser/resource.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb index 6632d2bba..7218ac0c0 100644 --- a/lib/puppet/parser/resource.rb +++ b/lib/puppet/parser/resource.rb @@ -268,6 +268,7 @@ class Puppet::Parser::Resource result.file = self.file result.line = self.line result.exported = self.exported + result.virtual = self.virtual result.tag(*self.tags) return result -- cgit