Issue #15539 has been reported by Matthaus Litteken.

----------------------------------------
Bug #15539: mode syntax in puppet.conf for lastrunfile does not work
https://projects.puppetlabs.com/issues/15539

Author: Matthaus Litteken
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 2.7.18
Keywords: 
Branch: 


Adding this line to puppet.conf causes puppet to create the file with those 
perms, but also to throw an error and leave the file empty.

`lastrunfile = $statedir/last_run_summary.yaml { owner = service, group = 
service, mode = 666 }`

<pre>
notice: Finished catalog run in 0.08 seconds
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:184:in `chmod'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:184:in `save_last_run_summary'
/usr/lib/ruby/site_ruby/1.8/puppet/util/file_locking.rb:42:in `writelock'
/usr/lib/ruby/site_ruby/1.8/puppet/external/lock.rb:34:in `lock_exclusive'
/usr/lib/ruby/site_ruby/1.8/puppet/util/file_locking.rb:38:in `writelock'
/usr/lib/ruby/site_ruby/1.8/puppet/util/file_locking.rb:37:in `open'
/usr/lib/ruby/site_ruby/1.8/puppet/util/file_locking.rb:37:in `writelock'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:43:in `synchronize_on'
/usr/lib/ruby/1.8/sync.rb:229:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:43:in `synchronize_on'
/usr/lib/ruby/site_ruby/1.8/puppet/util/file_locking.rb:36:in `writelock'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:183:in `save_last_run_summary'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:174:in `send_report'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:169:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run'
/usr/lib/ruby/1.8/sync.rb:229:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:95:in `with_client'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:41:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `call'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `controlled_run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:337:in `onetime'
/usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:311:in `run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:416:in `hook'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:407:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
/usr/bin/puppet:4
err: Could not save last run local report: can't convert String into Integer
debug: Value of 'preferred_serialization_format' (pson) is invalid for report, 
using default (b64_zlib_yaml)
debug: report supports formats: b64_zlib_yaml raw yaml; using b64_zlib_yaml
[root@localhost ~]# ls -ld /var/lib/puppet/
bucket/        clientbucket/  client_yaml/   lib/           puppet-module/ rrd/ 
          server_data/   state/         
classes.txt    client_data/   facts/         log/           reports/       run/ 
          ssl/           yaml/          
[root@localhost ~]# ls -ld /var/lib/puppet/state/last_run_summary.yaml 
-rw-rw-rw- 1 puppet puppet 0 Jul 16 09:08 
/var/lib/puppet/state/last_run_summary.yaml
</pre>

Additionally, if the file didn't already exist, the file is created with 600 
permissions, owned by root:root, and is empty.

Adding the following line to puppet.conf (where last_run_summary3.yaml does not 
exist)

`lastrunfile = $statedir/last_run_summary3.yaml { owner = service, group = 
service, mode = 666 }`

<pre>
notice: Finished catalog run in 0.08 seconds
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:184:in `chmod'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:184:in `save_last_run_summary'
/usr/lib/ruby/site_ruby/1.8/puppet/util/file_locking.rb:42:in `writelock'
/usr/lib/ruby/site_ruby/1.8/puppet/external/lock.rb:34:in `lock_exclusive'
/usr/lib/ruby/site_ruby/1.8/puppet/util/file_locking.rb:38:in `writelock'
/usr/lib/ruby/site_ruby/1.8/puppet/util/file_locking.rb:37:in `open'
/usr/lib/ruby/site_ruby/1.8/puppet/util/file_locking.rb:37:in `writelock'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:43:in `synchronize_on'
/usr/lib/ruby/1.8/sync.rb:229:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:43:in `synchronize_on'
/usr/lib/ruby/site_ruby/1.8/puppet/util/file_locking.rb:36:in `writelock'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:183:in `save_last_run_summary'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:174:in `send_report'
/usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:169:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run'
/usr/lib/ruby/1.8/sync.rb:229:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:43:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:95:in `with_client'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:41:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `call'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `controlled_run'
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:337:in `onetime'
/usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:311:in `run_command'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:416:in `hook'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:407:in `exit_on_fail'
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
/usr/bin/puppet:4
err: Could not save last run local report: can't convert String into Integer
debug: Value of 'preferred_serialization_format' (pson) is invalid for report, 
using default (b64_zlib_yaml)
debug: report supports formats: b64_zlib_yaml raw yaml; using b64_zlib_yaml
[root@localhost ~]# ls -ld /var/lib/puppet/state/last_run_summary3.yaml 
-rw------- 1 root root 0 Jul 16 09:10 
/var/lib/puppet/state/last_run_summary3.yaml
</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