Issue #2661 has been updated by Markus Roberts.

After some initial frustration I've found a way to reproduce these cases 
semi-systematically, by adding the following monkey patch to 
lib/puppet/util/monkey_patches.rb:

    require "timeout"

    module Timeout
        def timeout(sec, exception=Error)
            raise exception, "fake timeout" if rand(100) == 0

            return yield if sec == nil or sec.zero?
            raise ThreadError, "timeout within critical session" if 
Thread.critical
            begin
                x = Thread.current
                y = Thread.start {
                    sleep sec
                    x.raise exception, "execution expired" if x.alive?
                }
                yield sec
            ensure
                y.kill if y and y.alive?
            end
        end
        module_function :timeout
    end

It basically forces a timeout on 1% of the operations (low enough that it 
doesn't always die in the same place, but high enough that we see lots of 
failures).

I'm letting it run semi-autonomously for a while to collect code paths, then 
will revise the patch.

I don't think we need a separate bug report for the lockfile symptom since the 
solution would be the identical--find the code paths that are escaping 
exception handling and rectify them.


----------------------------------------
Bug #2661: puppetd exits if the master is unreachable.
http://projects.reductivelabs.com/issues/2661

Author: R.I. Pienaar aka Volcane
Status: Accepted
Priority: Normal
Assigned to: Markus Roberts
Category: plumbing
Target version: 0.25.2
Affected version: 0.25.0
Keywords: 
Branch: http://github.com/MarkusQ/puppet/tree/ticket/master/2661


In the event that the master becomes unreachable the puppetd will exit instead 
of use the cache, retry later etc like older puppetd did.

<pre>
# iptables -I INPUT -s puppet -j DROP
# puppetd --debug --trace --no-daemonize
<snip>
/usr/lib/ruby/1.8/timeout.rb:54:in `open': execution expired (Timeout::Error)
        from /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
        from /usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
        from /usr/lib/ruby/1.8/timeout.rb:76:in `timeout'
        from /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
        from /usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
        from /usr/lib/ruby/1.8/net/http.rb:542:in `start'
        from /usr/lib/ruby/1.8/net/http.rb:1035:in `request'
        from /usr/lib/ruby/1.8/net/http.rb:772:in `get'
         ... 28 levels...
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:217:in `run'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in 
`exit_on_fail'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:217:in `run'
        from /usr/sbin/puppetd:159
</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://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