Uploaded image for project: 'MCollective'
  1. MCollective
  2. MCO-778

mco client doesn't read publish_timeout from config

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: MCO 2.10.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      mco now reads the publish_timeout option from config for all requests (notably ping), and performing a threaded ping no longer throws an exception.

      Description

      When Mcollective::Client performs a request it can accept an optional publish_timeout. However this option is only ready from CLI flags and never read from the config. When the value isn't set then nil is silently used. This works when run unthreaded because nil is silently passed to Timeout.timeout and is then handled equivalently to 0, but this fails particularly hard when mco ping is run with the --threaded flag as it tries to set the total timeout to the given timeout plus the discovery timeout.

      peadmin@pe-201640-master:~$ mco ping --threaded -v
       
      The ping application failed to run: undefined method `+' for nil:NilClass
       
      undefined method `+' for nil:NilClass (NoMethodError)
      	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/mcollective/client.rb:212:in `threaded_req'  <----
      	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/mcollective/client.rb:181:in `req'
      	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/mcollective/application/ping.rb:57:in `main'
      	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/mcollective/application.rb:293:in `run'
      	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/mcollective/applications.rb:23:in `run'
      	from /opt/puppetlabs/puppet/bin/mco:33:in `<main>'
      

        Attachments

          Activity

            People

            • Assignee:
              qa qa
              Reporter:
              adrien Adrien Thebo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support