euca-bundle-vol places filesystem in subdirectory

Bug #696027 reported by Matthew Powell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
euca2ools
New
Undecided
Mitch Garnaat

Bug Description

euca-bundle-vol should be able to create a bundle from a mounted filesystem using the -v option. However, the image it creates contains the filesystem in a subdirectory, not at the filesystem root:

For example, with my "root" filesystem mounted at /imagebuild/image, I ran the following:

euca-bundle-vol -v /imagebuild/image -p my-rhel-image -d /imagebuild/bundle -e /imagebuild/bundle/var/lib/dhclient --no-inherit

I expected the contents of /imagebuild/image to be the image root, but the image created contained a subdirectory called "image" that contained my files instead.

Knowing that euca-bundle-vol uses rsync, I next tried this:

euca-bundle-vol -v /imagebuild/image/ -p rhel-sshkey -d /imagebuild/bundle -e /imagebuild/bundle/var/lib/dhclient --no-inherit

but got the same result.

Revision history for this message
Matthew Powell (mpowell) wrote :

Looking at the euca-bundle-vol script, it uses Python's os.path.normpath, which strips the trailing slash before passing the path to rsync, so the directory given for -v will always be created as a subdirectory in the image. See http://bugs.python.org/issue1707768.

Removing the line "volume_path = os.path.normpath(volume_path)" from the euca-bundle-vol script makes my second command (with the trailing slash) work as I expected.

Perhaps euca-bundle-vol should always add a trailing slash before passing the path to rsync, though.

Daniel Nurmi (nurmi)
Changed in eucalyptus:
assignee: nobody → Mitch Garnaat (mitch-garnaat)
Revision history for this message
graziano obertelli (graziano.obertelli) wrote :

this seems a euca2ools issue.

affects: eucalyptus → euca2ools
Revision history for this message
Andy Grimm (agrimm) wrote :

This issue is now being tracked upstream at http://eucalyptus.atlassian.net/browse/TOOLS-101

Please watch that issue for further updates.

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.