This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uvtool: support multiple bridges, eg: --bridge br0 --bridge br1 | |
live patching: patch -p0 -d /usr/lib/python2.7/dist-packages < /path/to/uvtool-multi-bridge.diff | |
=== modified file 'uvtool/libvirt/kvm.py' | |
--- uvtool/libvirt/kvm.py 2014-04-01 11:27:14 +0000 | |
+++ uvtool/libvirt/kvm.py 2014-09-19 18:06:20 +0000 | |
@@ -257,7 +257,8 @@ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am jjo on github. | |
* I am jjo (https://keybase.io/jjo) on keybase. | |
* I have a public key whose fingerprint is 0EFF 8F64 566F 06EF 52DE 81F9 09D5 FB6E 8050 D21C | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Manually setup juju mongodb clustering when failed from unresolvable hostnames, | |
# eg when using MaaS + LXC provisioning, see lp#1274947 | |
set -u | |
SERVICE=${1:-mongodb} | |
echo "*** $SERVICE: checking clustered units..." | |
replset=$(juju get $SERVICE| python -c 'import yaml, sys;print yaml.load(sys.stdin)["settings"]["replicaset"]["value"]') | |
units=$(juju status $SERVICE | \ | |
python -c 'import yaml, sys;print " ".join(sorted(yaml.load(sys.stdin)["services"]["'$SERVICE'"]["units"].keys()))') | |
# set positional parameters to $units, for easier handling (shift, $1, $2, etc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# vip-units.sh: show juju unit holding the vip for each passed service, or --all | |
# it forks for each service, to lower result times | |
# | |
# Author: JuanJo Ciarlante <jjo@canonical.com> | |
# License: GPLv3 | |
# | |
# Show unit holding the vip, unfortunately can't use "crm foo" | |
# as it shows hostnames, which are useless for LXC over MaaS | |
services=${*:?missing service(s), eg: keystone cinder} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heat_template_version: 2013-05-23 | |
description: > | |
HOT template to create a new neutron network plus a router to the public | |
network | |
parameters: | |
key_name: | |
type: string | |
description: Name of keypair to assign to servers | |
public_net: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
"RED (random early drop) simple implementation" | |
import random | |
import unittest | |
# pylint: disable=C0103,C0111,R0904 | |
def request_ok(current, th_min, th_max): | |
"""return OK with a probability proportional to | |
'low' current, between th_min and th_max""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Allows eg: | |
CLASSPATH=/path/to/hadoop-common-x.y.z.jar ant compile-native | |
diff --git a/build.xml b/build.xml | |
index cc9bfd0..b9da3e9 100644 | |
--- a/build.xml | |
+++ b/build.xml | |
@@ -226,7 +226,8 @@ | |
<mkdir dir="${build.native}/lib"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 828996c831ee96947b785cfb8f376752ea02b69a Mon Sep 17 00:00:00 2001 | |
From: JuanJo Ciarlante <jjo@google.com> | |
Date: Sun, 13 Sep 2009 13:43:04 +0200 | |
Subject: [PATCH] * rebased openvpn-2.1_rc1b.jjo.20061206.d.patch | |
* passes {udp,tcp}x{v4,v6} loopback tests | |
* passes {udp,tcp}x{v6} remote tests | |
--- | |
buffer.c | 13 ++ | |
configure.ac | 16 ++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@HOST:~# pgrep -f python.*nova-compute | xargs ps -fp | |
UID PID PPID C STIME TTY TIME CMD | |
nova 476997 1 2 Nov10 ? 04:14:01 /usr/bin/python /usr/bin/nova-compute --config-file=/etc/nova/nova.conf --config-file=/etc/nova/nova-compute.conf | |
root@HOST:~# strace -r -p "$(pgrep -f nova-compute)" | |
Process 3275 attached | |
Process 476997 attached | |
[pid 3275] 0.000000 restart_syscall(<... resuming interrupted call ...> <unfinished ...> | |
[pid 476997] 0.000080 epoll_wait(16, {}, 1023, 22) = 0 | |
[pid 476997] 0.022212 epoll_wait(16, {}, 1023, 0) = 0 |
OlderNewer