Jira (FACT-2793) Facter does not support timeout for shell out calls

14 views
Skip to first unread message

Bogdan Irimie (Jira)

unread,
Sep 9, 2020, 9:12:04 AM9/9/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
 
Facter / Bug FACT-2793
Facter does not support timeout for shell out calls
Change By: Bogdan Irimie
Summary: Open3.capture3 hangs if a long running process gets soft killed Facter does not support timeout for shell out calls
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Bogdan Irimie (Jira)

unread,
Sep 9, 2020, 9:13:03 AM9/9/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
The error was observed in the puppet-agent CI

{code}
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.
{code}

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.

Bogdan Irimie (Jira)

unread,
Sep 9, 2020, 9:19:03 AM9/9/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Sep 9, 2020, 9:19:04 AM9/9/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Sprint: ready for triage ghost-16.09

Oana Tanasoiu (Jira)

unread,
Sep 11, 2020, 4:30:03 AM9/11/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Sep 16, 2020, 9:11:04 AM9/16/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Sprint: ghost-16.09 , ready for triage 2

Mihai Buzgau (Jira)

unread,
Nov 5, 2020, 9:39:05 AM11/5/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Fix Version/s: FACT 4.0.45

Bogdan Irimie (Jira)

unread,
Nov 5, 2020, 10:03:03 AM11/5/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Release Notes Summary: 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})

Claire Cadman (Jira)

unread,
Nov 10, 2020, 5:59:03 AM11/10/20
to puppe...@googlegroups.com
Claire Cadman updated an issue
Change By: Claire Cadman
Labels: doc_reviewed platform_7
Reply all
Reply to author
Forward
0 new messages