Skip to content

Instantly share code, notes, and snippets.

@devoid
devoid / docker.log
Created May 6, 2016 15:29
Docker logs returning early for container that hasn't stopped
time="2016-05-06T15:25:02.280603576Z" level=debug msg="Calling POST /v1.21/containers/create"
time="2016-05-06T15:25:02.280640551Z" level=debug msg="POST /v1.21/containers/create?name=ctn3"
time="2016-05-06T15:25:02.280750755Z" level=debug msg="form data: {\"Cmd\":[\"/bin/bash\",\"-c\",\"uptime \\u0026\\u0026 sleep 1 \\u0026\\u0026 uptime \\u0026\\u0026 sleep 1 \\u0026\\u0026 uptime\"],\"En
trypoint\":null,\"HostConfig\":{\"LogConfig\":{\"Type\":\"json-file\"},\"NetworkMode\":\"myriad.erixzone.net\",\"RestartPolicy\":{}},\"Hostname\":\"ctn3\",\"Image\":\"erixzone/myriad-target\"}"
time="2016-05-06T15:25:02.285291805Z" level=debug msg="container mounted via layerStore: /mnt/sda1/var/lib/docker/overlay/b4f40c9f0d2ee59369198273dbeeef28c0ee8b5d1051cebb757675d910da8bc2/merged"
time="2016-05-06T15:25:02.309787206Z" level=debug msg="Calling GET /v1.21/containers/3433b4471d7498377f665e950c2bad641283e76f87ec5b7c93e48a14ca55985c/logs"
time="2016-05-06T15:25:02.309830575Z" level=debug msg="GET /v1.21/containers/343
@devoid
devoid / twistd.log
Last active August 29, 2015 14:27
Log from buildbot master running my test
$ git clone git@github.com:devoid/bb-latent-slave-bug.git
$ cd bb-latent-slave-bug.git
$ git checkout 4dd952448bdad897260e5cd26e1314775b534096
$ ./run.sh
...
$ cat ./logs/bb-master-twistd.log
2015-08-07 05:08:29+0000 [-] Log opened.
2015-08-07 05:08:29+0000 [-] twistd 15.3.0 (/usr/bin/python 2.7.6) starting up.
2015-08-07 05:08:29+0000 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2015-08-07 05:08:29+0000 [-] Starting BuildMaster -- buildbot.version: 0.8.12
package main
import (
"encoding/json"
"fmt"
)
// We have some interface that all Tasks will meet.
type TaskConfig interface {
MakePlanner() bool
2015-08-06 17:11:41+0000 [-] Log opened.
2015-08-06 17:11:41+0000 [-] twistd 15.3.0 (/usr/bin/python 2.7.6) starting up.
2015-08-06 17:11:41+0000 [-] reactor class: twisted.internet.epollreactor.EPollReactor.
2015-08-06 17:11:41+0000 [-] Starting BuildMaster -- buildbot.version: 0.8.12
2015-08-06 17:11:41+0000 [-] Loading configuration from '/data/buildbot/master.cfg'
2015-08-06 17:11:43+0000 [-] Setting up database with URL 'sqlite:////data/buildbot/db/state.sqlite'
2015-08-06 17:11:43+0000 [-] setting database journal mode to 'wal'
2015-08-06 17:11:43+0000 [-] failed to set journal mode - database may fail
2015-08-06 17:11:44+0000 [-] The Buildmaster database needs to be upgraded before this version of
2015-08-06 17:11:44+0000 [-] buildbot can run. Use the following command-line
@devoid
devoid / master.py
Last active August 29, 2015 14:26
DockerLatentBuildslave bug
# Leaving out imports
c = BuildmasterConfig = {}
# Note, slightly custom options for DockerLatentBuildSlave.
# Basically just a copy of https://github.com/buildbot/buildbot/blob/master/master/buildbot/buildslave/docker.py
# but with settings for link, volumes, privileged and cap_add flags to pass through to docker client.
c['slaves'] = [
DockerLatentBuildSlave('x-01', 'xxxx',
docker_host='unix:///var/run/docker.sock',
vagrant@vagrant:/vagrant$ ./buildmistify
buildmistify: Using Buildroot located at: /home/vagrant/buildroot
buildmistify: Using base configuration.
buildmistify: Build output directory is: /home/vagrant/build
buildmistify: The variant build directory is: /home/vagrant/build/base
buildmistify: The Buildroot repository is: git@github.com:mistifyio/buildroot.git
buildmistify: Using Buildroot branch: master
* master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
$ shasum -a 512 coreos_production_pxe.vm*
4771866b3979d7ace5aee23cf05e0a5db88b668177eaf29cb99b3d4cd67af89c1bd561f236853d3627aa14eb745a48cc72bfac74e2639e5faf03a1490f057932 coreos_production_pxe.vmlinuz
f49270fd8def3963679c249b1092607c0b013c1c8b5e5e8a0e3468db7f194f56a760c806be3e94c5802af5baf38d8974df8fdfd64def91de3d0d78df513599b7 coreos_production_pxe.vmlinuz.sig
$ gpg --verify coreos_production_pxe.vmlinuz.sig coreos_production_pxe.vmlinuz
gpg: Signature made Fri Feb 27 20:52:54 2015 CST using RSA key ID E5676EFC
gpg: Good signature from "CoreOS Buildbot (Offical Builds) <buildbot@coreos.com>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 0412 7D0B FABE C887 1FFB 2CCE 50E0 8855 93D2 DCB4
Subkey fingerprint: EEFA 7555 E481 D026 CC40 D8E6 A5A9 6635 E567 6EFC
@devoid
devoid / gist:a8ff99d5ac7a665d20c0
Created April 10, 2015 01:55
coreos_production_pxe_image.cpio.gz.DIGESTS (Feb 23 15:09)
# MD5 HASH
ec20092943dd9ce164959abacdc1d60a coreos_production_pxe.vmlinuz
# SHA1 HASH
b9f9953fa977552b79f8c1bca865aad3ee3bd8a7 coreos_production_pxe.vmlinuz
# SHA512 HASH
659e37110e727894ce0f8790d81dda0d793f49d84e70ac65e342c2b45e96d83270d79de617d65dd1d9265661cc1a8bbf407185d5de41ada25c06ea15696eece1 coreos_production_pxe.vmlinuz
# MD5 HASH
edb7ff242cf7c6a8e372b0b1cb0a842f coreos_production_pxe_image.cpio.gz
# SHA1 HASH
045cae03821e5e8a38ba7b007524a1032dd96ec8 coreos_production_pxe_image.cpio.gz
@devoid
devoid / gist:3490862
Created August 27, 2012 17:58
True read only arrays in Moose
#!/usr/bin/perl
package ROArray;
use Moose;
has pirates => (
traits => ['Array'],
is => 'ro',
isa => 'ArrayRef[Str]', # Replace with something?
default => sub { [] },
handles => {
add_pirate => 'push',
#!/usr/bin/env perl
use strict;
use warnings;
use SAPserver;
use Data::Dumper;
my $genomeID = "83333.1";
my $sap = SAPserver->new();
my $columns = ['dna-size', 'gc-content', 'pegs', 'name', 'taxonomy',
'md5_hex'];