Issue #2295 has been updated by Anselm Strauss.

I think the problem is in the old_parse function of settings.rb:

*** settings.rb.orig    Thu May 28 15:18:32 2009
--- settings.rb Thu May 28 15:20:33 2009
***************
*** 407,417 ****
              raise Puppet::Error, "Permission denied to file %s" % file
          end

!         @sync.synchronize do
!             @values = Hash.new { |names, name|
!                 names[name] = {}
!             }
!         end

          # Get rid of the values set by the file, keeping cli values.
          self.clear(true)
--- 407,417 ----
              raise Puppet::Error, "Permission denied to file %s" % file
          end

!         #[email protected] do
!         #    @values = Hash.new { |names, name|
!         #        names[name] = {}
!         #    }
!         #end

          # Get rid of the values set by the file, keeping cli values.
          self.clear(true)

This removes all set option values, although the cli options should not be 
removed, as stated in the clear() call below.

The old config files (puppetmasterd.conf, puppetd.conf, ...) are read after cli 
options are set, but before the --genconfig option is evaluated. Like that, 
puppet sets the options, clears them again, loads the config file, sets default 
values for empty options, and then runs. As soon as I have an old config file 
around, cli options have no effect.

In my case this was when I had an empty config file (also created with output 
redirection '>' in bash), and tried to do a --genconfig. Default for genconfig 
is false and for daemonize it's true. So it did not output any config and 
forked into the background.
----------------------------------------
Bug #2295: "puppetmasterd --genconfig" starts daemon
http://projects.reductivelabs.com/issues/2295

Author: Anselm Strauss
Status: Needs more information
Priority: Normal
Assigned to: 
Category: executables
Target version: 
Complexity: Unknown
Affected version: 0.24.8
Keywords: 


Two problems I see here:

1. I don't expect the daemon to run when I only want to output a commented 
default configuration:

-> ps afx
70982 ?? Ss 0:00.02 /usr/local/bin/ruby18 /usr/local/bin/puppetmasterd 
--genconfig

2. After some time, running the command a second time is not possible since the 
daemon is then already running:

-> puppetmasterd --genconfig
Could not start WEBrick: Address already in use - bind(2)

Running on FreeBSD 7.2 with ruby 1.8.7.


-- 
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=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to