| *Puppet Version: 5.5.14-1xenial *Puppet Server Version: 5.3.8-1xenial *OS Name/Version: Ubuntu 16.04 Xenial Describe your issue in as much detail as possible… When using tries in an exec resource the documentation states that the timeout parameter of the exec block applies to each try, but the code currently does not implement the functionality in that way. The timeout should apply to each try. Slack community chat snippet ``` natemccurdy [11 minutes ago] The timeout is for the entire exec, not for each try. (edited) Jason Grammenos [10 minutes ago] `Note that the timeout parameter applies to each try rather than to the complete set of tries.` natemccurdy [10 minutes ago] err.. sorry, You’re right. natemccurdy [10 minutes ago] Read that wrong. josh [9 minutes ago] The docs are wrong unfortunately Jason Grammenos [9 minutes ago] oh? natemccurdy [9 minutes ago] Oh, hah :slightly_smiling_face: josh [8 minutes ago] maybe it used to apply to each try at some point? natemccurdy [8 minutes ago] Either way, try removing the `timeout` or set it to `0` and see what happens. josh [6 minutes ago] Looks like it's been broken since https://github.com/puppetlabs/puppet/commit/e0e6b642c4e josh [5 minutes ago] The begin/rescue needs to be inside `tries.times do |try|` ``` Describe steps to reproduce… Desired Behavior: ``` exec { 'configure': command => "/bin/false", path => ['/usr/bin','/bin'], tries => 10, try_sleep => 5, timeout = 10, } ``` This should have a per try timeout of 10 seconds as per the documentation. Actual Behavior: The exec time's out because the current implementation applies the timeout to the whole set of tries. current documentation: https://puppet.com/docs/puppet/5.3/types/exec.html#exec-attribute-tries Please take a moment and attach any relevant log output and/or manifests. This will help us immensely when troubleshooting the issue. ``` Exec try 1/10 /etc/puppetlabs/code/modules/mm/manifests/graylog/graylog.pp:83 Jul 15 2019 - 14:10:34 Exec[configure-ldap](provider=posix) Executing 'curl -s -v -i --netrc-file /etc/graylog/server/configure_ldap.netrc -o /etc/graylog/server/configure_ldap.log -H "Content-Type: application/json" -H "X-Requested-By: puppet" -X PUT http://localhost:9000/api/system/ldap/settings --data @/etc/graylog/server/configure_ldap_data.json 2>&1 | grep 'HTTP/1.1 204'' Jul 15 2019 - 14:10:34 Puppet debug Executing: 'curl -s -v -i --netrc-file /etc/graylog/server/configure_ldap.netrc -o /etc/graylog/server/configure_ldap.log -H "Content-Type: application/json" -H "X-Requested-By: puppet" -X PUT http://localhost:9000/api/system/ldap/settings --data @/etc/graylog/server/configure_ldap_data.json 2>&1 | grep 'HTTP/1.1 204'' Jul 15 2019 - 14:10:44 Puppet err Command exceeded timeout ``` Relevant sections of /var/log/puppetlabs/puppetserver/puppetserver.log or any applicable logs from the same directory. For more detailed information turn up the server logs by upping the log level in the server's logback.xml Relevant sections of configurations files (puppet.conf, hiera.conf, Server's conf.d, defaults/sysconfig) For memory issues with server heap dumps are also helpful. |