Skip to content

Instantly share code, notes, and snippets.

Jason Johnson jasonjohnson

Block or report user

Report or block jasonjohnson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jasonjohnson
jasonjohnson / commands.txt
Last active Jan 3, 2017
Mitaka Keystone Installation Problems
View commands.txt
With constraints:
pip install -r requirements.txt -c /opt/upper-constraints.txt
pip install pymysql -c /opt/upper-constraints.txt
pip install osprofiler -c /opt/upper-constraints.txt
python setup.py install
Without constraints:
pip install -r requirements.txt
pip install pymysql
pip install osprofiler
@jasonjohnson
jasonjohnson / keystone-requirements.patch
Created Dec 3, 2016
keystone stable/mitaka requirements.txt fix
View keystone-requirements.patch
diff --git a/requirements.txt b/requirements.txt
index 1a19428..c734e16 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -17,7 +17,7 @@ sqlalchemy-migrate>=0.9.6 # Apache-2.0
stevedore>=1.5.0 # Apache-2.0
passlib>=1.6 # BSD
python-keystoneclient!=1.8.0,!=2.1.0,<3.0.0,>=1.6.0 # Apache-2.0
-keystonemiddleware!=4.1.0,>=4.0.0 # Apache-2.0
+keystonemiddleware!=4.1.0,>=4.0.0,<4.11.0 # Apache-2.0
View ip netns exec qdhcp-a60e610a-4b3f-4e56-be63-fe98d94fedef ping 172.16.10.25
PING 172.16.10.25 (172.16.10.25) 56(84) bytes of data.
From 172.16.10.20 icmp_seq=1 Destination Host Unreachable
From 172.16.10.20 icmp_seq=2 Destination Host Unreachable
From 172.16.10.20 icmp_seq=3 Destination Host Unreachable
From 172.16.10.20 icmp_seq=4 Destination Host Unreachable
^C
--- 172.16.10.25 ping statistics ---
5 packets transmitted, 0 received, +4 errors, 100% packet loss, time 4005ms
pipe 4
View gist:afdff11ae44dcfe5bea8c4f90ec28b01
2016-11-14 11:12:40.446 30742 DEBUG oslo_concurrency.processutils [req-932cbe76-c34f-46b9-87d6-6d80a685ed5f eadcdac311c64dfd8e661d7a14158d79 6fed39a8f90e4913b9a752fdaaeb6a35 - - -] Running cmd (subprocess): genisoimage -o /opt/nova-data/instances/8f6dfb8c-154e-4c71-aae9-29b052cce3c0/disk.config -ldots -allow-lowercase -allow-multidot -l -publisher OpenStack Nova 13.1.3 -quiet -J -r -V config-2 /tmp/tmpDla_bR execute /opt/nova-env/lib/python2.7/site-packages/oslo_concurrency/processutils.py:349
2016-11-14 11:12:40.459 30742 DEBUG oslo_concurrency.processutils [req-932cbe76-c34f-46b9-87d6-6d80a685ed5f eadcdac311c64dfd8e661d7a14158d79 6fed39a8f90e4913b9a752fdaaeb6a35 - - -] u'genisoimage -o /opt/nova-data/instances/8f6dfb8c-154e-4c71-aae9-29b052cce3c0/disk.config -ldots -allow-lowercase -allow-multidot -l -publisher OpenStack Nova 13.1.3 -quiet -J -r -V config-2 /tmp/tmpDla_bR' failed. Not Retrying. execute /opt/nova-env/lib/python2.7/site-packages/oslo_concurrency/processutils.py:427
2016-11-14 11:12:40.461 307
View composer.json
{
"require": {
"symfony/routing": "2.5.*",
"symfony/http-foundation": "2.5.*"
}
}
View client.sh
#!/bin/bash
curl \
-X POST \
-d '{"method": "add", "params": [1, 2], "id": 1}' \
http://127.0.0.1:8080/server.php
@jasonjohnson
jasonjohnson / decoder.py
Last active Aug 29, 2015
bencode thing
View decoder.py
from string import digits
class Decoder(object):
def __init__(self, source):
self.offset = 0
self.source = source
def current(self):
return self.source[self.offset]
@jasonjohnson
jasonjohnson / nugget.py
Created May 16, 2014
sketch for simple python database lib?
View nugget.py
from nugget import use, bind, find, load, save
# Open a database.
use(":memory:")
# Create a class to bind to a database table.
class Contact(object):
pass
# Associate a class with a database table.
@jasonjohnson
jasonjohnson / sqlite.py
Last active Aug 29, 2015
python sqlite example
View sqlite.py
import sqlite3 as db
connection = db.connect(":memory:")
# Use the built-in row factory class and auto-commit
# all data modifications.
connection.row_factory = db.Row
connection.isolation_level = None
View scanner.py
class Scanner(object):
def __init__(self, stream):
self.offset = 0
self.stream = stream
def current(self):
return self.stream[self.offset]
def step(self):
self.offset += 1
You can’t perform that action at this time.