Issue #2789 has been updated by Markus Roberts.

Status changed from Ready for Testing to Ready for Checkin

I'm marking this ready for checkin; I had raised concerns about the memory leak 
issue (which became #2824) on the dev list thread for this patch but those are 
now being addressed separately.

----------------------------------------
Bug #2789: puppetrun triggered runs that do not specify tags fail to apply 
configuration properly
http://projects.reductivelabs.com/issues/2789

Author: Mr Paxos
Status: Ready for Checkin
Priority: Normal
Assigned to: Jesse Wolfe
Category: tags
Target version: 0.25.2
Affected version: 0.25.1
Keywords: puppetrun puppetrunner tags
Branch: ticket/0.25.x/2789


When puppetd is triggered by puppetrun without --tags on the command line, the 
@tags@ ruby object is set to @[""]@ which fails the code below resulting in all 
resources being skipped and not applied.

Here is a snippet of the debug output from puppetd during a run triggered by 
puppetrun:

<pre>
debug: //mysql-cluster::mysql-cluster-gpl/File[mysql-cluster-gpl-ebuild]: Not 
tagged with 
debug: //mysql-cluster::mysql-cluster-gpl/Exec[eix-update-mysql-cluster]: Not 
tagged with 
debug: //mysql-cluster::mysql-cluster-gpl/Package[mysql-cluster-gpl]: Not 
tagged with 
</pre>

Here is the offending code and patch:

<pre>
--- transaction.rb      2009-11-04 20:58:35.000000000 -0700
+++ transaction-new.rb  2009-11-04 21:05:22.000000000 -0700
@@ -619,7 +619,7 @@
 
     # Is this resource tagged appropriately?
     def missing_tags?(resource)
-        return false if self.ignore_tags? or tags.empty?
+        return false if self.ignore_tags? or tags.empty? or tags == [""]
         return true unless resource.tagged?(tags)
     end
</pre>

I don't speak ruby all that well, so it is hard to tell where the fix should be 
applied.  The patch above does fix the problem, but it might not be the proper 
place.  Perhaps the fix should be where puppetd sets the @tags@ object when 
receiving a puppetrun request.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

--

You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=.


Reply via email to