'msdos' is the default partition style from api10
authorGuido Trotter <ultrotter@google.com>
Tue, 17 Feb 2009 13:51:38 +0000 (13:51 +0000)
committerGuido Trotter <ultrotter@google.com>
Tue, 17 Feb 2009 13:51:38 +0000 (13:51 +0000)
But we still keep using 'none' for compatibility with ganeti 1.2 on api5

Reviewed-by: iustinp

README
create.in
defaults

diff --git a/README b/README
index 99040bc..6c656ab 100644 (file)
--- a/README
+++ b/README
@@ -71,7 +71,8 @@ named 'defaults' in the source distribution for more details):
   weeks)
 - PARTITION_STYLE: if 'none' the device will be formatted directly, if 'msdos'
   a partition table will be installed on it. You need to have kpartx installed
-  to use the 'msdos' option.
+  to use the 'msdos' option. The default is 'msdos' from Ganeti 2.0 onwards,
+  but still 'none' if installing under Ganeti 1.2
 
 Note that the settings file is important on the node that the instance
 is installed on, not the cluster master. This is indeed not a very good
index 0995fa7..2a8f48c 100755 (executable)
--- a/create.in
+++ b/create.in
@@ -51,7 +51,12 @@ fi
 : ${CUSTOMIZE_DIR:="@sysconfdir@/ganeti/instance-debootstrap.d"}
 : ${GENERATE_CACHE:="yes"}
 : ${CLEAN_CACHE:="14"} # number of days to keep a cache file
-: ${PARTITION_STYLE:="none"} # disk partition style
+if [ -z "$OS_API_VERSION" -o "$OS_API_VERSION" = "5" ]; then
+  DEFAULT_PARTITION_STYLE="none"
+else
+  DEFAULT_PARTITION_STYLE="msdos"
+fi
+: ${PARTITION_STYLE:=$DEFAULT_PARTITION_STYLE} # disk partition style
 
 CACHE_DIR="@localstatedir@/cache/ganeti-instance-debootstrap"
 
index 76b3643..c065055 100644 (file)
--- a/defaults
+++ b/defaults
@@ -58,4 +58,6 @@ CLEAN_CACHE="14"
 # 'msdos': install an msdos partition table on the device, with a single
 #          partition on it
 # (more styles may be added in the future)
+# The default is "msdos" from ganeti 2.0 onwards, but none if installing under
+# Ganeti 1.2 (os api version 5)
 PARTITION_STYLE="none"