Comment #10 on issue 1064 by [email protected]: Cannot install VM on Gluster bankend storage
https://code.google.com/p/ganeti/issues/detail?id=1064

Hi Petr,

Thanks for your reply. Actually I have not changed the main part of 'create' script. I installed up-to-date "git://git.ganeti.org/instance-debootstrap.git" tree.

$ git show
commit 5a8a67b7579d89488a9de4c2f44a15d61a5eee2b
Author: Apollon Oikonomopoulos <[email protected]>
Date:   Mon Mar 24 22:28:15 2014 +0200

root@node1:~# git diff instance-debootstrap/create /srv/ganeti/os/debootstrap/create
diff --git a/instance-debootstrap/create b/srv/ganeti/os/debootstrap/create
index 6565176..59e3ea0 100755
--- a/instance-debootstrap/create
+++ b/srv/ganeti/os/debootstrap/create
@@ -17,6 +17,8 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301, USA.

+echo "999 enter create script"
+
 set -e

 # minimum device size is 256 MB, but we use 255 to account for
@@ -37,7 +39,8 @@ CACHE_FILE="$CACHE_DIR/cache-${SUITE}-${DPKG_ARCH}.tar"
 if [ ! -b $blockdev ]; then
   ORIGINAL_BLOCKDEV=$blockdev
   blockdev=$(losetup --show -f $blockdev)
-  CLEANUP+=("losetup -d $blockdev")
+  echo "999 added udevadm here!!!"
+  CLEANUP+=("udevadm settle ; losetup -d $blockdev")
 fi

 DEVICE_SIZE=$(blockdev --getsize64 $blockdev)
@@ -47,12 +50,19 @@ if [ "$DEVICE_SIZE" -lt $MIN_DEV_SIZE ]; then
   exit 1
 fi

+echo "999 DEVICE_SIZE is $DEVICE_SIZE"
+
 if [ "$PARTITION_STYLE" = "none" ]; then
+  echo "999 style none"
   filesystem_dev=$blockdev
+  echo "999 filesystem_dev is $blockdev"
 elif [ "$PARTITION_STYLE" = "msdos" ]; then
+  echo "999 style msdos"
   # Create one big partition, and make it bootable
   format_disk0 $blockdev
+  echo "999 call format_disk0"
   filesystem_dev=$(map_disk0 $blockdev)
+  echo "999 filesystem_dev is $blockdev"
   CLEANUP+=("unmap_disk0 $blockdev")
 else
   echo "Unknown partition style $PARTITION_STYLE" 1>&2
@@ -62,6 +72,8 @@ fi
 mke2fs -Fjqt $OSP_FILESYSTEM $filesystem_dev
 root_uuid=$($VOL_ID $filesystem_dev )

+echo "999 run mke2fs here!!!"
+
 if [ -n "$swapdev" ]; then
   mkswap $swapdev
   swap_uuid=$($VOL_ID $swapdev || true )
@@ -113,6 +125,7 @@ else
   fi
 fi

+echo "999 reset passwd"
 # reset the root password
 chroot $TMPDIR passwd -d root

@@ -189,6 +202,8 @@ if [ -n "$RUN_PARTS" -a -n "$CUSTOMIZE_DIR" -a -d "$CUSTOMIZE_DIR" ]; then
   $RUN_PARTS $CUSTOMIZE_DIR
 fi

+echo "999 leave create script"
+
 # execute cleanups
 cleanup
 trap - EXIT

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

Reply via email to