Alexandros Kosiaris has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/201231

Change subject: ganeti.cfg partman configuration
......................................................................

ganeti.cfg partman configuration

Make the ganeti partman configuration create 2 VGs, one named local and
one named ganeti. The local one will have the system and the ganeti one
the VMs. This took a lot lot of experimentation to create and there is a
catch. There is one single enter that needs to be pressed in an error
menu from partman

Change-Id: I7124a2810ef75c68948f773f02e529a618d96754
---
M modules/install-server/files/autoinstall/partman/ganeti.cfg
1 file changed, 44 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/201231/1

diff --git a/modules/install-server/files/autoinstall/partman/ganeti.cfg 
b/modules/install-server/files/autoinstall/partman/ganeti.cfg
index cc83bcc..41d2ce3 100644
--- a/modules/install-server/files/autoinstall/partman/ganeti.cfg
+++ b/modules/install-server/files/autoinstall/partman/ganeti.cfg
@@ -1,23 +1,37 @@
 # configuration to create:
 #  * no RAID (hardware RAID is assumed)
 #  * 300M on /boot outside of LVM
-#  * the rest LVM
-#  ** 20G /
-#  ** 8G swap
-# Differences from lvm.cfg:
-#      The name of the VG is explicitly set to ganeti
+#  * LVM: 50G PV/VG named local containing:
+#  ** 20G / LV
+#  ** 8G swap Lv
+#  * LVM: The rest one big empty PV/VG named ganeti
 
-d-i    partman-auto/method     string  lvm
-d-i    partman-auto/disk       string  /dev/sda
+d-i    partman-auto/method     string lvm
+d-i    partman-auto/disk       string /dev/vda
+
+# Do force a new label
+d-i    partman/confirm_write_new_label boolean true
+
+# wipe md RAID
+d-i    partman-md/device_remove_md     boolean true
+d-i    partman-md/confirm_nooverwrite  boolean true
 
 # the install makes sure we want to wipe the lvm
 d-i    partman-lvm/device_remove_lvm   boolean true
+d-i    partman-lvm/confirm             boolean true
+d-i    partman-lvm/confirm_nooverwrite boolean true
 
-d-i    partman-auto-lvm/new_vg_name    string ganeti
+d-i    partman/confirm_nooverwrite     boolean true
+d-i    partman/choose_partition        select finish
+
+d-i    partman-auto-lvm/new_vg_name    string local
+d-i    partman/confirm                 boolean true
 
 # Define physical partitions
-d-i    partman-auto/expert_recipe      string  lvm ::  \
-               300     1       300     ext3            \
+# Note: strangely enough ganeti PV is before local PV. I could not find a way
+# to have them in the correct order and partman not misbehave
+d-i    partman-auto/expert_recipe      string  ganeti :: \
+               300     300     300     ext3            \
                        $primary{ }                     \
                        $bootable{ }                    \
                        method{ format }                \
@@ -26,29 +40,34 @@
                        filesystem{ ext4 }              \
                        mountpoint{ /boot }             \
                .                                       \
-               20000   2       20000   ext3            \
-                       $defaultignore{ }               \
+               20000   20000   20000   ext3            \
                        $lvmok{ }                       \
-                       lv_name{ root }                 \
                        method{ format }                \
                        format{ }                       \
                        use_filesystem{ }               \
+                       lv_name{ root }                 \
+                       in_vg{ local }                  \
                        filesystem{ ext4 }              \
                        mountpoint{ / }                 \
                .                                       \
-               8000    3       8000    linux-swap      \
-                       $defaultignore{ }               \
-                       method{ swap }                  \
+               8000 8000 8000 linux-swap               \
                        $lvmok{ }                       \
+                       method{ swap }                  \
+                       lv_name{ swap }                 \
+                       in_vg{ local }                  \
                        format{ }                       \
+               .                                       \
+               1000    10000000        -1      ext3    \
+                       $primary{ }                     \
+                       method{ lvm }                   \
+                       device{ /dev/vda }              \
+                       vg_name{ ganeti }               \
+               .                                       \
+               50000   50000   50000           ext3    \
+                       $primary{ }                     \
+                       method{ lvm }                   \
+                       device{ /dev/vda }              \
+                       vg_name{ local }                \
                .
-d-i    partman/confirm_write_new_label boolean true
-d-i    partman/choose_partition        select  finish
-d-i    partman/confirm                 boolean true
-d-i    partman/confirm_nooverwrite     boolean true
 
-d-i    partman-auto-lvm/guided_size    string  80%
-d-i    partman-auto/choose_recipe      lvm
-d-i    partman-lvm/confirm             boolean true
-d-i    partman-lvm/confirm_nooverwrite boolean true
-
+d-i    partman-auto-lvm/guided_size    string 80%

-- 
To view, visit https://gerrit.wikimedia.org/r/201231
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7124a2810ef75c68948f773f02e529a618d96754
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to