Issue #8422 has been updated by Jeff McCune.

Status changed from In Topic Branch Pending Merge to Merged - Pending Release

# Merged #

Merged as:

<pre>
commit 7ab36b000f7b477d53dbff710952eb803efce3a8
Author: Jeff McCune <[email protected]>
Date:   Thu Jul 14 15:06:12 2011 -0700

    (#8422) Catch errors executing installer scripts
    
    This change uses Net::SSH to execute the remote installation script in a
    more controlled manner.  Previously, the use of tee was causing the
    remote command to always exit with a 0 status.  If the script actually
    failed, this 0 status would mask the failure and not present feedback to
    the end user.
    
    With this change, the tee command is removed.  The end user no longer
    gets an log of standard output stored on the remote system.
    
    In addition, Net::SSH channel sessions are being used to setup call
    backs to stream the standard output of the installation script and
    receive the exit code in a clear manner.
    
    There are two changes here.  One to execute the date command to ensure
    SSH is available.  This command is executed in a retry loop.
    
    After the date command, the actual installation script is uploaded and
    executed.
</pre>
----------------------------------------
Bug #8422: Install action with scripts should display errors if the install 
script has an error
https://projects.puppetlabs.com/issues/8422

Author: Jeff McCune
Status: Merged - Pending Release
Priority: Normal
Assignee: Jeff McCune
Category: cloudpack
Target version: 0.6.0
Keywords: install script ec2 cloudpack
Branch: ticket/master/8204_install_pe_from_s3


# Overview #

Consider the following action using 

<pre>
$ puppet node install --login root --keyfile $keyfile --install-script 
puppet-enterprise-s3 -vd ec2-50-16-130-0.compute-1.amazonaws.com
notice: Waiting for SSH response ...
notice: Waiting for SSH response ... Done
notice: Installing Puppet ...
debug: Compiled installation script:
debug: #! /bin/bash
#
set -e
set -u

# this assumes that the payload has already been delivered
tmpdir='/tmp/installer_script.31501'
cd "${tmpdir}"

# Download the installer payload from S3
exit 1

# copied by the install action of cloudpack
tar -xvzf puppet.tar.gz
grep -q '^q_puppetagent_certname' puppet.answers && (echo 'PE answers file 
already contains line q_puppetagent_certname';exit 1)
echo "q_puppetagent_certname='c0274a92-2236-2689-3161-cb9babf1cdff'" >> 
puppet.answers
puppet-enterprise-1.1-all/puppet-enterprise-installer -a puppet.answers >& 
install.log

notice: Executing Puppet Install Script ...
notice: Executing Puppet Install Script ... Done
c0274a92-2236-2689-3161-cb9babf1cdff
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to