Issue #21935 has been reported by Josh Partlow.

----------------------------------------
Bug #21935: Puppet agent will raise an unhelpful exception if client returns a 
non-numeric result.
https://projects.puppetlabs.com/issues/21935

* Author: Josh Partlow
* Status: Unreviewed
* Priority: Normal
* Assignee: 
* Category: agent
* Target version: 
* Affected Puppet version: 3.2.3
* Keywords: agent exit codes
* Branch: 
----------------------------------------
Puppet agent's run_in_fork method exit's with the result of yield, and exit 
raises an exception if given a non-integer.  When an agent is run, it 
run_in_fork's around a block which executes it's client's run method.  The 
client is Configurer, and it's run method does not guarantee an integer return. 
 If it hits a pre-run, post-run, or other exception it returns nil and 
execution halts with an exception raised by exit itself.

For example, with an agent that has successfully run a `puppet agent -t 
--server puppetmaster` and has a valid cert from that puppetmaster:

    $ puppet agent --no-daemonize --server not-on-line
    /home/jpartlow/work/puppet/lib/puppet/agent.rb:89:in `exit': no implicit 
conversion from nil to integer (TypeError)
        from /home/jpartlow/work/puppet/lib/puppet/agent.rb:89:in `block in 
run_in_fork'
        from /home/jpartlow/work/puppet/lib/puppet/agent.rb:86:in `fork'
        from /home/jpartlow/work/puppet/lib/puppet/agent.rb:86:in `run_in_fork'
        from /home/jpartlow/work/puppet/lib/puppet/agent.rb:41:in `block in run'
        from /home/jpartlow/work/puppet/lib/puppet/application.rb:179:in `call'
        from /home/jpartlow/work/puppet/lib/puppet/application.rb:179:in 
`controlled_run'
        from /home/jpartlow/work/puppet/lib/puppet/agent.rb:39:in `run'
        from /home/jpartlow/work/puppet/lib/puppet/daemon.rb:167:in `block in 
run_event_loop'
        from /home/jpartlow/work/puppet/lib/puppet/scheduler/job.rb:49:in `call'
        from /home/jpartlow/work/puppet/lib/puppet/scheduler/job.rb:49:in `run'
        from /home/jpartlow/work/puppet/lib/puppet/scheduler/scheduler.rb:39:in 
`block in run_ready'
        from /home/jpartlow/work/puppet/lib/puppet/scheduler/scheduler.rb:34:in 
`each'
        from /home/jpartlow/work/puppet/lib/puppet/scheduler/scheduler.rb:34:in 
`run_ready'
        from /home/jpartlow/work/puppet/lib/puppet/scheduler/scheduler.rb:11:in 
`run_loop'
        from /home/jpartlow/work/puppet/lib/puppet/daemon.rb:183:in 
`run_event_loop'
        from /home/jpartlow/work/puppet/lib/puppet/daemon.rb:142:in `start'
        from /home/jpartlow/work/puppet/lib/puppet/application/agent.rb:382:in 
`main'
        from /home/jpartlow/work/puppet/lib/puppet/application/agent.rb:328:in 
`run_command'
        from /home/jpartlow/work/puppet/lib/puppet/application.rb:364:in `block 
(2 levels) in run'
        from /home/jpartlow/work/puppet/lib/puppet/application.rb:457:in 
`plugin_hook'
        from /home/jpartlow/work/puppet/lib/puppet/application.rb:364:in `block 
in run'
        from /home/jpartlow/work/puppet/lib/puppet/util.rb:511:in `exit_on_fail'
        from /home/jpartlow/work/puppet/lib/puppet/application.rb:364:in `run'
        from /home/jpartlow/work/puppet/lib/puppet/util/command_line.rb:132:in 
`run'
        from /home/jpartlow/work/puppet/lib/puppet/util/command_line.rb:86:in 
`execute'
        from /home/jpartlow/work/puppet/bin/puppet:4:in `<top (required)>'
        from 
/home/jpartlow/work/puppet/.bundle/gems/ruby/1.9.1/bin/puppet:23:in `load'



-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to