Don't hang waiting for input from commands

Bug #903993 reported by Drew Mazurek
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Scott Moser
cloud-init (Ubuntu)
Fix Released

Bug Description

If a command is interactive and opens up stdin, the entire deploy will hang. cloud-init should close stdin if anything tries to open it. Examples of this are:

- apt-add-repository ppa:xxx/yyy


- apt-get install foo

(Specifically without the -y option. -y on those commands would be a workaround for this bug.)

Tags: hang stdin

Related branches

Dave Walker (davewalker)
Changed in cloud-init (Ubuntu):
importance: Undecided → High
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

This makes sense to me. Its simpler even than you suggest. I see no good reason that cloud-init ever should read from stdin, so it should probably just re-open stdin as /dev/null. Any program that hangs waiting for input from a non tty like /dev/null is doing things wrong, or is being invoked incorrectly.

I don't see this as High though, as it can be worked around by not running programs that wait for input from stdin. Dropping to Medium, and forwarding to cloud-init upstream project.

Changed in cloud-init (Ubuntu):
status: New → Triaged
importance: High → Medium
Scott Moser (smoser)
Changed in cloud-init:
assignee: nobody → Scott Moser (smoser)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Scott Moser (smoser) wrote :

fix-commited in upstream cloud-init at revision 490.

Scott Moser (smoser)
Changed in cloud-init:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.6.3~bzr497-0ubuntu1

cloud-init (0.6.3~bzr497-0ubuntu1) precise; urgency=low

  * New upstream snapshot.
    - cloud-config support for configuring apt-proxy
    - selection of local mirror based on presense of 'ubuntu-mirror' dns
      entry in local domain. (LP: #897688)
    - DataSourceEc2: more resilliant to slow metadata service (LP: #894279)
    - close stdin in all programs launched by cloud-init (LP: #903993)
    - revert management of /etc/hosts to 0.6.1 style (LP: #890501, LP: #871966)
    - write full ssh keys to console for easy machine consumption (LP: #893400)
    - put INSTANCE_ID environment variable in bootcmd scripts
    - add 'cloud-init-per' script for easily running things with a given freq
      (this replaced cloud-init-run-module)
    - support configuration of landscape-client via cloud-config (LP: #857366)
    - part-handlers now get base64 decoded content rather than 2xbase64 encoded
      in the payload parameter. (LP: #874342)
 -- Scott Moser <email address hidden> Thu, 22 Dec 2011 04:07:38 -0500

Changed in cloud-init (Ubuntu):
status: Triaged → Fix Released
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.