Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Booth mdbooth

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am mdbooth on github.
  • I am mdbooth (https://keybase.io/mdbooth) on keybase.
  • I have a public key ASBBlpjAYN3q1dfO0N5qSn-n2sb7IC5jPBToXpOOUqrsCwo

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
%endif
%global library osc-placement
View update-devstack.sh
#!/bin/sh
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"
continue
View khaleesi-unittests.sh
#!/bin/bash
# A script to run tests using khaleesi
# Usage:
#
# Run tests using a RHOS 7/RHEL 7 environment
# ./tools/khaleesi.sh
#
# Run tests using a RHOS 5/RHEL 7 environment
@mdbooth
mdbooth / nova-compute-maintenance.py
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.
View nova-compute-maintenance.py
#!/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
mdbooth / log_merge.sh
Created Jul 17, 2015
Merge sort openstack log files
View log_merge.sh
#!/bin/bash
# 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...
You can’t perform that action at this time.