Skip to content

Instantly share code, notes, and snippets.

View jlebon's full-sized avatar

Jonathan Lebon jlebon

View GitHub Profile
@jlebon
jlebon / dnsmasq.md
Last active June 7, 2022 11:53
How to set up dnsmasq on an OpenShift cluster

This gist is mostly based on the dnsmasq appendix from the openshift-training repo. However, I updated it and included fixes for the many gotchas I found along the way.

This is useful for folks who want to set up a DNS service as part of the cluster itself, either because they cannot easily change their DNS setup outside of the cluster, or just because they want to keep the cluster setup self-contained.

Setting up:
1. ostree remote add --set=gpg-verify=false centos-atomic-continuous https://ci.centos.org/artifacts/sig-atomic/rdgo/centos-continuous/ostree/repo/
2. ostree pull centos-atomic-continuous:centos-atomic-host/7/x86_64/devel/continuous
3. ostree commit -b my-test-branch --tree=ref=centos-atomic-continuous:centos-atomic-host/7/x86_64/devel/continuous
(if your ostree has `refs --create`, then this can be shortened)
4. ostree admin deploy my-test-branch
5. reboot
Synthesizing an update:
@jlebon
jlebon / keybase.md
Created August 18, 2016 03:02
Keybase proof

Keybase proof

I hereby claim:

  • I am jlebon on github.
  • I am jlebon (https://keybase.io/jlebon) on keybase.
  • I have a public key whose fingerprint is A8B6 01C2 9DB5 7D90 2FF0 892F 936F 29E9 519C E313

To claim this, I am signing this object:

@jlebon
jlebon / mock-mount.sh
Last active October 28, 2022 19:25
mock-mount.sh -- compat script for bwrap in mock
#!/bin/bash
set -euo pipefail
# This is a small compatibility script that ensures mock
# chroots are compatible with applications that expect / to
# be a mount point, such as bubblewrap.
cleanup() {
for mnt in sys proc; do
umount /mnt/mock-mount/$mnt
@jlebon
jlebon / .redhat-ci.yml
Created September 28, 2016 17:24
Sample .redhat-ci.yml
# The current format is very simple and may change in the
# future as more features get added, though we will try to
# maintain backwards compatibility (or help projects migrate
# to the new format).
# REQUIRED
# All details about the host to provision go under the host
# key, though for now, 'distro' is the only handled child:
host:
# REQUIRED
@jlebon
jlebon / db-diff.sh
Created January 8, 2018 21:21
rpm-ostree db diff on random dirs
#!/bin/bash
set -euo pipefail
# hacky way to use rpm-ostree to perform a db diff
# requires ostree and rpm-ostree installed locally
if [ $# -eq 0 ]; then
echo "Usage: $0 <from_rpmdb_dir> <to_rpmdb_dir>"
exit 1
fi
@jlebon
jlebon / trace.log
Last active February 8, 2018 18:13
jstack trace of Jenkins lock-up after OpenShift login
2018-02-08 18:12:18
Full thread dump OpenJDK Server VM (25.161-b14 mixed mode):
"Attach Listener" #98 daemon prio=9 os_prio=0 tid=0x0c66b000 nid=0xc9 waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"RequestHandlerThread[#12]" #94 daemon prio=5 os_prio=0 tid=0x0c66e400 nid=0xb6 waiting on condition [0xcf604000]
@jlebon
jlebon / trace.log
Created February 9, 2018 19:25
Jenkins OpenShift sign-in hang jstack output
2018-02-09 19:16:00
Full thread dump OpenJDK Server VM (25.161-b14 mixed mode):
"Attach Listener" #128 daemon prio=9 os_prio=0 tid=0x0c9bd800 nid=0x15d waiting on condition [0x00000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"RequestHandlerThread[#33]" #123 daemon prio=5 os_prio=0 tid=0x092a1400 nid=0x143 waiting on condition [0xd3176000]
[
{
"ID": "c5e0871c45fbc1d5b15d486c146f5022c35b4a46a49d14622e6f90da469c65df",
"Created": "2018-08-07T14:09:31.854809081-04:00",
"Path": "/bin/bash",
"Args": [
"/bin/bash"
],
"State": {
"OciVersion": "1.0.0",
{
"ignition": {
"config": {},
"security": {
"tls": {}
},
"timeouts": {},
"version": "2.2.0"
},
"networkd": {},