This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e -x | |
apt-get -y update | |
apt-get -y install software-properties-common python-pip python3-dev python3-pip | |
add-apt-repository -y ppa:neovim-ppa/unstable | |
apt-get -y update | |
apt-get -y install neovim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /usr/local/ | |
wget "https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz" | |
tar -zxf go1.8.linux-amd64.tar.gz | |
rm go1.8.linux-amd64.tar.gz | |
cd | |
mkdir go | |
cd go | |
mkdir src pkg bin | |
cd ../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x -e | |
ps aux | grep namespaced | grep -v grep | awk '{print $2}' | xargs -n1 kill -9 || true | |
umount /root/workspace/4.4-loop-umount-hang-test/mnt/container-2 || true | |
umount /root/workspace/4.4-loop-umount-hang-test/diff/container-2 || true | |
umount /root/workspace/4.4-loop-umount-hang-test/mnt/container-1 || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x -e | |
WORKSPACE_DIR=~/workspace/4.4-loop-umount-hang-test | |
# 1. Setup workspace | |
mkdir -p $WORKSPACE_DIR | |
mkdir -p $WORKSPACE_DIR/{diff,mnt,layers} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"path/filepath" | |
"strings" | |
"syscall" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mntnses = Dir.glob("/proc/*/ns/mnt") | |
foundmnts = [] | |
foundpids = [] | |
mntnses.each do |mntns| | |
actualmntns = `readlink "#{mntns}"` | |
pid = mntns.split("/")[2] | |
mntnum = actualmntns.gsub(/mnt:\[/, "").gsub(/\]/, "") | |
#puts "#{pid} - #{mntnum}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"sync" | |
"time" | |
) | |
func main() { | |
var myWaitGroup sync.WaitGroup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the required logsearch properties | |
properties: | |
collectd: | |
hostname_prefix: "dev.logsearch." | |
python_librato: | |
include_regex: "collectd\\.cpu\\..*,collectd\\.df\\..*,collectd\\.disk\\..*,collectd\\.elasticsearch\\..*,collectd\\.entropy\\..*,collectd\\.interface\\..*,collectd\\.load\\..*,collectd\\.memory\\..*,collectd\\.processes\\..*,collectd\\.redis_.*,collectd\\.users\\..*" | |
elasticsearch: | |
host: 10.244.1.2 | |
cluster_name: logsearch-bosh-lite | |
drain: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: ls_api | |
release: logsearch | |
templates: | |
- name: api | |
- name: collectd | |
- name: elasticsearch | |
instances: 1 | |
resource_pool: logsearch | |
networks: | |
- name: services1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add a resource pool for the logsearch jobs. | |
# Note: We're just using 1 additional resource pool here to keep things simple. | |
# Note: Update the stemcell name as required (run `bosh stemcells` to get the name of your stemcell). | |
# Note: We're using the services1 network for this tutorial, update this if you need to. | |
resource_pools: | |
- name: logsearch | |
network: services1 | |
size: 6 | |
stemcell: | |
name: bosh-warden-boshlite-ubuntu-trusty-go_agent |