title: user data scripts fails without giving reason
body: <p>I am starting a Amazon Linux instance (ami-fb8e9292) using the web console, pasting data into the user data box to run a script upon startup.  If I use the <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html" rel="noreferrer">example given by amazon </a> to start a web server, it works.  But when I run my own script (also a <code>#!/bin/bash</code> script), it does not get run.  </p>
  
  <p>If I look in <code>var/log/cloud-init.log</code>, it gives no useful information on the topic:</p>
  
  <pre><code>May 22 21:06:12 cloud-init[1286]: util.py[DEBUG]: Running command ['/var/lib/cloud/instance/scripts/part-001'] with allowed return codes [0] (shell=True, capture=False)
  May 22 21:06:16 cloud-init[1286]: util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/part-001 [2]
  May 22 21:06:16 cloud-init[1286]: util.py[DEBUG]: Failed running /var/lib/cloud/instance/scripts/part-001 [2]
  Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/cloudinit/util.py", line 637, in runparts
      subp([exe_path], capture=False, shell=True)
    File "/usr/lib/python2.6/site-packages/cloudinit/util.py", line 1528, in subp
      cmd=args)
  ProcessExecutionError: Unexpected error while running command.
  Command: ['/var/lib/cloud/instance/scripts/part-001']
  Exit code: 2
  Reason: -
  Stdout: ''
  Stderr: ''
  </code></pre>
  
  <p>If I ssh into the instance and <code>sudo su</code> and execute the shell script directly:</p>
  
  <pre><code>/var/lib/cloud/instance/scripts/part-001
  </code></pre>
  
  <p>then it runs fine.  Also, it works if I emulate the way cloud-init runs it:</p>
  
  <pre><code>python
  &gt;&gt;&gt; import cloudinit.util
  &gt;&gt;&gt; cloudinit.util.runparts("/var/lib/cloud/instance/scripts/")
  </code></pre>
  
  <p>Using either of those methods, if I intentionally introduce errors into the script then it produces error messages.  How can I debug the selective absence of useful debugging output?</p>