Skip to content

Instantly share code, notes, and snippets.

View trisk's full-sized avatar
🧲
💾

Albert Lee trisk

🧲
💾
View GitHub Profile
{
"alias": "nexentastor",
"brand": "kvm",
"vcpus": 8,
"autoboot": false,
"ram": 8192,
"disks": [
{
"boot": true,
"model": "ahci",
#!/bin/ksh
get_manifests()
{
repo="$1"
target="$2"
saved_cwd="$PWD"
cd "$target"
make: *** No rule to make target `host-lvm2', needed by `/ws/mistifyio/mistify-os-buildroot/build/mistify/build/host-libvirt-1.2.9/.stamp_configured'. Stop.
Cloning into bare repository 'mistify-agent-libvirt-186e47cfba2b2d4777bae61a22fb9746220efa10'...
>>> mistify-agent-libvirt 186e47cfba2b2d4777bae61a22fb9746220efa10 Extracting
gzip -d -c /ws/mistifyio/mistify-os-buildroot/downloads/mistify-agent-libvirt-186e47cfba2b2d4777bae61a22fb974622
0efa10.tar.gz | tar --strip-components=1 -C /ws/mistifyio/mistify-os-buildroot/build/mistify/build/mistify-agent
-libvirt-186e47cfba2b2d4777bae61a22fb9746220efa10 -xf -
>>> mistify-agent-libvirt 186e47cfba2b2d4777bae61a22fb9746220efa10 Patching
>>> mistify-agent-libvirt 186e47cfba2b2d4777bae61a22fb9746220efa10 Configuring
>>> mistify-agent-libvirt 186e47cfba2b2d4777bae61a22fb9746220efa10 Building
# GO apparently wants the install path to be independent of the
# build path. Use a temporary directory to do the build.
@trisk
trisk / go.mk
Created December 3, 2014 22:00
################################################################################
#
# go
#
################################################################################
HOST_GO_VERSION = f44017549ff9
HOST_GO_SITE = https://code.google.com/p/go
HOST_GO_SITE_METHOD = hg
HOST_GO_LICENSE = BSD
@trisk
trisk / gist:02c7c54d054ac061734d
Created January 27, 2015 21:47
Some libsystemd link errors
GOROOT=/ws/mistifyio/mistify-os/go/go1.4/go PATH=/ws/mistifyio/mistify-os/go/go1.4/go/bin:/usr/local/bin:/usr/bi
n:/bin:/usr/bin/X11:/usr/games:/usr/sbin:/home/trisk/bin CGO_CPPFLAGS=-I/ws/mistifyio/mistify-os/build/mistify/t
arget/usr/include CGO_LDFLAGS="-L/ws/mistifyio/mistify-os/build/mistify/target/lib -L/ws/mistifyio/mistify-os/bu
ild/mistify/target/usr/lib -lsystemd" GOPATH=/ws/mistifyio/mistify-os/build/mistify/tmp/GOPATH make install DEST
DIR=/ws/mistifyio/mistify-os/build/mistify/target -C /ws/mistifyio/mistify-os/build/mistify/tmp/GOPATH/src/githu
b.com/mistifyio/mistify-agent-libvirt
make[1]: Entering directory `/net/nexenta/export/ws/mistifyio/mistify-os/build/mistify/tmp/GOPATH/src/github.com
/mistifyio/mistify-agent-libvirt'
cd cmd/mistify-libvirt && \
go get && \
@trisk
trisk / findnext2
Created May 11, 2015 23:20
weird findnext2 failure
sudo dtrace -s smb_debug.d
CPU ID FUNCTION:NAME
1 82149 smb_com_trans2_find_next2:entry
smbsrv`smb_trans2_dispatch+0x348
smbsrv`smb_com_transaction2+0x1aa
smbsrv`smb1sr_work+0x5da
smbsrv`smb_session_worker+0x9e
genunix`taskq_d_thread+0xe6
unix`thread_start+0x8
# chmod 777 /dev/zfs
# zfs create mistify/guest-playground
# zfs allow dockroot create,mount,destroy,send,receive mistify/guest-playground
# zfs set mountpoint=legacy mistify/guest-playground
# docker run --devices=/dev/zfs:/dev/zfs -t -i bc1865e28911 /bin/bash
# zfs create mistify/guest-playground/test
# mkdir /tmp/test && mount -t zfs mistify/guest-playground/test /tmp/test
@trisk
trisk / datasetns-delegation.md
Last active November 20, 2015 17:00
Dataset namespace identifiers

ZFS namespace delegated (zoned/jailed) datasets

Starting observations

  • Namespaces are ephemeral by nature, only the initial namespace has a predictable ID.
  • Containers are logically persistent if they require persistent data.
  • ZFS datasets are persistent, and it's necessary to preserve the relationship between a container and a dataset.
  • ZFS properties with inheritance makes natural sense for child datasets that are delegated to a container, and for moving datasets to other containers.
cd /ws/mistifyio/mistify-os/build/mistify/base/tmp/GOPATH/src/github.com/docker/docker && GOPATH=/ws/mistifyio/mistify-os/build/mistify/base/tmp/GOPATH/src/github.com/docker/docker/vendor:/ws/mistifyio/mistify-os/build/mistify/base/tmp/GOPATH GOROOT=/ws/mistifyio/mistify-os/go/go1.5.1-b6342809d005ea2b0d24406eff52b6bac4ec0eee/go PATH=/ws/mistifyio/mistify-os/go/go1.5.1-b6342809d005ea2b0d24406eff52b6bac4ec0eee/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/sbin:/home/trisk/bin:/home/trisk/bin CGO_ENABLED=1 CGO_CPPFLAGS="-I/ws/mistifyio/mistify-os/build/mistify/base/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include" CGO_LDFLAGS="-L/ws/mistifyio/mistify-os/build/mistify/base/target/lib -L/ws/mistifyio/mistify-os/build/mistify/base/target/usr/lib -Wl,-rpath-link,/ws/mistifyio/mistify-os/build/mistify/base/target/lib -Wl,-rpath-link,/ws/mistifyio/mistify-os/build/mistify/base/target/usr/lib" DOCKER_GITCOMMIT="aac645ae047601fed1550c9d59d7c8ea978203b0" DOCKER_BUILDTAGS=" btrfs_noversion exclud