Skip to content

Instantly share code, notes, and snippets.

Mike Gerdts mgerdts

  • Joyent
  • Madison, WI
Block or report user

Report or block mgerdts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mgerdts
mgerdts / README.md
Last active Aug 8, 2019
boot modules in Triton
View README.md

It seems that there should be a way to do this with sdc-cnapi. I've not had luck in getting any updates to flow from sdc-cnapi to booter, so I tried another approach.

root@headnode# sdc-login dhcpd
...
root@dhcpd0 ~ # cd /tftpboot/00505634604c
root@dhcpd0 /tftpboot/00505634604c # mkdir etc
root@dhcpd0 /tftpboot/00505634604c # cd etc
root@dhcpd0 /tftpboot/00505634604c/etc # echo "this is a test file" > testfile
root@dhcpd0 /tftpboot/00505634604c/etc # digest -a sha1 testfile > testfile.hash
@mgerdts
mgerdts / README.md
Created Jul 26, 2019
SmartLogin work-alike for bhyve, kvm, and lx
View README.md

SmartLogin only works with SmartOS zones. Control of key-based access to bhyve, kvm, and lx isntances can be accomplished using OpenSSH's authorized keys command to fetch authorized keys from the metadata service.

Guest Setup

The guest OS needs to have the following added to {{/etc/ssh/sshd_config}}.

AuthorizedKeysCommand /usr/sbin/mdata-get "%u_authorized_keys"
AuthorizedKeysCommandUser mdataget
@mgerdts
mgerdts / README.md
Created Jul 18, 2019
create ubuntu 18.04 20190627 bhyve instance
View README.md
[root@raidz /zones]# ssh-keygen -t rsa -P "" -f id_rsa
Generating public/private rsa key pair.
Your identification has been saved in id_rsa.
Your public key has been saved in id_rsa.pub.
The key fingerprint is:
MD5:58:e7:5e:2e:a5:05:95:58:da:97:06:f8:5f:60:b8:c4 root@raidz
The key's randomart image is:
+---[RSA 2048]----+
|           =+o   |
@mgerdts
mgerdts / Makefile
Last active Jul 18, 2019
can make handle % in file names?
View Makefile
THINGS = foo%bar foo.bar
SRCS = $(THINGS:%=src/%)
OBJS = $(THINGS:%=obj/%)
install: $(OBJS)
obj/%: src/%
@echo Making $@ from $<
rm -f $@
View illumos.sh.md

This is has the OmniOS variables from Building Illumos at the end.

# -----------------------------------------------------------------------------
# Parameters you are likely to want to change
# -----------------------------------------------------------------------------

#       DEBUG build only (-D, -F)
#       do not bringover from the parent (-n)
#       runs 'make check' (-C)
View cstyle.md

This is for the initial round of review of link-local route support for LX ....

$ bldenv illumos.sh "cstyle /tmp/lxinit.c"
Build type   is  non-DEBUG
RELEASE      is
VERSION      is joyent_20190713T171701Z
RELEASE_DATE is July 2019

The top-level 'setup' target is available to build headers and tools.
@mgerdts
mgerdts / README.md
Last active Jun 21, 2019
illumos-9318
View README.md

Overview

This fixes

9318 vol_volsize_to_reservation does not account for raidz skip blocks

$ git whatchanged -v master..
commit 969a6b100f3e67c3a623d898c3825506f1a40b49
Author: Mike Gerdts <mike.gerdts@joyent.com>
@mgerdts
mgerdts / README.md
Created Jun 12, 2019
building illumos on omnios
View README.md
@mgerdts
mgerdts / changes.txt
Created May 14, 2019
debugging bhyve with mdb from host
View changes.txt
commit 2d1a8a4a97fe44c06e3fedddbb32f89fc2755a3e
Author: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Date: Tue Jan 15 16:29:40 2019 +0100
OS-7508 mdb: assertion tripped in libvmm when bhyve VM halts while mdb is attached
OS-7519 mdb: bhyve target can attach before the first vCPU is configured
commit 2a78db82bec123064d30d051995cb4d577ca04ba
Author: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Date: Wed Feb 13 16:08:32 2019 +0000
@mgerdts
mgerdts / README.md
Last active Jan 3, 2019
zfs-raw-recv-panic
View README.md

The panic is seen on Linux. Screenshots of the panic: 1 2 3

I built ZoL on xubuntu 18.04 with this commit at the tip.

I suspect the clones difference between @7 and @8 is due to the interrupted receive.

root@xubuntu:~# zfs get -o property,value all rpool/crypto/vol0@7  > /tmp/7
root@xubuntu:~# zfs get -o property,value all rpool/crypto/vol0@8  > /tmp/8
root@xubuntu:~# sdiff  /tmp/7 /tmp/8
You can’t perform that action at this time.