Issue #9166 has been updated by James Turnbull.

Or if you could give this patch a try:

<pre>
diff --git a/lib/puppet/reports/rrdgraph.rb b/lib/puppet/reports/rrdgraph.rb
index 517fa8f..73e75a0 100644
--- a/lib/puppet/reports/rrdgraph.rb
+++ b/lib/puppet/reports/rrdgraph.rb
@@ -21,7 +21,7 @@ Puppet::Reports.register_report(:rrdgraph) do
     which defaults to the `runinterval`."
 
   def hostdir
-    @hostdir ||= File.join(Puppet[:rrddir], self.host)
+    @hostdir ||= File.join(Puppet[:rrddir], self.host.gsub("..","."))
   end
 
   def htmlfile(type, graphs, field)
@@ -93,13 +93,12 @@ Puppet::Reports.register_report(:rrdgraph) do
   def process(time = nil)
     time ||= Time.now.to_i
 
-    unless File.directory?(hostdir) and FileTest.writable?(hostdir)
-      # Some hackishness to create the dir with all of the right modes and 
ownership
-      config = Puppet::Util::Settings.new
-      config.setdefaults(:reports, :hostdir => {:default => hostdir, :owner => 
'service', :mode => 0755, :group => 'service', :desc => "eh"})
+    client = self.host.gsub("..",".")
 
-      # This creates the dir.
-      config.use(:reports)
+    dir = File.join(Puppet[:rrddir], client)
+    if ! FileTest.exists?(dir)
+      FileUtils.mkdir_p(dir)
+      FileUtils.chmod_R(0750, dir)
     end
 
     self.metrics.each do |name, metric|
</pre>

----------------------------------------
Bug #9166: rrdgraph report processor tries to chown stuff to root?
https://projects.puppetlabs.com/issues/9166

Author: Jeff Blaine
Status: Needs More Information
Priority: Normal
Assignee: Jeff Blaine
Category: reports
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


2.7.3

<pre>
notice: Compiled catalog for rcf-cm-test.our.org in environment production in 
0.02 seconds
err: /File[/var/lib/puppet/rrd/rcf-cm-test.our.org]/ensure: change from absent 
to directory failed: Failed to set owner to '0': Operation not permitted - 
/var/lib/puppet/rrd/rcf-cm-test.our.org
err: Report processor failed: Got 1 failure(s) while initializing: change from 
absent to directory failed: Failed to set owner to '0': Operation not permitted 
- /var/lib/puppet/rrd/rcf-cm-test.our.org
</pre>

It made the new dir for the node fine as user puppet, then tried to chown it to 
UID 0 for some reason?

<pre>
~:rcf-cm-master # ls -l /var/lib/puppet/rrd/
total 4
drwxr-xr-x 2 puppet puppet 4096 Aug 23 12:47 rcf-cm-test.our.org/
</pre>


-- 
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://projects.puppetlabs.com/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=en.

Reply via email to