Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -e
DISKLABEL='local-ssd'
LOCALSSD='/dev/disk/by-id/google-local-ssd'
NVME='/dev/nvme0n1'
MOUNT=/mnt/disks/$DISKLABEL
MKFS='/sbin/mkfs.ext4 -F -E lazy_itable_init=0,lazy_journal_init=0'
dev=""
if [ -e "$NVME" ]; then
#!/bin/bash
# Mostly copied from ansible coreos bootstrap
# https://github.com/defunctzombie/ansible-coreos-bootstrap/blob/master/files/bootstrap.sh
set -e
HOME=/home/core
cd
import re
import time
import os
from multiprocessing import Process
import subprocess
IGNORES = ["^loop", "^dm", "^nvme"]
MKFS = ['/sbin/mkfs.ext4', '-F', '-E', 'lazy_itable_init=0,lazy_journal_init=0']
@rcleere
rcleere / gist:97995bb18afa1d139e3f96c7d1ebefb0
Created May 4, 2018 19:47
Cluster Autoscaler GCE Problems
We have a user deployed production Kubernetes cluster in GCE that uses Managed Instance Groups for it's worker pools. We have CA installed with the `price` expander. We have 4 zonal MIGS of standard `n1-standard-16` type. We also define 2 other worker pools of `n1-standard-16` type by also specify GPU=`NVIDIA Tesla P100`. In our deployment we had a misconfiguration on the GPU MIGs and we set GPU_COUNT=0. So our worker MIGs look similar to the following, in alphabetical order:
mig-wrk-1234 - US-Central1-A - n1-standard-16, 64GB SSD persistent disk
mig-wrk-abcd - US-Central1-A - n1-standard-16, 64GB SSD persistent disk
mig-wrk-gpu-1234 - US-Central1-C - n1-standard-16, 64GB SSD persistent disk, 0xNVIDIA Tesla P100
mig-wrk-gpu-abcd - US-Central1-F - n1-standard-16, 64GB SSD persistent disk, 0xNVIDIA Tesla P100
mig-wrk-xxxx - US-Central1-A - n1-standard-16, 64GB SSD persistent disk
mig-wrk-yyyy - US-Central1-A - n1-standard-16, 64GB SSD persistent disk
What we were seeing is we created new pods and the CA wante
@rcleere
rcleere / gist:c162c801cc998d18883d
Last active August 29, 2015 14:05
Libvirt 1.2.3 patch to add <rlimit_nofile> to XML and apply to LXC on boot
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6fb216e..f1a5722 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -12966,6 +12966,23 @@ virDomainDefParseXML(xmlDocPtr xml,
VIR_FREE(tmp);
}
+ /* Extract rlimit_nofiles */
+ n = virXPathULong("string(./rlimit_nofile[1])", ctxt, &count);