BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/190610
Change subject: varnish+jessie filesystem stuff ...................................................................... varnish+jessie filesystem stuff Switches rootfs to ext4 Switches varnish filesystems to ext4 w/ data=writeback Kills swap WIP! Needs: ssd: discard option for rootfs (in partman?) Needs: ssd: discard option for varnish fs (in puppet?) Needs: non-ssd variant for legacy bits boxes (no discard, etc) Needs: custom re-mkfs of varnish filesystems post-partman (perhaps in a late_command?) to use the following: "mke2fs -F -F -T huge -O sparse_super2 -m 0 /dev/sda3" Change-Id: If7de89e1d94dfaa197a18d4c378f5d18cbf0415c --- M modules/install-server/files/autoinstall/netboot.cfg A modules/install-server/files/autoinstall/partman/raid1-varnish-jessie-ssd.cfg M modules/varnish/manifests/setup_filesystem.pp 3 files changed, 64 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/10/190610/1 diff --git a/modules/install-server/files/autoinstall/netboot.cfg b/modules/install-server/files/autoinstall/netboot.cfg index 6e1fecd..e735537 100755 --- a/modules/install-server/files/autoinstall/netboot.cfg +++ b/modules/install-server/files/autoinstall/netboot.cfg @@ -58,7 +58,7 @@ calcium|helium|potassium|tmh1001|tmh1002) echo partman/raid1-1partition.cfg ;; \ acamar|achernar|baham|cobalt|lead|lithium|polonium) echo partman/raid1-lvm.cfg ;; \ cp102[1-9]|cp10[3-6][0-9]|cp1070|cp[34]0[0-9][0-9]|sq6[7-9]|sq70|dysprosium) echo partman/raid1-varnish.cfg ;; \ - cp1008) echo partman/raid1-varnish.cfg ;; \ + cp1008) echo partman/raid1-varnish-jessie-ssd.cfg ;; \ d-i-test) echo partman/flat.cfg ;; \ antimony|arsenic|caesium|erbium|gadolinium|heze|magnesium|neodymium|palladium|promethium|rubidium|strontium|terbium) echo partman/lvm.cfg ;; \ graphite[12]001) echo partman/graphite.cfg ;; \ diff --git a/modules/install-server/files/autoinstall/partman/raid1-varnish-jessie-ssd.cfg b/modules/install-server/files/autoinstall/partman/raid1-varnish-jessie-ssd.cfg new file mode 100644 index 0000000..8f92ca1 --- /dev/null +++ b/modules/install-server/files/autoinstall/partman/raid1-varnish-jessie-ssd.cfg @@ -0,0 +1,50 @@ +# Automatic software RAID partitioning +# +# * two disks, sda & sdb +# * primary partitions, no LVM +# * layout: +# /dev/sdX1 - root fs: ext4, RAID1, 10GB +# /dev/sdX2 - 15% of remainder as unused area for SSD perf/endurance +# /dev/sdX3 - 85% of remainder as ext4 for varnish disk cache + +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 + +# Use the first two disks +d-i partman-auto/disk string /dev/sda /dev/sdb + +# Define physical partitions +d-i partman-auto/expert_recipe string \ + multiraid :: \ + 10000 10000 10000 raid \ + $primary{ } method{ raid } \ + . \ + 0 75 200000000 linux-swap \ + $primary{ } method{ keep } \ + . + 0 425 1000000000 ext4 \ + $primary{ } method{ format } \ + format{ } use_filesystem{ } \ + filesystem{ ext4 } \ + . \ + +# Parameters are: +# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \ +# <devices> <sparedevices> +d-i partman-auto-raid/recipe string \ + 1 2 0 ext4 / \ + /dev/sda1#/dev/sdb1 \ + . \ + +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 +d-i partman-basicfilesystems/no_mount_point boolean false + +# method{ keep } on a partition that has no known filesystem +# produces a "No file system is specified for partition" prompt; silence it +d-i partman-basicmethods/method_only boolean false diff --git a/modules/varnish/manifests/setup_filesystem.pp b/modules/varnish/manifests/setup_filesystem.pp index 779179d..a72ea35 100644 --- a/modules/varnish/manifests/setup_filesystem.pp +++ b/modules/varnish/manifests/setup_filesystem.pp @@ -1,8 +1,18 @@ define varnish::setup_filesystem() { - $mount_options = $::realm ? { - 'production' => 'noatime,nodiratime,nobarrier,logbufs=8', - 'labs' => 'noatime,nodiratime,nobarrier,comment=cloudconfig', + if $::realm == 'labs' { + $custom_mount_opts = ',comment=cloudconfig' } + elsif os_version('debian >= jessie') { + $custom_mount_opts = ',nobarrier,data=writeback' + } + else { + # nodiratime is redundant, but I'm hoping to avoid + # pointless puppet-triggered remount attempts on + # the legacy boxes here... + $custom_mount_opts = ',nodiratime,nobarrier,logbufs=8' + } + + $mount_options = "noatime$custom_mount_opts" if $::realm == 'labs' and $::site == 'eqiad' { include labs_lvm -- To view, visit https://gerrit.wikimedia.org/r/190610 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7de89e1d94dfaa197a18d4c378f5d18cbf0415c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack <bbl...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits