euca-bundle-vol does not create essential tmpfs mounts when bundling Ubuntu images

Bug #450044 reported by Neil Soman
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
euca2ools
Fix Released
High
Unassigned
euca2ools (Ubuntu)
Fix Released
Medium
Dustin Kirkland 
Karmic
Won't Fix
Medium
Unassigned

Bug Description

One of the symptoms of this is that network interfaces are not properly ifup'ed on first boot.

To reproduce this bug (SRU validation):
------------------------------------------------------------
Right after starting an instance from a standard uec-image (64bit), I use the following procedure:

from your desktop:
scp -i mykey.prov ~/.euca/* ubuntu@<instance>:/tmp

in the instance:
# because of bug #457283
   #* edit fstab
   #* replace /dev/sdb by /dev/sda2 and on the same line ext3 by ext2
   #* mount /mnt
bucket=testbucket
prefix=test1
. /tmp/eucarc
if [ $(uname -m) = 'x86_64' ]; then
    arch=x86_64
else
    arch=i386
fi
sudo -E euca-bundle-vol -r $arch -d /mnt -p $prefix -u $EC2_USER_ID -k /tmp/euca2-admin-xxx-pk.pem -c /tmp/euca2-admin-xxx-cert.pem -s 2048 -e /mnt,/root/.ssh,/home/ubuntu/.ssh
euca-upload-bundle -b $bucket -m /mnt/$prefix.manifest.xml
euca-register $bucket/$prefix.manifest.xml

Start an instance of the new emi and wait until it is running.

From the CC
 * Try to ping it -> fail
 * Try to ssh to it -> fail

ec2-get-console-output ends with the following:
mount: mount point /var/run does not exist
mountall: mount /var/run [365] terminated with status 32
mountall: Filesystem could not be mounted: /var/run
mount: mount point /var/lock does not exist
mountall: mount /var/lock [366] terminated with status 32
mountall: Filesystem could not be mounted: /var/lock
mount: mount point /var/run does not exist
mountall: mount /var/run [367] terminated with status 32
mountall: Filesystem could not be mounted: /var/run
mount: mount point /var/lock does not exist
mountall: mount /var/lock [368] terminated with status 32
mountall: Filesystem could not be mounted: /var/lock
[ 4.965206] EXT3 FS on sda1, internal journal

Tags: uec
Revision history for this message
Neil Soman (neilsoman) wrote :

------------------------------------------------------------
revno: 221
committer: Neil
branch nick: euca2ools-1.0
timestamp: Mon 2009-10-12 20:05:41 -0700
message:
  fixes #450044
------------------------------------------------------------

Changed in eucalyptus:
status: New → Fix Committed
importance: Undecided → High
Nick Barcet (nijaba)
Changed in euca2ools (Ubuntu):
status: New → Confirmed
importance: Undecided → High
importance: High → Medium
Nick Barcet (nijaba)
description: updated
Nick Barcet (nijaba)
tags: added: uec
Mathias Gug (mathiaz)
Changed in euca2ools (Ubuntu Karmic):
status: New → Triaged
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in euca2ools (Ubuntu Karmic):
assignee: nobody → Thierry Carrez (ttx)
Thierry Carrez (ttx)
Changed in euca2ools (Ubuntu Karmic):
milestone: none → karmic-updates
Revision history for this message
Jason Rogers (juk80x) wrote :

This problem still occurs in revno 231

Revision history for this message
Jason Rogers (juk80x) wrote :

Check out line 944.

942 if self.debug:
943 print 'Making essential directory %s' % mount_location
944 os.makedirs(dir_path)

 It is indented, and therefore will not work unless you are running in debugging mode. Which is probably why duplicate bugs keep appearing even though it works in testing.

Revision history for this message
Neil Soman (neilsoman) wrote :

Jason, good eye. Fixed.

thanks for noticing that.
neil

Revision history for this message
Neil Soman (neilsoman) wrote :

Forgot to add revno. It is 232.

Revision history for this message
Mozg (andrei-arhont) wrote :

Neil,

After building and installing 232 revision, I get the following error:

# euca-bundle-vol
Traceback (most recent call last):
  File "/usr/bin/euca-bundle-vol", line 36, in <module>
    from euca2ools import Euca2ool, FileValidationError, DirValidationError, CopyError, MetadataReadError, Util
ImportError: No module named euca2ools

Any idea what could be the problem?

Thanks

Revision history for this message
Neil Soman (neilsoman) wrote :

Mozg, looks like it did not correctly install. Did you run "sudo make install"?

neil

Revision history for this message
Thierry Carrez (ttx) wrote :

Neil: for the karmic SRU we need to cherrypick this fix. Would this be fixed by applying the patches from rev221 + rev232, or does it depend on other euca-bundle-vol fixes (like the make_essential_devs function introduced in rev207) ?

Thierry Carrez (ttx)
Changed in euca2ools (Ubuntu Karmic):
status: Triaged → Won't Fix
assignee: Thierry Carrez (ttx) → nobody
Revision history for this message
Thierry Carrez (ttx) wrote :

After discussing it with upstream, was considered not critical-enough to warrant a karmic SRU. Will be fixed in Lucid soon. Please reopen if you feel otherwise.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Fixed upstream, merging.

Changed in euca2ools (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Dustin Kirkland (kirkland)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package euca2ools - 1.1~bzr238-0ubuntu1

---------------
euca2ools (1.1~bzr238-0ubuntu1) lucid; urgency=low

  * Merge from upstream bzr revision; should fix:
    - LP: #497495 - parse dir path correctly in euca-delete-bundle
    - LP: #439366 - show kernel and ramdisk in euca-describe-images
    - LP: #495618 - show blk dev mappings in euca-describe-image-attribute
    - LP: #485106 - read credentials from config file
    - LP: #450044 - create tmpfs mounts in euca-bundle-vol
    - LP: #479823 - correctly handle userid in euca-bundle-vol
    - LP: #461301 - fix user data encoding
  * Also, created Ubuntu packaging branch, with a common root to the upstream
    project
 -- Dustin Kirkland <email address hidden> Tue, 05 Jan 2010 23:13:36 -0600

Changed in euca2ools (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
cloudsuser (cloudsuser) wrote :

I am looking for to execute the shell script through ssh. Getting error as File not found: ''

1) $ssh -i key.pem root@<host> -C "sh /root/myScript.sh"
Output: File not found: ''

2) $ssh -i key.pem root@<host> -C "/bin/sh ec2-create-volume --size 10 --availability-zone us-east-1a"
Output: File not found: ''

Note:
1) I have read write permission to my remote machine script myScript.sh
2) I can able to manually execute the command "ec2-create-volume --size 10 --availability-zone us-east-1a" successfully
If i want to execute the same with ssh via script, how i should procede. Please help me on this.

What may be the issues ?

Revision history for this message
Scott Moser (smoser) wrote :

@cloudsuser,
  Your issue is not likely to be related to this bug. If you are unable to resolve your issue, please open a new bug.
   As a hint, you may get further debugging info using "/bin/sh -x". I believe that you're hitting general issues with running a command with arguments remotely in via ssh.
   Please open a new bug.
   Thank you.

Revision history for this message
graziano obertelli (graziano.obertelli) wrote :

This issue seems related to euca2ools not eucalyptus. Reassigning it. And closing it since it has been released.

affects: eucalyptus → euca2ools
Changed in euca2ools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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