Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-2793

Facter does not support timeout for shell out calls

    XMLWordPrintable

    Details

    • Template:
    • Team:
      Night's Watch
    • Sub-team:
    • Story Points:
      2
    • Sprint:
      ghost-16.09, ghost-23.09
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      External commands will have a timeout, and if they do not complete in the given time, they will be forced killed. The default timeout is 300 seconds. Users can specify a timeout using the `limit` attribute on `Facter::Core::Execution.execute` e.g.

      Facter::Core::Execution.execute("sleep 3", {:limit => 2})
      Show
      External commands will have a timeout, and if they do not complete in the given time, they will be forced killed. The default timeout is 300 seconds. Users can specify a timeout using the `limit` attribute on `Facter::Core::Execution.execute` e.g. Facter::Core::Execution.execute("sleep 3", {:limit => 2})
    • QA Risk Assessment:
      Needs Assessment

      Description

      The error was observed in the puppet-agent CI

      09:03:49       Info: Using configured environment 'production'
      09:03:49       Info: Retrieving pluginfacts
      09:03:49       Info: Retrieving plugin
      09:03:49       Info: Retrieving locales
      10:03:49       #<Thread:0x00000000039a8b18 /opt/puppetlabs/puppet/lib/ruby/2.7.0/open3.rb:287 run> terminated with exception (report_on_exception is true):
      10:03:49       /opt/puppetlabs/puppet/lib/ruby/2.7.0/open3.rb:287:in `read': stream closed in another thread (IOError)
      10:03:49       	from /opt/puppetlabs/puppet/lib/ruby/2.7.0/open3.rb:287:in `block (2 levels) in capture3'
      10:03:49       #<Thread:0x00000000039a88e8 /opt/puppetlabs/puppet/lib/ruby/2.7.0/open3.rb:288 run> terminated with exception (report_on_exception is true):
      10:03:49       /opt/puppetlabs/puppet/lib/ruby/2.7.0/open3.rb:288:in `read': stream closed in another thread (IOError)
      10:03:49       	from /opt/puppetlabs/puppet/lib/ruby/2.7.0/open3.rb:288:in `block (2 levels) in capture3'
      16:58:54 Build timed out (after 480 minutes). Marking the build as failed.
      

      After some investigation it seams that `Open3.capture3` hangs if the process it is running in kets soft kill while `capture3` is waiting for output.

      Add debug messages to identify what system call is executed.

        Attachments

          Activity

            People

            Assignee:
            oana.tanasoiu Oana Tanasoiu
            Reporter:
            bogdan.irimie Bogdan Irimie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support