ec2-run-user-data does not run user-data scripts ('int' object has no attribute 'write')

Bug #313371 reported by Eric Hammond
8
Affects Status Importance Assigned to Milestone
Ubuntu on EC2
Fix Released
Undecided
Unassigned

Bug Description

When I run the current official Ubuntu 32-bit beta AMI (ami-814aaee8) and pass in a script using user-data, the script is not run.

I have tracked this down to the following error from ec2-run-user-data:

  Traceback (most recent call last):
    File "/usr/sbin/ec2-run-user-data", line 41, in <module>
      fp.write(data)
  AttributeError: 'int' object has no attribute 'write'

Here is are sample commands to start an instance with a user-data script:

  cat >sample-user-data <<EOF
#!/bin/bash
echo "hello world"
EOF

  ec2-run-instances \
    --user-data-file sample-user-data \
    --key YOURKEYPAIR \
    ami-814aaee8

Revision history for this message
Chuck Short (zulcss) wrote :

I have this fixed locally and will push it for the next beta. Thanks for the bug report.

Regards
chuck

Changed in ubuntu-on-ec2:
status: New → In Progress
milestone: none → beta2
Revision history for this message
Chuck Short (zulcss) wrote :

This is fixed for beta2

Changed in ubuntu-on-ec2:
status: In Progress → Fix Committed
Chuck Short (zulcss)
Changed in ubuntu-on-ec2:
status: Fix Committed → Fix Released
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.