Skip to content

Instantly share code, notes, and snippets.


Matthew Booth mdbooth

  • Red Hat
  • Warwick, UK
View GitHub Profile
View atop.yaml
apiVersion: apps/v1
kind: DaemonSet
name: atop-debug
namespace: default
app: atop-debug
mdbooth /
Last active May 7, 2021
Convert an entry in clouds.yaml to OS_* environment variables
exec yq -r '.clouds.'$1'
| paths(scalars) as $p
| "export OS_" + ($p|last|ascii_upcase) + "=\"" + (getpath($p)|tostring) + "\""' \
< ~/.config/openstack/clouds.yaml

Keybase proof

I hereby claim:

  • I am mdbooth on github.
  • I am mdbooth ( on keybase.
  • I have a public key whose fingerprint is AC03 E8DF 13C9 2ED8 A4D8 7E47 A91B AB3C 70FE 6769

To claim this, I am signing this object:

View python-osc-placement.spec
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
# Python3 support in OpenStack starts with version 3.5,
# which is only in Fedora 24+
%if 0%{?fedora} >= 24
%global with_python3 1
%global library osc-placement
find ~/devstack ~/openstack -name .git -type d | while read dir; do
working=$(dirname "$dir")
pushd "$working" >/dev/null
# Don't update if we're not on the master branch
if [ $(git rev-parse HEAD master | uniq | wc -l) != "1" ]; then
echo "Skipping $working: not on master branch"
# A script to run tests using khaleesi
# Usage:
# Run tests using a RHOS 7/RHEL 7 environment
# ./tools/
# Run tests using a RHOS 5/RHEL 7 environment
mdbooth /
Last active Oct 2, 2017
Put a nova compute node into 'maintenance mode'. Disable its service, and attempt to migrate all instances on it to other nodes.
#!/usr/bin/env python
import argparse
from collections import defaultdict
import os
import sys
import time
from novaclient import client
from novaclient import exceptions
mdbooth /
Created Jul 17, 2015
Merge sort openstack log files
# Merge all given openstack log files into a single, sorted output stream. Each
# output line has the source filename prepended, e.g.:
# screen-n-cond.txt: 2015-07-14 16:33:24.669 DEBUG nova.o...
# screen-n-cond.txt: 2015-07-14 16:33:24.669 DEBUG nova.o...
# screen-n-cond.txt: 2015-07-14 16:33:24.670 DEBUG nova.o...
# screen-n-cell-child.txt: 2015-07-14 16:33:24.708 DEBUG ...
# screen-n-cond.txt: 2015-07-14 16:33:24.710 DEBUG nova.o...