Skip to content

Instantly share code, notes, and snippets.

View IPaddr
#!/usr/gnu/bin/sh
#
# License: GNU General Public License (GPL)
# Support: linux-ha@lists.linux-ha.org
#
# This script manages IP alias IP addresses
#
# It can add an IP alias, or remove one.
#
# usage: $0 {start|stop|status|monitor|validate-all|meta-data}
@vincepii
vincepii / corosync.xml
Last active Aug 29, 2015
Corosync SMF manifest and script
View corosync.xml
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='HACluster_Corosync'>
<service name='application/hacluster/corosync' type='service' version='1'>
<create_default_instance enabled='false'/>
<single_instance/>
<dependency
name='multi-user-server'
grouping='optional_all'
type='service'
View Workload excerpt
<workstage name="w(4)KB_c1_o1000_r80w15d5_1" closuredelay="30">
<work name="main" type="normal" workers="1" interval="5"
division="none" runtime="600" rampup="120" rampdown="0"
afr="0" totalOps="0" totalBytes="0">
<operation type="read" ratio="80" division="none"
config="containers=u(1,1);objects=u(1,1000)" id="none"/>
<operation type="write" ratio="15" division="none"
config="containers=u(1,1);objects=u(1,1000);sizes=c(4)KB" id="none"/>
<operation type="delete" ratio="5" division="none"
config="containers=u(1,1);objects=u(1,1000)" id="none"/>
@vincepii
vincepii / corosync.conf
Created Nov 5, 2014
Basic corosync two nodes config
View corosync.conf
# Please read the openais.conf.5 manual page
service {
# Load the Pacemaker Cluster Resource Manager
ver: 1
name: pacemaker
use_mgmtd: yes
use_logd: yes
}
@vincepii
vincepii / pacemaker.patch
Created Nov 5, 2014
Terrible patch for pacemaker on OmniOS
View pacemaker.patch
diff --git a/extra/resources/Dummy b/extra/resources/Dummy
index 2410c4d..6b6e886 100644
--- a/extra/resources/Dummy
+++ b/extra/resources/Dummy
@@ -30,6 +30,7 @@
#######################################################################
# Initialization:
+export OCF_ROOT=/opt/usr/lib/ocf/
: ${OCF_FUNCTIONS=${OCF_ROOT}/resource.d/heartbeat/.ocf-shellfuncs}