From f0179056f4b6e7d3bda4facb2607ba5b400a7830 Mon Sep 17 00:00:00 2001 From: Guido Trotter Date: Tue, 17 Feb 2009 13:51:38 +0000 Subject: [PATCH] 'msdos' is the default partition style from api10 But we still keep using 'none' for compatibility with ganeti 1.2 on api5 Reviewed-by: iustinp --- README | 3 ++- create.in | 7 ++++++- defaults | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README b/README index 99040bc..6c656ab 100644 --- 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 diff --git a/create.in b/create.in index 0995fa7..2a8f48c 100755 --- 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" diff --git a/defaults b/defaults index 76b3643..c065055 100644 --- 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" -- 1.7.2.5