Create key:

gpg --gen-key

List your key:

gpg --list-keys
pub 2048R/31F9D13A 2015-09-15
uid Terry Howe <>
sub 2048R/F5D49C12 2015-09-15

Configure your key:

git config --global user.signingkey 31F9D13A

Tag your release:

git tag -s 1.2.1

Push to gerrit

git push gerrit 1.2.1
Posted by: terryhowe | March 14, 2015

Regular Git Pull Requests

I’ve been doing so much OpenStack work lately, I’d forgotten how to do regular old git pull requests from a fork.  A little refresher, add the upstream repo:

git remote add upstream

Verify it is there:

git remote -v

Update local information:

git remote update

And now you can see the upstream branches:

git branch -a

Update the local branch to upstream:

git reset --hard upstream/master

Push the upstream to fork ignoring the fact that it won’t be a fast forward:

git push origin +master

Posted by: terryhowe | March 4, 2015

tox pypy No module named gdbm

I don’t know how many times I’ve seen the error from pypy tests “No module named gdbm”.  The cause of this is an incompatibility in the .testrepository.  The solutions are either run the pypy tests first or remove the .testrepository, run the pypy tests, and then run all the tests.

Posted by: terryhowe | February 18, 2015

Grep Files Without Match

I accidentally discovered that grep -L give a list of files that do *not* match the pattern.  That is a pretty neat feature that I hadn’t noticed before.  It has been a while since I looked at the grep man page.  The discovery caused some unwanted side effects though.

Posted by: terryhowe | February 17, 2015

Ubuntu Strip GPS Information out of Images

I always forget how to do this, so time to write it up. First, install the exiftool:
sudo apt-get install libimage-exiftool-perl

Next, remove the exif data:
exiftool -all= picture.jpg

To verify:
exiftool picture.jpg

Posted by: terryhowe | January 16, 2015

OpenStack Client and Neutron Client Patches

I keep running around to different machines and need to patch OpenStack Client and Neutron Client. OSC has a bug where it does not pass the region to the compute client. I submitted a fix that has been merged to main, but not released. Neutron client has a bug where it doesn’t properly handle some keystone v3 authentication domain information. I also submitted a patch for this and it too has been merged, but not released. The patches are:

patch ~/.venv/lib/python2.7/site-packages/openstackclient/compute/ <<!
diff --git a/openstackclient/compute/ b/openstackclient/compute/
index 3725350..166747d 100644
--- a/openstackclient/compute/
+++ b/openstackclient/compute/
@@ -50,6 +50,7 @@ def make_client(instance):
+ region_name=instance._region_name,

return client

patch ~/.venv/lib/python2.7/site-packages/neutronclient/ <<!
diff --git a/neutronclient/ b/neutronclient/
index 0329d52..9d703b5 100644
--- a/neutronclient/
+++ b/neutronclient/
@@ -719,8 +719,8 @@ class NeutronShell(app.App):
project_info = (self.options.os_tenant_name or
self.options.os_tenant_id or
(self.options.os_project_name and
- (self.options.project_domain_name or
- self.options.project_domain_id)) or
+ (self.options.os_project_domain_name or
+ self.options.os_project_domain_id)) or

if (not self.options.os_username

Posted by: terryhowe | December 23, 2014

fatal error: Python.h: No such file or directory

When running multiple versions of tests this is a common problem caused by not having the correct development package installed. You do a find and you have a version of Python.h, but not the right now. There are potentially several packages you need to install on Ubuntu for python or pypy:

sudo apt-get install python-dev
sudo apt-get install python3-dev
sudo apt-get install python3.3-dev
sudo apt-get install python3.4-dev
sudo apt-get install pypy-dev

With the latest version of pip, devstack is broken with:

Collecting prettytable>0.7
Could not find a version that satisfies the requirement prettytable>0.7 (from versions: )
No distributions matching the version for prettytable>0.7

You’ll need this patch:

diff --git a/tools/ b/tools/
index 1732ecc..7da3b31 100755
--- a/tools/
+++ b/tools/
@@ -79,7 +79,7 @@ function get_package_path {

# Fix prettytable 0.7.2 permissions
# Don't specify --upgrade so we use the existing package if present
-pip_install 'prettytable>0.7'
+pip_install 'prettytable>=0.7'
PACKAGE_DIR=$(get_package_path prettytable)
# Only fix version 0.7.2
dir=$(echo $PACKAGE_DIR/prettytable-0.7.2*)

Outstanding review:

Posted by: terryhowe | August 5, 2014

Using OpenStack Python Client to Create a Server on Helion

I’d like to post this up because I am likely to forget the python-openstackclient syntax for creating a server. I’ve been through this before and forgot yet again. Here it goes:

os server create --flavor m1.tiny --image 79a19846-d614-419b-b4f8-cb503bffe8f4 --nic "net-id=fe40196d-9fd7-415c-80a1-204f4d2630b1" serverName --debug

Where 79a19846-d614-419b-b4f8-cb503bffe8f4 is the image and e908c11e-5b96-4c90-86c6-44cd8d371709 is the network. The –nic option is used when it would be nice to have a –network option that uses the append option.

Posted by: terryhowe | June 26, 2014

Git: How to Reset Local Master to Remote

I often forget to create a branch and accidentally commit to my local master branch.  I should write a little shell script or something to reset master to remote:

git fetch origin
git reset --hard origin/master

Older Posts »



Get every new post delivered to your Inbox.