Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jfoy on github.
  • I am jfoy (https://keybase.io/jfoy) on keybase.
  • I have a public key ASA32nR3n7uFEayjXdPWK5s6BEGT1k1J-bvurZy-awnm-Ao

To claim this, I am signing this object:

@jfoy
jfoy / output.txt
Created December 14, 2016 22:36
404 error fetching .asc file from quay.io
sudo /usr/bin/rkt run --trust-keys-from-https quay.io/coreos/hyperkube:1.5.1_coreos.0 --exec /bin/cat -- /etc/kubernetes/manifests-multi/addon-manager-multinode.json
image: using image from local store for image name coreos.com/rkt/stage1-coreos:1.14.0
image: searching for app image quay.io/coreos/hyperkube
image: remote fetching from URL "https://quay.io/c1/aci/quay.io/coreos/hyperkube/1.5.1_coreos.0/aci/linux/amd64/"
image: keys already exist for prefix "quay.io/coreos/hyperkube", not fetching again
image: downloading signature from https://quay.io/c1/aci/quay.io/coreos/hyperkube/1.5.1_coreos.0/aci.asc/linux/amd64/
run: bad HTTP status code: 404
@jfoy
jfoy / coreos-ami
Created December 13, 2016 21:05
Utility script to grab info about the current CoreOS release
#!/bin/bash
# Default to us-east-1 region
region=${1:-"us-east-1"}
# CoreOS channel ["stable" | "beta" | "alpha"]
channel=${2:-"stable"}
# AWS AMI disk backing ["pv" | "hvm"]
disk=hvm
Dec 08 17:32:06 kafka3 docker[9517]: java.lang.IllegalArgumentException: requirement failed
Dec 08 17:32:06 kafka3 docker[9517]: at scala.Predef$.require(Predef.scala:212)
Dec 08 17:32:06 kafka3 docker[9517]: at kafka.server.DynamicConfigManager$ConfigChangedNotificationHandler$.processNotification(DynamicConfigManager.scala:90)
Dec 08 17:32:06 kafka3 docker[9517]: at kafka.common.ZkNodeChangeNotificationListener$$anonfun$kafka$common$ZkNodeChangeNotificationListener$$processNotifications$2$$anonfun$apply$2.apply(ZkNodeChangeNotificationListener.scala:95)
Dec 08 17:32:06 kafka3 docker[9517]: at kafka.common.ZkNodeChangeNotificationListener$$anonfun$kafka$common$ZkNodeChangeNotificationListener$$processNotifications$2$$anonfun$apply$2.apply(ZkNodeChangeNotificationListener.scala:95)
Dec 08 17:32:06 kafka3 docker[9517]: at scala.Option.map(Option.scala:146)
Dec 08 17:32:06 kafka3 docker[9517]: at kafka.common.ZkNodeChangeNotificationListener$$anonfun$kafka$common$
@jfoy
jfoy / heapster-stacktrace.txt
Created February 4, 2016 23:16
Heapster riemann sink crash on connection loss
core@ip-10-130-27-72 ~ $ docker logs 561f13d85db1
I0204 21:03:32.420702 1 heapster.go:61] /heapster --logtostderr=true --source=kubernetes:https://kubernetes.default?inClusterConfig=false&useServiceAccount=false&auth=/run/kubernetes/kubeconfig.yaml --sink=riemann:riemann-heapster:5555?state=ok&tags=service=heapster&storeEvents=false
I0204 21:03:32.420751 1 heapster.go:62] Heapster version 0.19.1
I0204 21:03:33.169954 1 kube_factory.go:172] Using Kubernetes client with master "https://kubernetes.default" and version "v1"
I0204 21:03:33.169976 1 kube_factory.go:173] Using kubelet port 10255
I0204 21:03:33.901694 1 driver.go:86] Riemann sink URI: 'riemann-heapster:5555?state=ok&tags=service=heapster&storeEvents=false', host: 'riemann-heapster:5555', options: 'map[state:[ok] tags:[service=heapster] storeEvents:[false]]',
I0204 21:03:33.909133 1 heapster.go:72] Starting heapster on port 8082
panic: send on closed channel [recovered]
panic: interface conversion: interface is str
jacfoym2:discovery jfoy$ etcdctl -v
etcdctl version 2.0.9
jacfoym2:discovery jfoy$ etcdctl --peers http://172.16.206.252:2379 --debug ls /
Cluster-Endpoints: http://localhost:2379, http://localhost:4001
Curl-Example: curl -X GET http://localhost:2379/v2/keys/?consistent=true&recursive=false&sorted=false
Curl-Example: curl -X GET http://localhost:2379/v2/keys/?consistent=true&recursive=false&sorted=false
Curl-Example: curl -X GET http://localhost:4001/v2/keys/?consistent=true&recursive=false&sorted=false
Error: 501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]
jacfoym2:discovery jfoy$ etcdctl --peers 172.16.206.252:2379 --debug ls /
Cluster-Endpoints: http://localhost:2379, http://localhost:4001
@jfoy
jfoy / RTanque-jfoy-0.0.1
Created July 3, 2013 03:08
RTanque-jfoy-0.0.1
class Jfoy < RTanque::Bot::Brain
NAME = 'jfoy'
include RTanque::Bot::BrainHelper
# Plagiarized entirely from
# sample_bots/seek_and_destroy.rb
TURRET_FIRE_RANGE = RTanque::Heading::ONE_DEGREE * 5.0
def tick!
@jfoy
jfoy / HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew upgrade r
Last active December 15, 2015 20:59
Homebrew diagnostic output from 'brew upgrade r' to 3.0.0
==> Upgrading 1 outdated package, with result:
r 3.0.0
==> Upgrading r
rm /usr/local/bin/Rscript
rm /usr/local/bin/R
rm /usr/local/etc/bash_completion.d/R
rm /usr/local/lib/pkgconfig/libR.pc
rm /usr/local/share/man/man1/Rscript.1
rm /usr/local/share/man/man1/R.1
==> Downloading http://cran.r-project.org/src/base/R-3/R-3.0.0.tar.gz