Bug 859407

Summary: Puppet exec timeout not honored during configuration
Product: Red Hat Satellite Reporter: Og Maciel <omaciel>
Component: InstallationAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Og Maciel <omaciel>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: asettle, dmacpher, lzap, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Some configuration steps required longer execution periods to complete. However, the default timeout for puppet commands was set to 300 seconds, which caused problems for lengthy operations. This fix sets the timeout to 0 (disabled) for operations that require longer execution periods.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 19:56:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Og Maciel 2012-09-21 13:35:07 UTC
Description of problem:

While running the configuration for the first time, I saw the following:

  Starting Katello configuration
  The top-level log file is [/var/log/katello/katello-configure-20120920-121057/main.log]
  [1;35merr: /Stage[main]/Mongodb::Config/Exec[mongo-journal-prealloc]/returns:  change from notrun to 0 failed: Command exceeded timeout at /usr/share/katello/install/puppet/modules/mongodb/manifests/config.pp:25[0m
  Creating Candlepin database user
  ############################################################ ... OK
  Creating Katello database user
  ############################################################ ... OK
  Creating Katello database
  ############################################################ ... OK

According to http://docs.puppetlabs.com/references/latest/type.html#exec, a default value of zero should disable the timeout for very lenghy operation.

Also see http://projects.puppetlabs.com/issues/11686

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.  Run katello-configure --deployment=cfse
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Lukas Zapletal 2012-09-21 13:37:45 UTC
http://projects.puppetlabs.com/issues/11686

Default timeout for all exec commands in puppet is 300 secs.

We must add timeout => 0 for all lenghy command. That is mongo-journal-prealloc and maybe wait-for-tomcat. Would be good to do review of all our modules for exec steps.

Comment 3 Og Maciel 2012-09-21 14:03:56 UTC
This fixed my problem:

# diff -Naur config.pp /usr/share/katello/install/puppet/modules/mongodb/manifests/config.pp
--- config.pp	2012-09-21 09:13:41.281594433 -0400
+++ /usr/share/katello/install/puppet/modules/mongodb/manifests/config.pp	2012-09-21 09:14:46.090449764 -0400
@@ -21,6 +21,7 @@
     require => File["/var/lib/mongodb/journal"],
     # after mongo has started it renames prealloc.0 to j._0
     creates => "/var/lib/mongodb/journal/j._0",
-    before  => Class["mongodb::service"]
+    before  => Class["mongodb::service"],
+    timeout => 0
   }
 }

Comment 4 Lukas Zapletal 2012-09-21 14:28:13 UTC
https://github.com/Katello/katello/pull/728

Fixing cos its blocking quality engineering!

Comment 10 Og Maciel 2012-10-16 15:34:07 UTC
Verified:

* candlepin-0.7.8.1-1.el6cf.noarch
* candlepin-selinux-0.7.8.1-1.el6cf.noarch
* candlepin-tomcat6-0.7.8.1-1.el6cf.noarch
* katello-1.1.12-16.el6cf.noarch
* katello-all-1.1.12-16.el6cf.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1.el6cf.noarch
* katello-cli-1.1.8-7.el6cf.noarch
* katello-cli-common-1.1.8-7.el6cf.noarch
* katello-common-1.1.12-16.el6cf.noarch
* katello-configure-1.1.9-7.el6cf.noarch
* katello-glue-candlepin-1.1.12-16.el6cf.noarch
* katello-glue-pulp-1.1.12-16.el6cf.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.1.1-1.el6cf.noarch
* pulp-1.1.13-1.el6cf.noarch
* pulp-common-1.1.13-1.el6cf.noarch
* pulp-selinux-server-1.1.13-1.el6cf.noarch

Comment 12 errata-xmlrpc 2012-12-04 19:56:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1543.html