Skip to content

Instantly share code, notes, and snippets.

View MarkusMattinen's full-sized avatar

Markus Mattinen MarkusMattinen

View GitHub Profile
@MarkusMattinen
MarkusMattinen / node-update-issue-test.sh
Last active September 20, 2017 08:09
Docker Swarm node update issue: Script to reproduce locally
#!/bin/bash
set -euo pipefail
MANAGER_NAME="node-update-issue-manager"
PLUGIN_NAME="tiborvass/sample-volume-plugin"
# Create a new Docker machine to act as the Swarm manager
docker-machine create --driver virtualbox $MANAGER_NAME
# Shutdown and remove the Docker machine when exiting
@MarkusMattinen
MarkusMattinen / docker info
Created September 20, 2017 08:06
Docker Swarm node update issue: docker info
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 1
Server Version: 17.06.2-ce
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 3
@MarkusMattinen
MarkusMattinen / docker.log
Created September 20, 2017 08:05
Docker Swarm node update issue: Docker debug log
time="2017-09-20T06:27:44.006398009Z" level=debug msg="libcontainerd: received containerd event: &types.Event{Type:\"start-container\", Id:\"b0268b39b506a107959308edc5a9a940ac2e03cde60def426f238c3c7416eb13\", Status:0x0, Pid:\"\", Timestamp:(*timestamp.Timestamp)(0xc42099b2d0)}"
time="2017-09-20T06:27:44.007583173Z" level=debug msg=OpenMonitorChannel
time="2017-09-20T06:27:44.007632297Z" level=debug msg="waiting on events" module="node/agent/taskmanager" node.id=ur8552rbetr94f5e9iz3llqcd service.id=nogzwytpy19awhu8vbnbvr67x task.id=o3rkc8ftg0vcccssm8z5hj2t8
time="2017-09-20T06:27:44.007723809Z" level=debug msg="libcontainerd: event unhandled: type:\"start-container\" id:\"b0268b39b506a107959308edc5a9a940ac2e03cde60def426f238c3c7416eb13\" timestamp:<seconds:1505888864 nanos:5306947 > "
time="2017-09-20T06:27:44.305816614Z" level=debug msg="Calling POST /v1.30/plugins/tiborvass/sample-volume-plugin/enable?timeout=0"
time="2017-09-20T06:27:44.349412431Z" level=debug msg="libcontainerd: received containerd event:
@MarkusMattinen
MarkusMattinen / supervisor.sh
Last active January 24, 2017 13:39
Kill and wait for children in shell scripts
#!/bin/bash
trap 'kill 0; wait' EXIT
./zombie.sh 5 &
./zombie.sh 10 &
./zombie.sh 5

Keybase proof

I hereby claim:

  • I am MarkusMattinen on github.
  • I am markusmattinen (https://keybase.io/markusmattinen) on keybase.
  • I have a public key whose fingerprint is 1832 2CE8 28FD 2C5B 66AF 8FDB 87E0 E94F 59AA 179F

To claim this, I am signing this object:

@MarkusMattinen
MarkusMattinen / tuneraid.sh
Created September 2, 2014 19:15
Raid 5/6 tuning script (run on boot)
#!/bin/bash
###############################################################################
# simple script to set some parameters to increase performance on a mdadm
# raid5 or raid6. Ajust the ## parameters ##-section to your system!
#
# WARNING: depending on stripesize and the number of devices the array might
# use QUITE a lot of memory after optimization!
#
# 27may2010 by Alexander Peganz
# 31jul211 modified by Mathias B