Filippo Giunchedi has submitted this change and it was merged.

Change subject: swift: provision ms-be101[678]
......................................................................


swift: provision ms-be101[678]

HP machines have different disk ordering unfortunately as discovered in T90922,
thus duplicate/split site.pp entries and d-i preseed to accomodate that. The
swift ring will be also changed accordingly.

Bug: T90922
Change-Id: I45ad8699bf5f6b7cd17e646137c4e0bb3ff57bb2
---
M manifests/site.pp
M modules/install-server/files/autoinstall/netboot.cfg
A modules/install-server/files/autoinstall/partman/ms-be-eqiad-hp.cfg
3 files changed, 85 insertions(+), 2 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/manifests/site.pp b/manifests/site.pp
index 98f3904..7be6c5a 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1805,7 +1805,7 @@
     include role::diamond
 }
 
-node /^ms-be10[0-9][0-9]\.eqiad\.wmnet$/ {
+node /^ms-be10(0[0-9]|1[0-5])\.eqiad\.wmnet$/ {
     $all_drives = [
         '/dev/sda', '/dev/sdb', '/dev/sdc', '/dev/sdd',
         '/dev/sde', '/dev/sdf', '/dev/sdg', '/dev/sdh',
@@ -1822,6 +1822,24 @@
     swift::mount_filesystem{ '/dev/sdn3': }
 }
 
+# HP machines have different disk ordering T90922
+node /^ms-be101[678]\.eqiad\.wmnet$/ {
+    $all_drives = [
+        '/dev/sdm', '/dev/sdn', '/dev/sdc', '/dev/sdd',
+        '/dev/sde', '/dev/sdf', '/dev/sdg', '/dev/sdh',
+        '/dev/sdi', '/dev/sdj', '/dev/sdk', '/dev/sdl'
+                   ]
+
+    role swift::eqiad_prod::storage
+
+    swift::create_filesystem{ $all_drives: partition_nr => '1' }
+    # these are already partitioned and xfs formatted by the installer
+    swift::label_filesystem{ '/dev/sda3': }
+    swift::label_filesystem{ '/dev/sdb3': }
+    swift::mount_filesystem{ '/dev/sda3': }
+    swift::mount_filesystem{ '/dev/sdb3': }
+}
+
 node /^ms-fe300[1-2]\.esams\.wmnet$/ {
     role swift::esams_prod::proxy
 }
diff --git a/modules/install-server/files/autoinstall/netboot.cfg 
b/modules/install-server/files/autoinstall/netboot.cfg
index 3d2744a..ed38f60 100755
--- a/modules/install-server/files/autoinstall/netboot.cfg
+++ b/modules/install-server/files/autoinstall/netboot.cfg
@@ -71,7 +71,9 @@
 #              sodium) echo partman/mailserver.cfg ;; \
                mc[1-9]*) echo partman/mc.cfg ;; \
                ms-fe[1-2]0[0-9][0-9]) echo partman/raid1-1partition.cfg ;; \
-               ms-be[1-2]0[0-9][0-9]) echo partman/ms-be-eqiad.cfg ;; \
+               ms-be20[0-9][0-9]) echo partman/ms-be-eqiad.cfg ;; \
+               ms-be100[0-9]|ms-be101[0-5]) echo partman/ms-be-eqiad.cfg ;; \
+               ms-be101[678]) echo partman/ms-be-eqiad-hp.cfg ;; \
                ms-fe30[0-9][0-9]) echo partman/flat.cfg ;; \
                ms-be30[0-9][0-9]) echo partman/ms-be-esams.cfg ;; \
                mw[0-9]*|osmium|rcs[0-9]*) echo partman/mw.cfg ;; \
diff --git 
a/modules/install-server/files/autoinstall/partman/ms-be-eqiad-hp.cfg 
b/modules/install-server/files/autoinstall/partman/ms-be-eqiad-hp.cfg
new file mode 100644
index 0000000..65c03ed
--- /dev/null
+++ b/modules/install-server/files/autoinstall/partman/ms-be-eqiad-hp.cfg
@@ -0,0 +1,63 @@
+# Automatic software RAID partitioning
+#
+# * two disks, sda & sdb (SSD)
+# * primary partitions, no LVM
+# * layout:
+#   - /          : ext3, RAID1, 60GB
+#   - swap: RAID1, 1GB
+#   - the rest of each respective disk (no RAID) formatted as xfs, unmounted
+
+d-i    partman-auto/method             string  raid
+
+d-i    partman-md/device_remove_md     boolean true
+d-i    partman-lvm/device_remove_lvm   boolean true
+
+d-i    partman-auto/disk       string  /dev/sda /dev/sdb
+d-i    grub-installer/bootdev  string  /dev/sda /dev/sdb
+
+# this workarounds LP #1012629 / Debian #666974
+# it makes grub-installer to jump to step 2, where it uses bootdev
+d-i    grub-installer/only_debian      boolean false
+
+# Define physical partitions
+d-i    partman-auto/expert_recipe      string  \
+               multiraid ::    \
+                       30000   8000    30000   raid            \
+                               $primary{ } method{ raid }      \
+                       .                                       \
+                       1000    1000    1000    raid            \
+                               $primary{ } method{ raid }      \
+                       .                                       \
+                       60000   500     120000  xfs             \
+                               $primary{ } method{ format }    \
+                               format{ } use_filesystem{ }     \
+                               filesystem{ xfs }               \
+                       . \
+                       30000   10000   -1      raid            \
+                               $primary{ } method{ raid }      \
+                       .
+
+# Parameters are:
+# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \
+#      <devices> <sparedevices>
+d-i    partman-auto-raid/recipe        string          \
+               1       2       0       ext3    /       \
+                       /dev/sda1#/dev/sdb1             \
+               .                                       \
+               1       2       0       swap    -       \
+                       /dev/sda2#/dev/sdb2             \
+               . \
+               1       2       0       none    -       \
+                       /dev/sda4#/dev/sdb4             \
+               .
+
+d-i    partman-md/confirm              boolean true
+d-i    partman-md/confirm_nooverwrite  boolean true
+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
+
+# the first is for lucid, the second for precise (partman-xfs >= 45)
+d-i    partman-xfs/no_mount_point              boolean false
+d-i    partman-basicfilesystems/no_mount_point boolean false

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45ad8699bf5f6b7cd17e646137c4e0bb3ff57bb2
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Faidon Liambotis <fai...@wikimedia.org>
Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to