Skip to content

Instantly share code, notes, and snippets.

View beekhof's full-sized avatar

Andrew Beekhof beekhof

View GitHub Profile
git clone https://github.com/ClusterLabs/agents-lha
cd agents-lha
git branch linux-ha
git remote add rhat http://git.fedorahosted.org/git/resource-agents.git
git fetch rhat
git branch -t redhat rhat/master
git merge redhat
Here's my current .git/config for the merging repo
[core]
#pager = less $LESS -SFRX -SR +'/^---'
pager = less $LESS -X -SFRX
[user]
email = [email protected]
name = Andrew Beekhof
#[format]
# pretty = format:%cn, %cr %h: %s
# Put this in ~/.gitconfig
# https://git.wiki.kernel.org/index.php/Aliases
[alias]
ci = commit
co = checkout
fp = format-patch
bl = blame --date=short -M
br = !git branch --no-color | grep '*' | sed -e 's/^* //'
who = shortlog -s --
@beekhof
beekhof / matahari-qmf-v2.patch
Created March 2, 2011 20:15
Conversion to QMFv2
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5749656..877beb1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -51,6 +51,7 @@ set(SCHEMA_SOURCES
${CMAKE_CURRENT_BINARY_DIR}/qmf/org/matahariproject/EventHeartbeat.cpp
${CMAKE_CURRENT_BINARY_DIR}/qmf/org/matahariproject/EventService_op.cpp
${CMAKE_CURRENT_BINARY_DIR}/qmf/org/matahariproject/EventResource_op.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/org/matahariproject/QmfPackage.cpp
${CMAKE_CURRENT_BINARY_DIR}/qmf/org/matahariproject/Package.cpp)
@beekhof
beekhof / gist:942090
Created April 26, 2011 10:32
Fencing agent for Amazon EC2
#!/bin/bash
description="
fence_ec2 is an I/O Fencing agent which can be used with Amazon EC2 instances.
In order to function, the agent needs the private key and cert used by the Amazon EC2 API.
API functions used by this agent:
- ec2-describe-tags
- ec2-describe-instances
- ec2-stop-instances
# cat /etc/fence_virt.conf
fence_virtd {
listener = "multicast";
backend = "libvirt";
}
listeners {
multicast {
key_file = "/etc/cluster/fence_xvm.key";
address = "225.0.0.12";
@beekhof
beekhof / pacemaker-on-openstack.md
Created December 3, 2012 02:37
Testing Pacemaker on OpenStack

OpenStack CTS setup

Prep

Install python-novaclient

yum install -y python-novaclient

Export your OpenStack credentials

@beekhof
beekhof / pcs-crmsh cheatsheet.md
Last active October 24, 2021 23:17
Transition guide for common crmsh commands

Display the configuration

crmsh # crm configure show
pcs   # pcs cluster cib

Display the current status

crmsh # crm_mon -1
pcs   # pcs status
#!/bin/bash
fix=0
command=""
patches=""
while true ; do
case "$1" in
-\?) echo "$help"; exit 0; shift;;
-x) set -x; shift;;
out|log|push|pull|init|show|save|commit|report) command=$1; shift;;
#!/usr/bin/python -tt
import sys
import time
import atexit
import logging
import requests.exceptions
sys.path.append("/usr/share/fence")
from fencing import *