euca-bundle-vol places filesystem in subdirectory
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/
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/
but got the same result.
Changed in eucalyptus: | |
assignee: | nobody → Mitch Garnaat (mitch-garnaat) |
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/issue170776 8.
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.