Skip to content

Instantly share code, notes, and snippets.

@vincepii
vincepii / pacemaker.patch
Created November 5, 2014 15:46
Terrible patch for pacemaker on OmniOS
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}
@vincepii
vincepii / corosync.conf
Created November 5, 2014 17:08
Basic corosync two nodes config
# 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
}
<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.xml
Last active August 29, 2015 14:08
Corosync SMF manifest and script
<?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'
#!/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}